forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
284 lines (208 loc) · 8.73 KB
/
Makefile
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
#
# Makefile
#
# The global Makefile for POCO [generated by mkrelease]
#
sinclude config.make
sinclude config.build
ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
export POCO_BASE=$(shell pwd)
endif
ifndef POCO_PREFIX
export POCO_PREFIX=/usr/local
endif
ifndef POCO_BUILD
export POCO_BUILD=$(POCO_BASE)
endif
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
# TESTS and SAMPLES are set in config.make
poco: libexecs $(if $(TESTS),tests) $(if $(SAMPLES),samples)
all: libexecs tests samples
INSTALLDIR = $(DESTDIR)$(POCO_PREFIX)
COMPONENTS = Foundation XML JSON Util Net Crypto NetSSL_OpenSSL Data Data/SQLite Data/ODBC Data/MySQL MongoDB Zip PageCompiler PageCompiler/File2Page CppParser PDF
cppunit:
$(MAKE) -C $(POCO_BASE)/CppUnit
CppUnit-clean:
\$(MAKE) -C \$(POCO_BASE)/CppUnit clean
install: libexecs
mkdir -p $(INSTALLDIR)/include/Poco
mkdir -p $(INSTALLDIR)/lib
mkdir -p $(INSTALLDIR)/bin
for comp in $(COMPONENTS) ; do \
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
fi ; \
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
fi ; \
done
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec MongoDB-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec CppParser-libexec PDF-libexec
tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests MongoDB-tests Zip-tests CppParser-tests PDF-tests
samples = Foundation-samples XML-samples JSON-samples Util-samples Net-samples Crypto-samples NetSSL_OpenSSL-samples Data-samples MongoDB-samples Zip-samples PageCompiler-samples PDF-samples
cleans = Foundation-clean XML-clean JSON-clean Util-clean Net-clean Crypto-clean NetSSL_OpenSSL-clean Data-clean Data/SQLite-clean Data/ODBC-clean Data/MySQL-clean MongoDB-clean Zip-clean PageCompiler-clean PageCompiler/File2Page-clean CppParser-clean PDF-clean
.PHONY: $(libexecs)
.PHONY: $(tests)
.PHONY: $(samples)
.PHONY: $(cleans)
libexecs: $(filter-out $(foreach f,$(OMIT),$f%),$(libexecs))
tests: $(filter-out $(foreach f,$(OMIT),$f%),$(tests))
samples: $(filter-out $(foreach f,$(OMIT),$f%),$(samples))
cleans: $(filter-out $(foreach f,$(OMIT),$f%),$(cleans))
Foundation-libexec:
$(MAKE) -C $(POCO_BASE)/Foundation
Foundation-tests: Foundation-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Foundation/testsuite
Foundation-samples: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/Foundation/samples
Foundation-clean:
$(MAKE) -C $(POCO_BASE)/Foundation clean
$(MAKE) -C $(POCO_BASE)/Foundation/testsuite clean
$(MAKE) -C $(POCO_BASE)/Foundation/samples clean
XML-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/XML
XML-tests: XML-libexec cppunit
$(MAKE) -C $(POCO_BASE)/XML/testsuite
XML-samples: XML-libexec
$(MAKE) -C $(POCO_BASE)/XML/samples
XML-clean:
$(MAKE) -C $(POCO_BASE)/XML clean
$(MAKE) -C $(POCO_BASE)/XML/testsuite clean
$(MAKE) -C $(POCO_BASE)/XML/samples clean
JSON-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/JSON
JSON-tests: JSON-libexec cppunit
$(MAKE) -C $(POCO_BASE)/JSON/testsuite
JSON-samples: JSON-libexec
$(MAKE) -C $(POCO_BASE)/JSON/samples
JSON-clean:
$(MAKE) -C $(POCO_BASE)/JSON clean
$(MAKE) -C $(POCO_BASE)/JSON/testsuite clean
$(MAKE) -C $(POCO_BASE)/JSON/samples clean
Util-libexec: Foundation-libexec XML-libexec JSON-libexec
$(MAKE) -C $(POCO_BASE)/Util
Util-tests: Util-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Util/testsuite
Util-samples: Util-libexec
$(MAKE) -C $(POCO_BASE)/Util/samples
Util-clean:
$(MAKE) -C $(POCO_BASE)/Util clean
$(MAKE) -C $(POCO_BASE)/Util/testsuite clean
$(MAKE) -C $(POCO_BASE)/Util/samples clean
Net-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/Net
Net-tests: Net-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Net/testsuite
Net-samples: Net-libexec Foundation-libexec XML-libexec Util-libexec
$(MAKE) -C $(POCO_BASE)/Net/samples
Net-clean:
$(MAKE) -C $(POCO_BASE)/Net clean
$(MAKE) -C $(POCO_BASE)/Net/testsuite clean
$(MAKE) -C $(POCO_BASE)/Net/samples clean
Crypto-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/Crypto
Crypto-tests: Crypto-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Crypto/testsuite
Crypto-samples: Crypto-libexec Foundation-libexec Util-libexec
$(MAKE) -C $(POCO_BASE)/Crypto/samples
Crypto-clean:
$(MAKE) -C $(POCO_BASE)/Crypto clean
$(MAKE) -C $(POCO_BASE)/Crypto/testsuite clean
$(MAKE) -C $(POCO_BASE)/Crypto/samples clean
NetSSL_OpenSSL-libexec: Foundation-libexec Net-libexec Util-libexec Crypto-libexec
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL
NetSSL_OpenSSL-tests: NetSSL_OpenSSL-libexec cppunit
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/testsuite
NetSSL_OpenSSL-samples: NetSSL_OpenSSL-libexec
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/samples
NetSSL_OpenSSL-clean:
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL clean
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/testsuite clean
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/samples clean
Data-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/Data
Data-tests: Data-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/testsuite
Data-samples: Data-libexec Data-libexec Data/SQLite-libexec
$(MAKE) -C $(POCO_BASE)/Data/samples
Data-clean:
$(MAKE) -C $(POCO_BASE)/Data clean
$(MAKE) -C $(POCO_BASE)/Data/testsuite clean
$(MAKE) -C $(POCO_BASE)/Data/samples clean
Data/SQLite-libexec: Foundation-libexec Data-libexec
$(MAKE) -C $(POCO_BASE)/Data/SQLite
Data/SQLite-tests: Data/SQLite-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/SQLite/testsuite
Data/SQLite-clean:
$(MAKE) -C $(POCO_BASE)/Data/SQLite clean
$(MAKE) -C $(POCO_BASE)/Data/SQLite/testsuite clean
Data/ODBC-libexec: Foundation-libexec Data-libexec
$(MAKE) -C $(POCO_BASE)/Data/ODBC
Data/ODBC-tests: Data/ODBC-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/ODBC/testsuite
Data/ODBC-clean:
$(MAKE) -C $(POCO_BASE)/Data/ODBC clean
$(MAKE) -C $(POCO_BASE)/Data/ODBC/testsuite clean
Data/MySQL-libexec: Foundation-libexec Data-libexec
$(MAKE) -C $(POCO_BASE)/Data/MySQL
Data/MySQL-tests: Data/MySQL-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/MySQL/testsuite
Data/MySQL-clean:
$(MAKE) -C $(POCO_BASE)/Data/MySQL clean
$(MAKE) -C $(POCO_BASE)/Data/MySQL/testsuite clean
MongoDB-libexec: Foundation-libexec Net-libexec
$(MAKE) -C $(POCO_BASE)/MongoDB
MongoDB-tests: MongoDB-libexec cppunit
$(MAKE) -C $(POCO_BASE)/MongoDB/testsuite
MongoDB-samples: MongoDB-libexec
$(MAKE) -C $(POCO_BASE)/MongoDB/samples
MongoDB-clean:
$(MAKE) -C $(POCO_BASE)/MongoDB clean
$(MAKE) -C $(POCO_BASE)/MongoDB/testsuite clean
$(MAKE) -C $(POCO_BASE)/MongoDB/samples clean
Zip-libexec: Foundation-libexec Net-libexec Util-libexec XML-libexec
$(MAKE) -C $(POCO_BASE)/Zip
Zip-tests: Zip-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Zip/testsuite
Zip-samples: Zip-libexec
$(MAKE) -C $(POCO_BASE)/Zip/samples
Zip-clean:
$(MAKE) -C $(POCO_BASE)/Zip clean
$(MAKE) -C $(POCO_BASE)/Zip/testsuite clean
$(MAKE) -C $(POCO_BASE)/Zip/samples clean
PageCompiler-libexec: Net-libexec Util-libexec XML-libexec Foundation-libexec
$(MAKE) -C $(POCO_BASE)/PageCompiler
PageCompiler-samples: PageCompiler-libexec
$(MAKE) -C $(POCO_BASE)/PageCompiler/samples
PageCompiler-clean:
$(MAKE) -C $(POCO_BASE)/PageCompiler clean
$(MAKE) -C $(POCO_BASE)/PageCompiler/samples clean
PageCompiler/File2Page-libexec: Net-libexec Util-libexec XML-libexec Foundation-libexec
$(MAKE) -C $(POCO_BASE)/PageCompiler/File2Page
PageCompiler/File2Page-clean:
$(MAKE) -C $(POCO_BASE)/PageCompiler/File2Page clean
CppParser-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/CppParser
CppParser-tests: CppParser-libexec cppunit
$(MAKE) -C $(POCO_BASE)/CppParser/testsuite
CppParser-clean:
$(MAKE) -C $(POCO_BASE)/CppParser clean
$(MAKE) -C $(POCO_BASE)/CppParser/testsuite clean
PDF-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/PDF
PDF-tests: PDF-libexec cppunit
$(MAKE) -C $(POCO_BASE)/PDF/testsuite
PDF-samples: PDF-libexec
$(MAKE) -C $(POCO_BASE)/PDF/samples
PDF-clean:
$(MAKE) -C $(POCO_BASE)/PDF clean
$(MAKE) -C $(POCO_BASE)/PDF/testsuite clean
$(MAKE) -C $(POCO_BASE)/PDF/samples clean
clean: cleans CppUnit-clean
distclean:
rm -rf $(POCO_BUILD)/lib
find $(POCO_BUILD) -name obj -type d -print0 | xargs -0 rm -rf
find $(POCO_BUILD) -name .dep -type d -print0 | xargs -0 rm -rf
find $(POCO_BUILD) -name bin -type d -print0 | xargs -0 rm -rf