-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile.in
184 lines (164 loc) · 5.56 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#
# Makefile
#
# Make file for pwlib library
#
# Portable Windows Library
#
# Copyright (c) 1993-1998 Equivalence Pty. Ltd.
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is Portable Windows Library.
#
# The Initial Developer of the Original Code is Equivalence Pty. Ltd.
#
# Contributor(s): ______________________________________.
#
# $Revision$
# $Author$
# $Date$
#
PREFIX=@prefix@
exec_prefix = ${PREFIX}
export LIBDIR=@LIBDIR@
export PTLIBDIR=@PTLIBDIR@
INSTALL=@INSTALL@
ifeq ($(DEBUG),)
default :: optshared
else
default :: debugshared
endif
all ::
TARGETDIR=@TARGETDIR@
include make/ptlib.mak
SUBDIRS := src
ifeq (1, $(HAS_PLUGINS))
SUBDIRS += plugins
endif
ifeq (1, $(HAS_SAMPLES))
SUBDIRS += samples/hello_world \
samples/dnstest \
samples/httptest \
samples/ipv6test \
samples/find_ip \
samples/map_dict \
samples/netif \
samples/sockbundle \
samples/stunclient \
samples/thread \
samples/url \
samples/vcard
endif
ifeq ($(OSTYPE),mingw)
ARCH_INCLUDE=msos
else
ARCH_INCLUDE=unix
endif
# override P_SHAREDLIB for specific targets
optshared debugshared bothshared :: P_SHAREDLIB=1
optnoshared debugnoshared bothnoshared :: P_SHAREDLIB=0
# and adjust shared lib names
ifeq (,$(findstring $(OSTYPE),Darwin cygwin mingw))
LIB_SONAME = $(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@@BUILD_TYPE@@BUILD_NUMBER@
DEBUG_SONAME = $(PTLIB_DEBUG_FILE).@MAJOR_VERSION@.@MINOR_VERSION@@BUILD_TYPE@@BUILD_NUMBER@
else
LIB_SONAME = $(subst .$(LIB_SUFFIX),.@MAJOR_VERSION@.@MINOR_VERSION@@BUILD_TYPE@@BUILD_NUMBER@.$(LIB_SUFFIX),$(PTLIB_FILE))
DEBUG_SONAME = $(subst .$(LIB_SUFFIX),.@MAJOR_VERSION@.@MINOR_VERSION@@BUILD_TYPE@@BUILD_NUMBER@._d$(LIB_SUFFIX),$(PTLIB_FILE))
endif
# all these targets are just passed to all subdirectories
$(subst tagbuild,,$(STANDARD_TARGETS)) ::
@set -e; $(foreach dir,$(SUBDIRS),if test -e $(dir) ; then $(MAKE) -C $(dir) $@; fi; )
update:
svn update
$(MAKE) bothdepend both
ptlib:
$(MAKE) -C src both
docs:
rm -rf html
doxygen ptlib_cfg.dxy > doxygen.out 2>&1
install:
( for dir in $(DESTDIR)$(LIBDIR) \
$(DESTDIR)$(PREFIX)/bin \
$(DESTDIR)$(PREFIX)/include/ptlib \
$(DESTDIR)$(PREFIX)/include/ptlib/$(ARCH_INCLUDE)/ptlib \
$(DESTDIR)$(PREFIX)/include/ptclib \
$(DESTDIR)$(PREFIX)/share/ptlib/make ; \
do mkdir -p $$dir ; chmod 755 $$dir ; \
done )
( for lib in $(PT_LIBDIR)/$(LIB_SONAME) \
$(PT_LIBDIR)/$(DEBUG_SONAME) \
$(PT_LIBDIR)/lib$(PTLIB_BASE)_s.a \
$(PT_LIBDIR)/lib$(PTLIB_BASE)_d_s.a ; \
do \
( if test -e $$lib ; then \
$(INSTALL) -m 444 $$lib $(DESTDIR)$(LIBDIR); \
fi ) \
done )
( if test -e $(PT_LIBDIR)/$(LIB_SONAME); then \
(cd $(DESTDIR)$(LIBDIR) ; \
rm -f $(PTLIB_FILE) ; \
ln -sf $(LIB_SONAME) $(PTLIB_FILE) \
) \
fi )
( if test -e $(PT_LIBDIR)/$(DEBUG_SONAME); then \
(cd $(DESTDIR)$(LIBDIR) ; \
rm -f $(PTLIB_DEBUG_FILE) ; \
ln -sf $(DEBUG_SONAME) $(PTLIB_DEBUG_FILE) \
) \
fi )
ifeq (1, $(HAS_PLUGINS))
if test -e $(PT_LIBDIR)/device/; then \
cd $(PT_LIBDIR)/device/; \
( for dir in ./* ;\
do mkdir -p $(DESTDIR)$(LIBDIR)/$(DEV_PLUGIN_DIR)/$$dir ; \
chmod 755 $(DESTDIR)$(LIBDIR)/$(DEV_PLUGIN_DIR)/$$dir ; \
(for fn in ./$$dir/*.so ; \
do $(INSTALL) -m 444 $$fn $(DESTDIR)$(LIBDIR)/$(DEV_PLUGIN_DIR)/$$dir; \
done ); \
done ) ; \
fi
endif
$(INSTALL) -m 444 include/ptlib.h $(DESTDIR)$(PREFIX)/include
$(INSTALL) -m 444 include/ptbuildopts.h $(DESTDIR)$(PREFIX)/include
(for fn in include/ptlib/*.h include/ptlib/*.inl; \
do $(INSTALL) -m 444 $$fn $(DESTDIR)$(PREFIX)/include/ptlib; \
done)
(for fn in include/ptlib/$(ARCH_INCLUDE)/ptlib/*.h include/ptlib/$(ARCH_INCLUDE)/ptlib/*.inl ; \
do $(INSTALL) -m 444 $$fn $(DESTDIR)$(PREFIX)/include/ptlib/$(ARCH_INCLUDE)/ptlib ; \
done)
(for fn in include/ptclib/*.h ; \
do $(INSTALL) -m 444 $$fn $(DESTDIR)$(PREFIX)/include/ptclib; \
done)
(for fn in make/*.mak ; \
do $(INSTALL) -m 444 $$fn $(DESTDIR)$(PREFIX)/share/ptlib/make; \
done)
$(INSTALL) -m 755 make/ptlib-config $(DESTDIR)$(PREFIX)/share/ptlib/make/
(cd $(DESTDIR)$(PREFIX)/bin; rm -f ptlib-config ; ln -snf ../share/ptlib/make/ptlib-config ptlib-config)
mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
chmod 755 $(DESTDIR)$(LIBDIR)/pkgconfig
$(INSTALL) -m 644 ptlib.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
uninstall:
rm -rf $(DESTDIR)$(PREFIX)/include/ptlib \
$(DESTDIR)$(PREFIX)/include/ptclib \
$(DESTDIR)$(PREFIX)/include/ptlib.h \
$(DESTDIR)$(PREFIX)/include/ptbuildopts.h \
$(DESTDIR)$(PREFIX)/share/ptlib \
$(DESTDIR)$(LIBDIR)/$(DEV_PLUGIN_DIR) \
$(DESTDIR)$(LIBDIR)/pkgconfig/ptlib.pc
rm -f $(DESTDIR)$(LIBDIR)/lib$(PTLIB_BASE)_s.a \
$(DESTDIR)$(LIBDIR)/$(PTLIB_FILE) \
$(DESTDIR)$(LIBDIR)/$(LIB_SONAME)
(cd $(DESTDIR)$(PREFIX)/bin; rm -f ptlib-config ; rm -f ../share/ptlib/make/ptlib-config )
distclean: clean
rm -rf config.log config.err autom4te.cache config.status a.out aclocal.m4
rm -rf lib*
# End of Makefile.in