PageRenderTime 650ms CodeModel.GetById 152ms app.highlight 367ms RepoModel.GetById 117ms app.codeStats 2ms

/Makefile.am

http://github.com/mozy/mordor
Makefile | 439 lines | 398 code | 40 blank | 1 comment | 10 complexity | f53f78e8d7f15569e0a1542357daf37c MD5 | raw file
  1ACLOCAL_AMFLAGS=-I m4
  2AUTOMAKE_OPTIONS=nostdinc subdir-objects
  3AM_CPPFLAGS=$(OPENSSL_INCLUDES) $(BOOST_CPPFLAGS) $(POSTGRESQL_CFLAGS) $(INCICONV) $(VALGRIND_CPPFLAGS) -I$(top_srcdir) -I$(top_builddir)
  4AM_CXXFLAGS=-Wall -Werror -fno-strict-aliasing
  5
  6nobase_include_HEADERS=			\
  7	mordor/anymap.h			\
  8	mordor/assert.h			\
  9	mordor/atomic.h			\
 10	mordor/config.h			\
 11	mordor/coroutine.h		\
 12	mordor/cxa_exception.h	\
 13	mordor/daemon.h			\
 14	mordor/date_time.h		\
 15	mordor/endian.h			\
 16	mordor/eventloop.h		\
 17	mordor/exception.h		\
 18	mordor/factory.h		\
 19	mordor/fiber.h			\
 20	mordor/fibersynchronization.h	\
 21	mordor/future.h			\
 22	mordor/http/auth.h		\
 23	mordor/http/basic.h		\
 24	mordor/http/broker.h		\
 25	mordor/http/chunked.h		\
 26	mordor/http/client.h		\
 27	mordor/http/connection.h	\
 28	mordor/http/digest.h		\
 29	mordor/http/http.h		\
 30	mordor/http/multipart.h		\
 31	mordor/http/negotiate.h		\
 32	mordor/http/oauth.h		\
 33	mordor/http/oauth2.h	\
 34	mordor/http/parser.h		\
 35	mordor/http/proxy.h		\
 36	mordor/http/server.h		\
 37	mordor/http/servlet.h		\
 38	mordor/http/servlets/config.h	\
 39	mordor/iomanager_epoll.h	\
 40	mordor/iomanager.h		\
 41	mordor/iomanager_kqueue.h	\
 42	mordor/json.h			\
 43	mordor/log.h			\
 44	mordor/main.h			\
 45	mordor/openssl_lock.h		\
 46	mordor/parallel.h		\
 47	mordor/pq/connection.h		\
 48	mordor/pq/connectionpool.h	\
 49	mordor/pq/exception.h		\
 50	mordor/pq/preparedstatement.h	\
 51	mordor/pq/result.h		\
 52	mordor/pq/transaction.h		\
 53	mordor/predef.h			\
 54	mordor/protobuf.h 		\
 55	mordor/ragel.h			\
 56	mordor/scheduler.h		\
 57	mordor/semaphore.h		\
 58	mordor/sleep.h			\
 59	mordor/socket.h			\
 60	mordor/socks.h			\
 61	mordor/statistics.h		\
 62	mordor/streams/buffered.h	\
 63	mordor/streams/buffer.h		\
 64	mordor/streams/cat.h		\
 65	mordor/streams/counter.h	\
 66	mordor/streams/deflate.h	\
 67	mordor/streams/duplex.h		\
 68	mordor/streams/fd.h		\
 69	mordor/streams/file.h		\
 70	mordor/streams/filter.h		\
 71	mordor/streams/gzip.h		\
 72	mordor/streams/hash.h		\
 73	mordor/streams/hashfwd.h	\
 74	mordor/streams/http.h		\
 75	mordor/streams/limited.h	\
 76	mordor/streams/memory.h		\
 77	mordor/streams/notify.h		\
 78	mordor/streams/null.h		\
 79	mordor/streams/pipe.h		\
 80	mordor/streams/progress.h	\
 81	mordor/streams/random.h		\
 82	mordor/streams/scheduler.h	\
 83	mordor/streams/singleplex.h	\
 84	mordor/streams/socket.h		\
 85	mordor/streams/ssl.h		\
 86	mordor/streams/std.h		\
 87	mordor/streams/stream.h		\
 88	mordor/streams/temp.h		\
 89	mordor/streams/test.h		\
 90	mordor/streams/throttle.h	\
 91	mordor/streams/timeout.h	\
 92	mordor/streams/transfer.h	\
 93	mordor/streams/zero.h		\
 94	mordor/streams/zlib.h		\
 95	mordor/streams/crypto.h		\
 96	mordor/streams/lzma2.h		\
 97	mordor/string.h			\
 98	mordor/test/antxmllistener.h	\
 99	mordor/test/compoundlistener.h	\
100	mordor/test/stdoutlistener.h	\
101	mordor/test/test.h		\
102	mordor/thread.h			\
103	mordor/thread_local_storage.h	\
104	mordor/timer.h			\
105	mordor/uri.h			\
106	mordor/util.h			\
107	mordor/version.h		\
108	mordor/workerpool.h		\
109	mordor/xml/parser.h		\
110	mordor/xml/dom_parser.h		\
111	mordor/yaml.h			\
112	mordor/zip.h
113
114lib_LTLIBRARIES=mordor/libmordor.la mordor/test/libmordortest.la
115
116mordor_libmordor_la_SOURCES=			\
117	mordor/assert.cpp			\
118	mordor/config.cpp			\
119	mordor/cxa_exception.cpp	\
120	mordor/daemon.cpp			\
121	mordor/date_time.cpp			\
122	mordor/exception.cpp			\
123	mordor/fiber.cpp			\
124	mordor/fibersynchronization.cpp		\
125	mordor/http/auth.cpp			\
126	mordor/http/basic.cpp			\
127	mordor/http/broker.cpp			\
128	mordor/http/chunked.cpp			\
129	mordor/http/client.cpp			\
130	mordor/http/connection.cpp		\
131	mordor/http/digest.cpp			\
132	mordor/http/http.cpp			\
133	mordor/http/http_parser.cpp		\
134	mordor/http/multipart.cpp		\
135	mordor/http/oauth.cpp			\
136	mordor/http/oauth2.cpp			\
137	mordor/http/proxy.cpp			\
138	mordor/http/server.cpp			\
139	mordor/http/servlet.cpp			\
140	mordor/http/servlets/config.cpp		\
141	mordor/iomanager_epoll.cpp		\
142	mordor/iomanager_kqueue.cpp		\
143	mordor/json.cpp				\
144	mordor/log.cpp				\
145	mordor/openssl_lock.cpp			\
146	mordor/parallel.cpp			\
147	mordor/ragel.cpp			\
148	mordor/scheduler.cpp			\
149	mordor/semaphore.cpp			\
150	mordor/sleep.cpp			\
151	mordor/socket.cpp			\
152	mordor/socks.cpp			\
153	mordor/statistics.cpp			\
154	mordor/streams/buffer.cpp		\
155	mordor/streams/buffered.cpp		\
156	mordor/streams/cat.cpp			\
157	mordor/streams/counter.cpp		\
158	mordor/streams/fd.cpp			\
159	mordor/streams/file.cpp			\
160	mordor/streams/filter.cpp		\
161	mordor/streams/hash.cpp			\
162	mordor/streams/http.cpp			\
163	mordor/streams/limited.cpp		\
164	mordor/streams/memory.cpp		\
165	mordor/streams/null.cpp			\
166	mordor/streams/pipe.cpp			\
167	mordor/streams/random.cpp		\
168	mordor/streams/singleplex.cpp		\
169	mordor/streams/socket.cpp		\
170	mordor/streams/ssl.cpp			\
171	mordor/streams/std.cpp			\
172	mordor/streams/stream.cpp		\
173	mordor/streams/temp.cpp			\
174	mordor/streams/timeout.cpp		\
175	mordor/streams/test.cpp			\
176	mordor/streams/throttle.cpp		\
177	mordor/streams/transfer.cpp		\
178	mordor/streams/zero.cpp			\
179	mordor/streams/zlib.cpp			\
180	mordor/streams/crypto.cpp		\
181	mordor/string.cpp			\
182	mordor/thread.cpp			\
183	mordor/timer.cpp			\
184	mordor/uri.cpp				\
185	mordor/util.cpp				\
186	mordor/workerpool.cpp			\
187	mordor/xml/dom_parser.cpp		\
188	mordor/xml/xml_parser.cpp		\
189	mordor/zip.cpp
190
191mordor_libmordor_la_CPPFLAGS=-I$(top_srcdir) -include mordor/pch.h $(AM_CPPFLAGS)
192mordor_libmordor_la_LDFLAGS=			\
193	$(OPENSSL_LDFLAGS)			\
194	$(BOOST_LDFLAGS)			\
195	$(LZMA_LDFLAGS)				\
196	$(CORESERVICES_FRAMEWORK_LIBS)		\
197	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
198	$(SECURITY_FRAMEWORK_LIBS)		\
199	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)	\
200	-version-info $(LIBMORDOR_SO_VERSION)
201mordor_libmordor_la_LIBADD = \
202	$(OPENSSL_LIBS) 		\
203	$(BOOST_REGEX_LIB)			\
204	$(BOOST_THREAD_LIB)			\
205	$(BOOST_SYSTEM_LIB)			\
206	$(LZMA_LIB)					\
207	$(LTLIBICONV)
208
209if HAVE_LZMA
210mordor_libmordor_la_SOURCES += \
211	mordor/streams/lzma2.cpp
212mordor_libmordor_la_CFLAGS = $(AM_CFLAGS) $(LZMA_CFLAGS)
213endif
214
215if HAVE_POSTGRESQL
216    lib_LTLIBRARIES+=mordor/pq/libmordorpq.la
217endif
218
219mordor_pq_libmordorpq_la_SOURCES=		\
220	mordor/pq/connection.cpp		\
221	mordor/pq/connectionpool.cpp		\
222	mordor/pq/copy.cpp			\
223	mordor/pq/exception.cpp			\
224	mordor/pq/preparedstatement.cpp		\
225	mordor/pq/result.cpp			\
226	mordor/pq/transaction.cpp
227
228mordor_pq_libmordorpq_la_CPPFLAGS=-I$(top_srcdir) -include mordor/pch.h $(AM_CPPFLAGS)
229mordor_pq_libmordorpq_la_LDFLAGS=$(POSTGRESQL_LDFLAGS)
230mordor_pq_libmordorpq_la_LIBADD=mordor/libmordor.la
231
232if HAVE_PROTOBUF
233    lib_LTLIBRARIES+=mordor/libmordorprotobuf.la
234endif
235
236mordor_libmordorprotobuf_la_SOURCES=mordor/protobuf.cpp
237mordor_libmordorprotobuf_la_LDFLAGS=$(PROTOBUF_LIBS)
238mordor_libmordorprotobuf_la_CPPFLAGS=-I$(top_srcdir) $(PROTOBUF_CFLAGS) $(AM_CPPFLAGS)
239mordor_libmordorprotobuf_la_LIBADD=mordor/libmordor.la
240
241if HAVE_LIBYAML
242    lib_LTLIBRARIES+=mordor/libmordoryaml.la
243endif
244
245mordor_libmordoryaml_la_SOURCES=mordor/yaml.cpp
246mordor_libmordoryaml_la_LDFLAGS=$(LIBYAML)
247mordor_libmordoryaml_la_CPPFLAGS=-I$(top_srcdir) $(AM_CPPFLAGS)
248mordor_libmordoryaml_la_LIBADD=mordor/libmordor.la
249
250pkgconfigdir=$(libdir)/pkgconfig
251pkgconfig_DATA=mordor/libmordor.pc mordor/test/libmordortest.pc
252
253if HAVE_POSTGRESQL
254	pkgconfig_DATA+=mordor/pq/libmordorpq.pc
255endif
256
257if HAVE_PROTOBUF
258	pkgconfig_DATA+=mordor/libmordorprotobuf.pc
259endif
260
261if HAVE_LIBYAML
262	pkgconfig_DATA+=mordor/libmordoryaml.pc
263endif
264
265SUFFIXES=.rl
266
267.rl.cpp:
268	$(RAGEL) $(RAGELFLAGS) -C $< -o $@
269
270# Objects specifically depend on the PCH
271$(mordor_libmordor_la_OBJECTS): mordor/pch.h.gch
272
273MOSTLYCLEANFILES=mordor/pch.h.gch
274CLEANFILES=				\
275	mordor/http/http_parser.cpp	\
276	mordor/json.cpp			\
277	mordor/uri.cpp			\
278	mordor/xml/xml_parser.cpp
279EXTRA_DIST=				\
280	mordor/pch.h			\
281	mordor/http/http_parser.rl	\
282	mordor/json.rl			\
283	mordor/uri.rl			\
284	mordor/xml/xml_parser.rl	\
285	mordor/examples/netbench.h
286
287mordor/pch.h.gch: mordor/pch.h
288	$(CXXCOMPILE) $(pic_flag) -x c++-header $< -o $@
289
290mordor_test_libmordortest_la_SOURCES=		\
291	mordor/test/antxmllistener.cpp		\
292	mordor/test/compoundlistener.cpp	\
293	mordor/test/stdoutlistener.cpp		\
294	mordor/test/test.cpp
295
296mordor_test_libmordortest_la_LIBADD=mordor/libmordor.la
297
298check_PROGRAMS=mordor/tests/run_tests
299mordor_tests_run_tests_SOURCES=				\
300	mordor/tests/run_tests.cpp			\
301	mordor/tests/atomic.cpp				\
302	mordor/tests/buffer.cpp				\
303	mordor/tests/buffered_stream.cpp		\
304	mordor/tests/cat_stream.cpp				\
305	mordor/tests/chunked_stream.cpp			\
306	mordor/tests/config.cpp				\
307	mordor/tests/coroutine.cpp			\
308	mordor/tests/counter_stream.cpp		\
309	mordor/tests/endian.cpp				\
310	mordor/tests/fibers.cpp				\
311	mordor/tests/fibersync.cpp			\
312	mordor/tests/file_stream.cpp			\
313	mordor/tests/fls.cpp				\
314	mordor/tests/future.cpp				\
315	mordor/tests/hash_stream.cpp			\
316	mordor/tests/hmac.cpp				\
317	mordor/tests/http_client.cpp			\
318	mordor/tests/http_parser.cpp			\
319	mordor/tests/http_proxy.cpp			\
320	mordor/tests/http_server.cpp			\
321	mordor/tests/http_servlet_dispatcher.cpp	\
322	mordor/tests/http_stream.cpp			\
323	mordor/tests/iomanager.cpp			\
324	mordor/tests/json.cpp				\
325	mordor/tests/log.cpp				\
326	mordor/tests/memory_stream.cpp			\
327	mordor/tests/notify_stream.cpp			\
328	mordor/tests/oauth.cpp				\
329	mordor/tests/pipe_stream.cpp			\
330	mordor/tests/ragel.cpp				\
331	mordor/tests/scheduler.cpp			\
332	mordor/tests/socket.cpp				\
333	mordor/tests/ssl_stream.cpp			\
334	mordor/tests/statistics.cpp			\
335	mordor/tests/stream.cpp				\
336	mordor/tests/string.cpp				\
337	mordor/tests/temp_stream.cpp			\
338	mordor/tests/thread.cpp				\
339	mordor/tests/timeout_stream.cpp			\
340	mordor/tests/timer.cpp				\
341	mordor/tests/transfer_stream.cpp		\
342	mordor/tests/uri.cpp				\
343	mordor/tests/util.cpp				\
344	mordor/tests/xml.cpp				\
345	mordor/tests/zlib.cpp				\
346	mordor/tests/unicode.cpp			\
347	mordor/tests/crypto.cpp
348
349mordor_tests_run_tests_CPPFLAGS=-I$(top_builddir) -include mordor/pch.h $(AM_CPPFLAGS)
350mordor_tests_run_tests_LDADD=mordor/libmordor.la mordor/test/libmordortest.la \
351	$(CORESERVICES_FRAMEWORK_LIBS)		\
352	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
353	$(SECURITY_FRAMEWORK_LIBS)		\
354	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)
355
356if HAVE_LIBYAML
357    mordor_tests_run_tests_LDADD+=mordor/libmordoryaml.la
358endif
359
360if HAVE_POSTGRESQL
361check_PROGRAMS+=mordor/pq/tests/run_tests
362endif
363
364mordor_pq_tests_run_tests_SOURCES = mordor/pq/tests/pq.cpp
365mordor_pq_tests_run_tests_CPPFLAGS=-include mordor/pch.h $(AM_CPPFLAGS)
366mordor_pq_tests_run_tests_LDADD =		\
367	mordor/libmordor.la			\
368	mordor/pq/libmordorpq.la 		\
369	mordor/test/libmordortest.la		\
370	$(CORESERVICES_FRAMEWORK_LIBS)		\
371	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
372	$(SECURITY_FRAMEWORK_LIBS)		\
373	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)
374
375
376noinst_PROGRAMS=			\
377	mordor/examples/cat		\
378	mordor/examples/echoserver	\
379	mordor/examples/iombench	\
380	mordor/examples/simpleappserver	\
381	mordor/examples/tunnel		\
382	mordor/examples/udpstats
383
384if HAVE_BOOST_PROGRAM_OPTIONS
385noinst_PROGRAMS += mordor/examples/wget
386endif
387
388mordor_examples_cat_SOURCES=mordor/examples/cat.cpp
389mordor_examples_cat_LDADD=mordor/libmordor.la	\
390	$(CORESERVICES_FRAMEWORK_LIBS)		\
391	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
392	$(SECURITY_FRAMEWORK_LIBS)		\
393	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)
394
395
396mordor_examples_echoserver_SOURCES=mordor/examples/echoserver.cpp
397mordor_examples_echoserver_LDADD=mordor/libmordor.la \
398	$(CORESERVICES_FRAMEWORK_LIBS)		\
399	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
400	$(SECURITY_FRAMEWORK_LIBS)		\
401	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)
402
403mordor_examples_iombench_SOURCES=	\
404	mordor/examples/iombench.cpp	\
405	mordor/examples/netbench.cpp
406mordor_examples_iombench_LDADD=mordor/libmordor.la	\
407	$(CORESERVICES_FRAMEWORK_LIBS)		\
408	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
409	$(SECURITY_FRAMEWORK_LIBS)		\
410	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)
411
412
413mordor_examples_simpleappserver_SOURCES=mordor/examples/simpleappserver.cpp
414mordor_examples_simpleappserver_LDADD=mordor/libmordor.la	\
415	$(CORESERVICES_FRAMEWORK_LIBS)		\
416	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
417	$(SECURITY_FRAMEWORK_LIBS)		\
418	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)
419
420mordor_examples_tunnel_SOURCES=mordor/examples/tunnel.cpp
421mordor_examples_tunnel_LDADD=mordor/libmordor.la	\
422	$(CORESERVICES_FRAMEWORK_LIBS)		\
423	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
424	$(SECURITY_FRAMEWORK_LIBS)		\
425	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)
426
427mordor_examples_udpstats_SOURCES=mordor/examples/udpstats.cpp
428mordor_examples_udpstats_LDADD=mordor/libmordor.la	\
429	$(CORESERVICES_FRAMEWORK_LIBS)		\
430	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
431	$(SECURITY_FRAMEWORK_LIBS)		\
432	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)
433
434mordor_examples_wget_SOURCES=mordor/examples/wget.cpp
435mordor_examples_wget_LDADD=mordor/libmordor.la $(BOOST_PROGRAM_OPTIONS_LIB)	\
436	$(CORESERVICES_FRAMEWORK_LIBS)		\
437	$(COREFOUNDATION_FRAMEWORK_LIBS)	\
438	$(SECURITY_FRAMEWORK_LIBS)		\
439	$(SYSTEMCONFIGURATION_FRAMEWORK_LIBS)