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.20 2004/04/20 10:02:46 csoutheren
31 # Remove usage of asnparser from the Makefile
33 # Revision 1.19 2004/04/13 11:48:36 csoutheren
34 # asnparser no longer built by default
36 # Revision 1.18 2004/02/26 12:04:10 csoutheren
37 # Added changes to increase portability to 64bit platforms, thanks to Klaus Kaempf
39 # Revision 1.17 2004/02/01 12:12:37 dsandras
40 # Fixed default target to optshared.
42 # Revision 1.16 2004/02/01 11:46:39 dsandras
43 # Set default target to "optshared".
45 # Revision 1.15 2003/12/12 06:40:47 rogerhardiman
46 # get plugins to install on FreeBSD
48 # Revision 1.14 2003/11/25 09:51:11 dsandras
49 # Fixed make install on Linux.
51 # Revision 1.13 2003/11/24 09:53:31 rogerhardiman
52 # Make the install target work on non-linux platforms. (Tested on FreeBSD).
54 # Revision 1.12 2003/11/14 06:01:11 csoutheren
55 # Fixed HAS_PLUGIN define
57 # Revision 1.11 2003/09/01 09:37:04 dsandras
58 # Fixed DESTDIR support thanks to Stefan BrĂ¼ns <lurchi@kawo1.rwth-aachen.de>.
60 # Revision 1.10 2003/08/27 09:46:07 dsandras
61 # Readded DESTDIR support (thanks to Stefan Bruens <lurch@gmx.li>)
63 # Revision 1.9 2003/07/29 11:22:17 csoutheren
64 # Removed trailing slash from vars.
66 # Revision 1.8 2003/07/28 18:13:02 dsandras
67 # Added patch from Alexander Larsson <alexl@redhat.com> to add --libdir support to configure.
69 # Revision 1.7 2003/07/28 14:09:34 dsandras
71 # Make sure permissions are correct on include/ptlib/unix/ptlib.
73 # Revision 1.6 2003/07/28 09:08:21 dsandras
75 # Fixed same kind of things for "make uninstall".
77 # Revision 1.5 2003/07/28 09:05:04 dsandras
79 # 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).
81 # Revision 1.4 2003/07/24 22:01:42 dereksmithies
82 # Add fixes from Peter Nixon for fixing install problems. Thanks.
84 # Revision 1.3 2003/05/22 12:13:44 dsandras
86 # Fixes permissions after "make install".
88 # Revision 1.3 2003/05/22 10:59:23 dsandras
89 # Fixes permissions after "make install".
91 # Revision 1.2 2003/05/16 19:10:23 shawn
92 # Replaces "so" with @SHAREDLIBEXT@ so `make install' works on platforms
93 # that do not use "so" as shared library filename extension.
95 # Revision 1.1 2003/04/28 01:09:24 craigs
98 # Revision 1.26 2003/04/16 07:16:55 craigs
99 # Modified for new autoconf based configuration
101 # Revision 1.25 2002/12/04 19:35:47 rogerh
102 # Remove un-needed / at the end of PREFIX
104 # Revision 1.24 2002/11/13 23:45:19 robertj
105 # Added install and uninstall targets, thanks Damien Sandras
107 # Revision 1.23 2002/10/17 13:44:27 robertj
108 # Port to RTEMS, thanks Vladimir Nesic.
110 # Revision 1.22 2001/08/06 19:35:27 rogerh
111 # Include the relevent header file based on the version of OpenBSD.
112 # Submitted by Marius Aamodt Eriksen <marius@umich.edu>
114 # Revision 1.21 2001/07/30 07:45:54 robertj
115 # Added "all" target with double colon.
117 # Revision 1.20 2001/04/23 00:44:30 robertj
118 # Spelt update correctly!
120 # Revision 1.19 2001/04/23 00:43:55 robertj
121 # Added make update target to get from cvs and rebuild
123 # Revision 1.18 2001/04/17 06:30:37 robertj
124 # Altered so can use tagbuild target in root directory.
126 # Revision 1.17 2001/03/20 03:33:18 robertj
127 # Major improvement to multiple targets over subdirectories, thanks Jac Goudsmit
129 # Revision 1.16 2000/11/01 04:39:20 robertj
130 # Made sure opt is first so frech build works
132 # Revision 1.15 2000/11/01 02:42:46 robertj
133 # Added optnoshared to build all default target.
135 # Revision 1.14 2000/10/30 05:49:25 robertj
136 # Made make all do bothdepend both
138 # Revision 1.13 2000/06/26 11:17:19 robertj
139 # Nucleus++ port (incomplete).
141 # Revision 1.12 2000/04/26 02:50:12 robertj
142 # Fixed build of correct GUI directory.
144 # Revision 1.11 2000/04/26 01:03:46 robertj
145 # Removed tarfile creation target, this is done differently now.
147 # Revision 1.10 2000/02/04 19:32:16 craigs
148 # Added targets for unshared libraries etc
150 # Revision 1.9 1999/11/30 00:22:54 robertj
151 # Updated documentation for doc++
153 # Revision 1.8 1999/06/09 16:09:20 robertj
154 # Fixed tarball construction not include windows directories
156 # Revision 1.7 1999/06/09 15:41:18 robertj
157 # Added better UI to make files.
159 # Revision 1.6 1999/04/22 02:37:00 robertj
160 # Added history file.
162 # Revision 1.5 1999/03/10 04:26:57 robertj
163 # More documentation changes.
165 # Revision 1.4 1999/03/09 08:07:00 robertj
166 # Documentation support.
168 # Revision 1.3 1999/01/22 00:30:45 robertj
169 # Yet more build environment changes.
171 # Revision 1.2 1999/01/16 23:15:11 robertj
172 # Added ability to NOT have th gui stuff.
174 # Revision 1.1 1999/01/16 04:00:14 robertj
179 PREFIX
=@INSTALLPREFIX@
180 exec_prefix = ${PREFIX}
182 export PWLIBDIR
=@PWLIBDIR@
188 TARGETDIR
=@TARGETDIR@
190 include make
/ptlib.mak
192 SUBDIRS
:= src
/ptlib
/$(TARGETDIR
)
193 ifeq (1, $(HAS_PLUGINS
))
197 # override P_SHAREDLIB for specific targets
198 optshared debugshared bothshared
:: P_SHAREDLIB
=1
199 optnoshared debugnoshared bothnoshared
:: P_SHAREDLIB
=0
201 # all these targets are just passed to all subdirectories
202 $(subst tagbuild
,,$(STANDARD_TARGETS
)) ::
203 set
-e
; $(foreach dir,$(SUBDIRS
),$(MAKE
) -C
$(dir) $@
;)
207 $(MAKE
) bothdepend both
210 $(MAKE
) -C src
/ptlib
/$(TARGETDIR
) both
213 doc
++ --dir html
--tables pwlib.dxx
216 mkdir
-p
$(DESTDIR
)$(PREFIX
)/include
217 mkdir
-p
$(DESTDIR
)$(PREFIX
)/bin
218 mkdir
-p
$(DESTDIR
)$(PREFIX
)/share
/pwlib
219 mkdir
-p
$(DESTDIR
)$(PREFIX
)/share
/pwlib
/make
/
220 mkdir
-p
$(DESTDIR
)$(LIBDIR
)
221 mkdir
-p
$(DESTDIR
)$(LIBDIR
)/pwlib
222 chmod a
+r lib
/*@SHAREDLIBEXT@
*
223 cp
-f lib
/$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@
$(DESTDIR
)$(LIBDIR
)/
224 (cd
$(DESTDIR
)$(LIBDIR
) ; \
225 rm -f
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@
; \
226 ln
-sf
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@ \
227 $(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@ \
229 (cd
$(DESTDIR
)$(LIBDIR
) ; \
230 rm -f
$(PTLIB_FILE
).@MAJOR_VERSION@
; \
231 ln
-sf
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@ \
232 $(PTLIB_FILE
).@MAJOR_VERSION@ \
234 (cd
$(DESTDIR
)$(LIBDIR
) ; \
235 rm -f
$(PTLIB_FILE
) ; \
236 ln
-sf
$(PTLIB_FILE
).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@ \
239 (cd
$(DESTDIR
)$(LIBDIR
); \
240 rm -f libpt.@SHAREDLIBEXT@
; \
241 ln
-sf
$(PTLIB_FILE
) libpt.@SHAREDLIBEXT@ \
243 ### cp -df lib/*@SHAREDLIBEXT@* $(DESTDIR)$(LIBDIR)/
244 ifeq (1, $(HAS_PLUGINS
))
245 cp
-rf plugins
/pwlib
$(DESTDIR
)$(LIBDIR
)
247 cp
-rf
include/ptclib
$(DESTDIR
)$(PREFIX
)/include/
248 cp
-rf
include/ptlib
$(DESTDIR
)$(PREFIX
)/include/
249 cp
-rf
include/ptbuildopts.h
$(DESTDIR
)$(PREFIX
)/include/
250 cp
-rf
include/ptlib.h
$(DESTDIR
)$(PREFIX
)/include/
251 cp
-rf make
/*.mak
$(DESTDIR
)$(PREFIX
)/share
/pwlib
/make
/
252 cp make
/ptlib-config
$(DESTDIR
)$(PREFIX
)/share
/pwlib
/make
/
253 (cd
$(DESTDIR
)$(PREFIX
)/bin
; ln
-snf ..
/share
/pwlib
/make
/ptlib-config ptlib-config
)
254 rm -rf
$(DESTDIR
)$(PREFIX
)/include/ptlib
/CVS
/
255 rm -rf
$(DESTDIR
)$(PREFIX
)/include/ptlib
/unix
/CVS
/
256 rm -rf
$(DESTDIR
)$(PREFIX
)/include/ptlib
/unix
/ptlib
/CVS
/
257 rm -rf
$(DESTDIR
)$(PREFIX
)/include/ptclib
/CVS
/
258 chmod
-R a
+r
$(DESTDIR
)$(PREFIX
)/include/ptlib
$(DESTDIR
)$(PREFIX
)/include/ptclib
$(DESTDIR
)$(PREFIX
)/include/ptlib.h
$(DESTDIR
)$(PREFIX
)/share
/pwlib
$(DESTDIR
)$(PREFIX
)/include/ptbuildopts.h
$(DESTDIR
)$(PREFIX
)/include/ptlib.h
$(DESTDIR
)$(LIBDIR
)/pwlib
/
259 chmod a
+rx
$(DESTDIR
)$(PREFIX
)/include/ptlib
$(DESTDIR
)$(PREFIX
)/include/ptlib
/unix
$(DESTDIR
)$(PREFIX
)/include/ptlib
/unix
/ptlib
$(DESTDIR
)$(PREFIX
)/include/ptclib
$(DESTDIR
)$(PREFIX
)/bin
/ptlib-config
$(DESTDIR
)$(PREFIX
)/share
/pwlib
/make
/
262 rm -rf
$(DESTDIR
)$(PREFIX
)/include/ptlib
$(DESTDIR
)$(PREFIX
)/include/ptclib
$(DESTDIR
)$(PREFIX
)/include/ptlib.h
$(DESTDIR
)$(PREFIX
)/include/ptbuildopts.h
$(DESTDIR
)$(PREFIX
)/share
/pwlib
/ $(DESTDIR
)$(LIBDIR
)/pwlib
/
263 rm -f
$(DESTDIR
)@
libdir@
/$(PTLIB_FILE
)* @
libdir@
/libpt.so