4 # Make file for pwlib library
6 # Portable Windows Library
8 # Copyright (c) 1993-1998 Equivalence Pty. Ltd.
10 # The contents of this file are subject to the Mozilla Public License
11 # Version 1.0 (the "License"); you may not use this file except in
12 # compliance with the License. You may obtain a copy of the License at
13 # http://www.mozilla.org/MPL/
15 # Software distributed under the License is distributed on an "AS IS"
16 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 # the License for the specific language governing rights and limitations
20 # The Original Code is Portable Windows Library.
22 # The Initial Developer of the Original Code is Equivalence Pty. Ltd.
24 # Portions are Copyright (C) 1993 Free Software Foundation, Inc.
25 # All Rights Reserved.
27 # Contributor(s): ______________________________________.
30 # Revision 1.30 2006/11/20 07:17:06 csoutheren
31 # Fix Makefile to work when plugins not available
33 # Revision 1.29 2005/04/06 10:10:54 dsandras
34 # Fixed install target with DESTDIR thanks to Stefan Bruens.
36 # Revision 1.28 2004/06/24 12:46:48 csoutheren
37 # Fixed path in plugin install
39 # Revision 1.27 2004/06/17 23:17:16 csoutheren
40 # Fixed permissions on install directories as suggested by Al Piszcz
42 # Revision 1.26 2004/05/17 06:05:20 csoutheren
43 # Changed "make docs" to use doxygen
44 # Added new config file and main page
46 # Revision 1.25 2004/05/04 08:23:19 dsandras
47 # Fixed installation of plugins. Fixed uninstallation of plugins.
49 # Revision 1.24 2004/05/03 12:33:18 csoutheren
50 # Fixed install problem with ptlib-config
52 # Revision 1.23 2004/05/03 12:01:23 csoutheren
53 # Fixed install target
56 # Revision 1.22 2004/04/29 15:01:43 csoutheren
59 # Revision 1.21 2004/04/29 14:07:06 csoutheren
60 # Changed install target to use $(INSTALL)
61 # Various makefile cleanups and verified install and uninstall targets
62 # Removed some vestiges of old GUI code
64 # Revision 1.20 2004/04/20 10:02:46 csoutheren
65 # Remove usage of asnparser from the Makefile
67 # Revision 1.19 2004/04/13 11:48:36 csoutheren
68 # asnparser no longer built by default
70 # Revision 1.18 2004/02/26 12:04:10 csoutheren
71 # Added changes to increase portability to 64bit platforms, thanks to Klaus Kaempf
73 # Revision 1.17 2004/02/01 12:12:37 dsandras
74 # Fixed default target to optshared.
76 # Revision 1.16 2004/02/01 11:46:39 dsandras
77 # Set default target to "optshared".
79 # Revision 1.15 2003/12/12 06:40:47 rogerhardiman
80 # get plugins to install on FreeBSD
82 # Revision 1.14 2003/11/25 09:51:11 dsandras
83 # Fixed make install on Linux.
85 # Revision 1.13 2003/11/24 09:53:31 rogerhardiman
86 # Make the install target work on non-linux platforms. (Tested on FreeBSD).
88 # Revision 1.12 2003/11/14 06:01:11 csoutheren
89 # Fixed HAS_PLUGIN define
91 # Revision 1.11 2003/09/01 09:37:04 dsandras
92 # Fixed DESTDIR support thanks to Stefan BrĂ¼ns <lurchi@kawo1.rwth-aachen.de>.
94 # Revision 1.10 2003/08/27 09:46:07 dsandras
95 # Readded DESTDIR support (thanks to Stefan Bruens <lurch@gmx.li>)
97 # Revision 1.9 2003/07/29 11:22:17 csoutheren
98 # Removed trailing slash from vars.
100 # Revision 1.8 2003/07/28 18:13:02 dsandras
101 # Added patch from Alexander Larsson <alexl@redhat.com> to add --libdir support to configure.
103 # Revision 1.7 2003/07/28 14:09:34 dsandras
105 # Make sure permissions are correct on include/ptlib/unix/ptlib.
107 # Revision 1.6 2003/07/28 09:08:21 dsandras
109 # Fixed same kind of things for "make uninstall".
111 # Revision 1.5 2003/07/28 09:05:04 dsandras
113 # Make sure that things are installed in $(DESTDIR)$(PREFIX) and not only $(DESTDIR). Use the style used in all distributions for headers of $(DESTIR)$(PREFIX).
115 # Revision 1.4 2003/07/24 22:01:42 dereksmithies
116 # Add fixes from Peter Nixon for fixing install problems. Thanks.
118 # Revision 1.3 2003/05/22 12:13:44 dsandras
120 # Fixes permissions after "make install".
122 # Revision 1.3 2003/05/22 10:59:23 dsandras
123 # Fixes permissions after "make install".
125 # Revision 1.2 2003/05/16 19:10:23 shawn
126 # Replaces "so" with @SHAREDLIBEXT@ so `make install' works on platforms
127 # that do not use "so" as shared library filename extension.
129 # Revision 1.1 2003/04/28 01:09:24 craigs
132 # Revision 1.26 2003/04/16 07:16:55 craigs
133 # Modified for new autoconf based configuration
135 # Revision 1.25 2002/12/04 19:35:47 rogerh
136 # Remove un-needed / at the end of PREFIX
138 # Revision 1.24 2002/11/13 23:45:19 robertj
139 # Added install and uninstall targets, thanks Damien Sandras
141 # Revision 1.23 2002/10/17 13:44:27 robertj
142 # Port to RTEMS, thanks Vladimir Nesic.
144 # Revision 1.22 2001/08/06 19:35:27 rogerh
145 # Include the relevent header file based on the version of OpenBSD.
146 # Submitted by Marius Aamodt Eriksen <marius@umich.edu>
148 # Revision 1.21 2001/07/30 07:45:54 robertj
149 # Added "all" target with double colon.
151 # Revision 1.20 2001/04/23 00:44:30 robertj
152 # Spelt update correctly!
154 # Revision 1.19 2001/04/23 00:43:55 robertj
155 # Added make update target to get from cvs and rebuild
157 # Revision 1.18 2001/04/17 06:30:37 robertj
158 # Altered so can use tagbuild target in root directory.
160 # Revision 1.17 2001/03/20 03:33:18 robertj
161 # Major improvement to multiple targets over subdirectories, thanks Jac Goudsmit
163 # Revision 1.16 2000/11/01 04:39:20 robertj
164 # Made sure opt is first so frech build works
166 # Revision 1.15 2000/11/01 02:42:46 robertj
167 # Added optnoshared to build all default target.
169 # Revision 1.14 2000/10/30 05:49:25 robertj
170 # Made make all do bothdepend both
172 # Revision 1.13 2000/06/26 11:17:19 robertj
173 # Nucleus++ port (incomplete).
175 # Revision 1.12 2000/04/26 02:50:12 robertj
176 # Fixed build of correct GUI directory.
178 # Revision 1.11 2000/04/26 01:03:46 robertj
179 # Removed tarfile creation target, this is done differently now.
181 # Revision 1.10 2000/02/04 19:32:16 craigs
182 # Added targets for unshared libraries etc
184 # Revision 1.9 1999/11/30 00:22:54 robertj
185 # Updated documentation for doc++
187 # Revision 1.8 1999/06/09 16:09:20 robertj
188 # Fixed tarball construction not include windows directories
190 # Revision 1.7 1999/06/09 15:41:18 robertj
191 # Added better UI to make files.
193 # Revision 1.6 1999/04/22 02:37:00 robertj
194 # Added history file.
196 # Revision 1.5 1999/03/10 04:26:57 robertj
197 # More documentation changes.
199 # Revision 1.4 1999/03/09 08:07:00 robertj
200 # Documentation support.
202 # Revision 1.3 1999/01/22 00:30:45 robertj
203 # Yet more build environment changes.
205 # Revision 1.2 1999/01/16 23:15:11 robertj
206 # Added ability to NOT have th gui stuff.
208 # Revision 1.1 1999/01/16 04:00:14 robertj
213 PREFIX
=@INSTALLPREFIX@
214 exec_prefix = ${PREFIX}
216 export PWLIBDIR
=@PWLIBDIR@
224 TARGETDIR
=@TARGETDIR@
226 include make
/ptlib.mak
228 SUBDIRS
:= src
/ptlib
/$(TARGETDIR
)
229 ifeq (1, $(HAS_PLUGINS
))
233 # override P_SHAREDLIB for specific targets
234 optshared debugshared bothshared
:: P_SHAREDLIB
=1
235 optnoshared debugnoshared bothnoshared
:: P_SHAREDLIB
=0
237 # all these targets are just passed to all subdirectories
238 $(subst tagbuild
,,$(STANDARD_TARGETS
)) ::
239 set
-e
; $(foreach dir,$(SUBDIRS
),if
test -e
$(dir) ; then
$(MAKE
) -C
$(dir) $@
; fi
; )
243 $(MAKE
) bothdepend both
246 $(MAKE
) -C src
/ptlib
/$(TARGETDIR
) both
249 doxygen pwlib_cfg.dxy
252 ( for
dir in
$(DESTDIR
)$(LIBDIR
) \
253 $(DESTDIR
)$(PREFIX
)/bin \
254 $(DESTDIR
)$(PREFIX
)/include/ptlib \
255 $(DESTDIR
)$(PREFIX
)/include/ptlib
/unix
/ptlib \
256 $(DESTDIR
)$(PREFIX
)/include/ptclib \
257 $(DESTDIR
)$(PREFIX
)/share
/pwlib
/make
; \
258 do mkdir
-p
$$dir ; chmod
755 $$dir ; \
260 $(INSTALL
) -m
444 lib
/$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@
$(DESTDIR
)$(LIBDIR
)
261 (cd
$(DESTDIR
)$(LIBDIR
) ; \
262 rm -f
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@
; \
263 ln
-sf
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@ \
265 (cd
$(DESTDIR
)$(LIBDIR
) ; \
266 rm -f
$(PTLIB_FILE
).@MAJOR_VERSION@
; \
267 ln
-sf
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@
$(PTLIB_FILE
).@MAJOR_VERSION@ \
269 (cd
$(DESTDIR
)$(LIBDIR
) ; \
270 rm -f
$(PTLIB_FILE
) ; \
271 ln
-sf
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@
$(PTLIB_FILE
) \
273 (cd
$(DESTDIR
)$(LIBDIR
); \
274 rm -f libpt.@SHAREDLIBEXT@
; \
275 ln
-sf
$(PTLIB_FILE
) libpt.@SHAREDLIBEXT@ \
277 ifeq (1, $(HAS_PLUGINS
))
278 cd plugins
/pwlib
/device
/ ; \
280 do mkdir
-p
$(DESTDIR
)$(LIBDIR
)/pwlib
/devices
/$$dir ; \
281 chmod
755 $(DESTDIR
)$(LIBDIR
)/pwlib
/devices
/$$dir ; \
282 (for fn in .
/$$dir/*.so
; \
283 do
$(INSTALL
) -m
444 $$fn $(DESTDIR
)$(LIBDIR
)/pwlib
/devices
/$$dir; \
287 $(INSTALL
) -m
444 include/ptlib.h
$(DESTDIR
)$(PREFIX
)/include
288 $(INSTALL
) -m
444 include/ptbuildopts.h
$(DESTDIR
)$(PREFIX
)/include
289 (for fn in
include/ptlib
/*.h
include/ptlib
/*.inl
; \
290 do
$(INSTALL
) -m
444 $$fn $(DESTDIR
)$(PREFIX
)/include/ptlib
; \
292 (for fn in
include/ptlib
/unix
/ptlib
/*.h
include/ptlib
/unix
/ptlib
/*.inl
; \
293 do
$(INSTALL
) -m
444 $$fn $(DESTDIR
)$(PREFIX
)/include/ptlib
/unix
/ptlib
; \
295 (for fn in
include/ptclib
/*.h
; \
296 do
$(INSTALL
) -m
444 $$fn $(DESTDIR
)$(PREFIX
)/include/ptclib
; \
298 (for fn in make
/*.mak
; \
299 do
$(INSTALL
) -m
444 $$fn $(DESTDIR
)$(PREFIX
)/share
/pwlib
/make
; \
301 $(INSTALL
) -m
755 make
/ptlib-config
$(DESTDIR
)$(PREFIX
)/share
/pwlib
/make
/
302 (cd
$(DESTDIR
)$(PREFIX
)/bin
; rm -f ptlib-config
; ln
-snf ..
/share
/pwlib
/make
/ptlib-config ptlib-config
)
305 rm -rf
$(DESTDIR
)$(PREFIX
)/include/ptlib \
306 $(DESTDIR
)$(PREFIX
)/include/ptclib \
307 $(DESTDIR
)$(PREFIX
)/include/ptlib.h \
308 $(DESTDIR
)$(PREFIX
)/include/ptbuildopts.h \
309 $(DESTDIR
)$(PREFIX
)/share
/pwlib \
310 $(DESTDIR
)$(LIBDIR
)/pwlib
/devices \
311 rm -f
$(DESTDIR
)@
libdir@
/$(PTLIB_FILE
)* \