/Makefile.am

http://github.com/mozy/mordor · Makefile · 439 lines · 398 code · 40 blank · 1 comment · 10 complexity · f53f78e8d7f15569e0a1542357daf37c MD5 · raw file

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