Makefile.am 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. # This Makefile.am is in the public domain
  2. AM_CPPFLAGS = -I$(top_srcdir)/src/include
  3. plugindir = $(libdir)/gnunet
  4. libexecdir= $(pkglibdir)/libexec/
  5. pkgcfgdir= $(pkgdatadir)/config.d/
  6. dist_pkgcfg_DATA = \
  7. util.conf
  8. pkgcfg_DATA = \
  9. resolver.conf
  10. if MINGW
  11. noinst_LTLIBRARIES = \
  12. libgnunetutilwin.la
  13. libgnunetutilwin_la_SOURCES = \
  14. win.c \
  15. winproc.c
  16. libgnunetutilwin_la_LDFLAGS = \
  17. -no-undefined -Wl,--export-all-symbols
  18. libgnunetutilwin_la_LIBADD = \
  19. -lshell32 -liconv -lstdc++ \
  20. -lcomdlg32 -lgdi32 -liphlpapi
  21. WINLIB = libgnunetutilwin.la
  22. W32CAT = w32cat
  23. W32CONSOLEHELPER = gnunet-helper-w32-console
  24. endif
  25. if !MINGW
  26. TEST_CLIENT_UNIX_NC = test_client_unix.nc
  27. else
  28. TEST_CLIENT_UNIX_NC =
  29. endif
  30. if USE_COVERAGE
  31. AM_CFLAGS = --coverage -O0
  32. XLIB = -lgcov
  33. endif
  34. if ENABLE_BENCHMARK
  35. BENCHMARK = benchmark.c benchmark.h
  36. PTHREAD = -lpthread
  37. endif
  38. w32cat_SOURCES = w32cat.c
  39. gnunet_helper_w32_console_SOURCES = \
  40. gnunet-helper-w32-console.c \
  41. gnunet-helper-w32-console.h
  42. gnunet_helper_w32_console_LDADD = \
  43. libgnunetutil.la
  44. gnunet_config_diff_SOURCES = \
  45. gnunet-config-diff.c
  46. gnunet_config_diff_LDADD = \
  47. libgnunetutil.la
  48. test_common_logging_dummy_SOURCES = \
  49. test_common_logging_dummy.c
  50. test_common_logging_dummy_LDADD = \
  51. libgnunetutil.la
  52. libgnunetutil_la_SOURCES = \
  53. bandwidth.c \
  54. $(BENCHMARK) \
  55. bio.c \
  56. client.c \
  57. common_allocation.c \
  58. common_endian.c \
  59. common_logging.c \
  60. configuration.c \
  61. configuration_loader.c \
  62. container_bloomfilter.c \
  63. container_heap.c \
  64. container_meta_data.c \
  65. container_multihashmap.c \
  66. container_multishortmap.c \
  67. container_multipeermap.c \
  68. container_multihashmap32.c \
  69. crypto_symmetric.c \
  70. crypto_crc.c \
  71. crypto_ecc.c \
  72. crypto_ecc_dlog.c \
  73. crypto_ecc_setup.c \
  74. crypto_hash.c \
  75. crypto_hash_file.c \
  76. crypto_hkdf.c \
  77. crypto_kdf.c \
  78. crypto_mpi.c \
  79. crypto_paillier.c \
  80. crypto_random.c \
  81. crypto_rsa.c \
  82. disk.c \
  83. disk.h \
  84. dnsparser.c \
  85. dnsstub.c \
  86. getopt.c \
  87. getopt_helpers.c \
  88. helper.c \
  89. load.c \
  90. mst.c \
  91. mq.c \
  92. nc.c \
  93. network.c \
  94. op.c \
  95. os_installation.c \
  96. os_network.c \
  97. os_priority.c \
  98. peer.c \
  99. plugin.c \
  100. program.c \
  101. regex.c \
  102. resolver_api.c resolver.h \
  103. scheduler.c \
  104. service.c \
  105. signal.c \
  106. strings.c \
  107. time.c \
  108. tun.c \
  109. speedup.c speedup.h \
  110. proc_compat.c
  111. if HAVE_LIBATOMIC
  112. if DARWIN
  113. LIBATOMIC=
  114. else
  115. LIBATOMIC= -latomic
  116. endif
  117. else
  118. LIBATOMIC=
  119. endif
  120. if HAVE_LIBIDN
  121. LIBIDN= -lidn
  122. else
  123. LIBIDN=
  124. endif
  125. if HAVE_LIBIDN2
  126. LIBIDN2= -lidn2
  127. else
  128. LIBIDN2=
  129. endif
  130. libgnunetutil_la_LIBADD = \
  131. $(GCLIBADD) $(WINLIB) \
  132. $(LIBATOMIC) \
  133. $(LIBGCRYPT_LIBS) \
  134. $(LTLIBICONV) \
  135. $(LTLIBINTL) \
  136. -lltdl \
  137. $(LIBIDN) $(LIBIDN2) \
  138. $(Z_LIBS) \
  139. -lunistring \
  140. $(XLIB) \
  141. $(PTHREAD)
  142. libgnunetutil_la_LDFLAGS = \
  143. $(GN_LIB_LDFLAGS) \
  144. -version-info 13:0:0
  145. libgnunetutil_taler_wallet_la_SOURCES = \
  146. common_allocation.c \
  147. common_endian.c \
  148. common_logging.c \
  149. container_heap.c \
  150. container_multihashmap.c \
  151. container_multihashmap32.c \
  152. crypto_symmetric.c \
  153. crypto_crc.c \
  154. crypto_ecc.c \
  155. crypto_hash.c \
  156. crypto_hkdf.c \
  157. crypto_kdf.c \
  158. crypto_mpi.c \
  159. crypto_random.c \
  160. crypto_rsa.c \
  161. strings.c \
  162. time.c
  163. libgnunetutil_taler_wallet_la_LIBADD = \
  164. $(LIBGCRYPT_LIBS) \
  165. -lunistring
  166. libgnunetutil_taler_wallet_la_LDFLAGS = \
  167. $(GN_LIB_LDFLAGS) \
  168. -version-info 0:0:0
  169. if HAVE_TESTING
  170. GNUNET_ECC = gnunet-ecc
  171. GNUNET_SCRYPT = gnunet-scrypt
  172. endif
  173. if TALER_ONLY
  174. lib_LTLIBRARIES = libgnunetutil_taler_wallet.la
  175. else
  176. lib_LTLIBRARIES = libgnunetutil.la
  177. libexec_PROGRAMS = \
  178. gnunet-service-resolver \
  179. gnunet-timeout \
  180. $(W32CONSOLEHELPER)
  181. bin_PROGRAMS = \
  182. gnunet-resolver \
  183. gnunet-config \
  184. $(GNUNET_ECC) \
  185. $(GNUNET_SCRYPT) \
  186. gnunet-uri
  187. if HAVE_ZBAR
  188. bin_PROGRAMS += gnunet-qr
  189. endif
  190. noinst_PROGRAMS = \
  191. gnunet-config-diff \
  192. $(W32CAT) \
  193. test_common_logging_dummy
  194. if ENABLE_TEST_RUN
  195. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  196. TESTS = $(check_PROGRAMS)
  197. endif
  198. endif
  199. if !MINGW
  200. gnunet_timeout_SOURCES = \
  201. gnunet-timeout.c
  202. else
  203. gnunet_timeout_SOURCES = \
  204. gnunet-timeout-w32.c
  205. endif
  206. gnunet_service_resolver_SOURCES = \
  207. gnunet-service-resolver.c
  208. gnunet_service_resolver_LDADD = \
  209. libgnunetutil.la \
  210. $(GN_LIBINTL)
  211. if HAVE_GETADDRINFO_A
  212. gnunet_service_resolver_LDADD += -lanl
  213. endif
  214. gnunet_resolver_SOURCES = \
  215. gnunet-resolver.c
  216. gnunet_resolver_LDADD = \
  217. libgnunetutil.la \
  218. $(GN_LIBINTL)
  219. gnunet_ecc_SOURCES = \
  220. gnunet-ecc.c
  221. gnunet_ecc_LDADD = \
  222. libgnunetutil.la \
  223. $(GN_LIBINTL) -lgcrypt
  224. gnunet_scrypt_SOURCES = \
  225. gnunet-scrypt.c
  226. gnunet_scrypt_LDADD = \
  227. libgnunetutil.la \
  228. $(GN_LIBINTL) -lgcrypt
  229. gnunet_config_SOURCES = \
  230. gnunet-config.c
  231. gnunet_config_LDADD = \
  232. libgnunetutil.la \
  233. $(GN_LIBINTL)
  234. gnunet_uri_SOURCES = \
  235. gnunet-uri.c
  236. gnunet_uri_LDADD = \
  237. libgnunetutil.la \
  238. $(GN_LIBINTL)
  239. gnunet_qr_SOURCES = \
  240. gnunet-qr.c
  241. gnunet_qr_LDADD = \
  242. libgnunetutil.la \
  243. $(GN_LIBINTL)
  244. gnunet_qr_LDFLAGS= \
  245. -lzbar
  246. plugin_LTLIBRARIES = \
  247. libgnunet_plugin_test.la
  248. libgnunet_plugin_test_la_SOURCES = \
  249. test_plugin_plug.c
  250. libgnunet_plugin_test_la_LDFLAGS = \
  251. $(GN_PLUGIN_LDFLAGS)
  252. if HAVE_BENCHMARKS
  253. BENCHMARKS = \
  254. perf_crypto_hash \
  255. perf_crypto_ecc_dlog \
  256. perf_crypto_rsa \
  257. perf_crypto_paillier \
  258. perf_crypto_symmetric \
  259. perf_crypto_asymmetric \
  260. perf_malloc
  261. endif
  262. if HAVE_SSH_KEY
  263. # SSH_USING_TESTS = test_socks.nc
  264. endif
  265. check_PROGRAMS = \
  266. test_bio \
  267. test_client.nc \
  268. $(TEST_CLIENT_UNIX_NC) \
  269. test_common_allocation \
  270. test_common_endian \
  271. test_common_logging \
  272. test_configuration \
  273. test_container_bloomfilter \
  274. test_container_dll \
  275. test_container_meta_data \
  276. test_container_multihashmap \
  277. test_container_multihashmap32 \
  278. test_container_multipeermap \
  279. test_container_heap \
  280. test_crypto_symmetric \
  281. test_crypto_crc \
  282. test_crypto_ecdsa \
  283. test_crypto_eddsa \
  284. test_crypto_ecdhe \
  285. test_crypto_ecdh_eddsa \
  286. test_crypto_ecc_dlog \
  287. test_crypto_hash \
  288. test_crypto_hash_context \
  289. test_crypto_hkdf \
  290. test_crypto_kdf \
  291. test_crypto_paillier \
  292. test_crypto_random \
  293. test_crypto_rsa \
  294. test_disk \
  295. test_getopt \
  296. test_hexcoder \
  297. test_mq \
  298. test_os_network \
  299. test_peer \
  300. test_plugin \
  301. test_program \
  302. test_regex \
  303. test_resolver_api.nc \
  304. test_scheduler \
  305. test_scheduler_delay \
  306. test_service \
  307. test_strings \
  308. test_strings_to_data \
  309. test_speedup \
  310. test_time \
  311. test_tun \
  312. $(BENCHMARKS) \
  313. test_os_start_process \
  314. test_common_logging_runtime_loglevels
  315. # Declare .nc (NO-CONCURRENCY) as a test extension so that we can impart
  316. # sequential execution order for them
  317. TEST_EXTENSIONS = .nc
  318. test_test_client_unix.log: test_client.log
  319. test_bio_SOURCES = \
  320. test_bio.c
  321. test_bio_LDADD = \
  322. libgnunetutil.la
  323. test_hexcoder_SOURCES = \
  324. test_hexcoder.c
  325. test_hexcoder_LDADD = \
  326. libgnunetutil.la
  327. test_tun_SOURCES = \
  328. test_tun.c
  329. test_tun_LDADD = \
  330. libgnunetutil.la
  331. test_regex_SOURCES = \
  332. test_regex.c
  333. test_regex_LDADD = \
  334. libgnunetutil.la
  335. test_os_start_process_SOURCES = \
  336. test_os_start_process.c
  337. test_os_start_process_LDADD = \
  338. libgnunetutil.la
  339. test_os_start_process_DEPENDENCIES = \
  340. libgnunetutil.la \
  341. $(WINCAT)
  342. test_client_nc_SOURCES = \
  343. test_client.c
  344. test_client_nc_LDADD = \
  345. libgnunetutil.la
  346. test_client_unix_nc_SOURCES = \
  347. test_client.c
  348. test_client_unix_nc_LDADD = \
  349. libgnunetutil.la
  350. #test_socks_nc_SOURCES = \
  351. # test_socks.c
  352. #test_socks_nc_LDADD = \
  353. # libgnunetutil.la
  354. test_common_allocation_SOURCES = \
  355. test_common_allocation.c
  356. test_common_allocation_LDADD = \
  357. libgnunetutil.la
  358. test_common_endian_SOURCES = \
  359. test_common_endian.c
  360. test_common_endian_LDADD = \
  361. libgnunetutil.la
  362. test_common_logging_SOURCES = \
  363. test_common_logging.c
  364. test_common_logging_LDADD = \
  365. libgnunetutil.la
  366. test_common_logging_runtime_loglevels_SOURCES = \
  367. test_common_logging_runtime_loglevels.c
  368. test_common_logging_runtime_loglevels_LDADD = \
  369. libgnunetutil.la
  370. test_configuration_SOURCES = \
  371. test_configuration.c
  372. test_configuration_LDADD = \
  373. libgnunetutil.la
  374. test_container_bloomfilter_SOURCES = \
  375. test_container_bloomfilter.c
  376. test_container_bloomfilter_LDADD = \
  377. libgnunetutil.la
  378. test_container_dll_SOURCES = \
  379. test_container_dll.c
  380. test_container_dll_LDADD = \
  381. libgnunetutil.la
  382. test_container_meta_data_SOURCES = \
  383. test_container_meta_data.c
  384. test_container_meta_data_LDADD = \
  385. libgnunetutil.la
  386. test_container_multihashmap_SOURCES = \
  387. test_container_multihashmap.c
  388. test_container_multihashmap_LDADD = \
  389. libgnunetutil.la
  390. test_container_multihashmap32_SOURCES = \
  391. test_container_multihashmap32.c
  392. test_container_multihashmap32_LDADD = \
  393. libgnunetutil.la
  394. test_container_multipeermap_SOURCES = \
  395. test_container_multipeermap.c
  396. test_container_multipeermap_LDADD = \
  397. libgnunetutil.la
  398. test_container_heap_SOURCES = \
  399. test_container_heap.c
  400. test_container_heap_LDADD = \
  401. libgnunetutil.la
  402. test_crypto_symmetric_SOURCES = \
  403. test_crypto_symmetric.c
  404. test_crypto_symmetric_LDADD = \
  405. libgnunetutil.la
  406. test_crypto_crc_SOURCES = \
  407. test_crypto_crc.c
  408. test_crypto_crc_LDADD = \
  409. libgnunetutil.la
  410. test_crypto_ecdsa_SOURCES = \
  411. test_crypto_ecdsa.c
  412. test_crypto_ecdsa_LDADD = \
  413. libgnunetutil.la \
  414. $(LIBGCRYPT_LIBS)
  415. test_crypto_eddsa_SOURCES = \
  416. test_crypto_eddsa.c
  417. test_crypto_eddsa_LDADD = \
  418. libgnunetutil.la \
  419. $(LIBGCRYPT_LIBS)
  420. test_crypto_ecc_dlog_SOURCES = \
  421. test_crypto_ecc_dlog.c
  422. test_crypto_ecc_dlog_LDADD = \
  423. libgnunetutil.la \
  424. $(LIBGCRYPT_LIBS)
  425. test_crypto_ecdhe_SOURCES = \
  426. test_crypto_ecdhe.c
  427. test_crypto_ecdhe_LDADD = \
  428. libgnunetutil.la \
  429. $(LIBGCRYPT_LIBS)
  430. test_crypto_ecdh_eddsa_SOURCES = \
  431. test_crypto_ecdh_eddsa.c
  432. test_crypto_ecdh_eddsa_LDADD = \
  433. libgnunetutil.la \
  434. $(LIBGCRYPT_LIBS)
  435. test_crypto_hash_SOURCES = \
  436. test_crypto_hash.c
  437. test_crypto_hash_LDADD = \
  438. libgnunetutil.la
  439. test_crypto_hash_context_SOURCES = \
  440. test_crypto_hash_context.c
  441. test_crypto_hash_context_LDADD = \
  442. libgnunetutil.la
  443. test_crypto_hkdf_SOURCES = \
  444. test_crypto_hkdf.c
  445. test_crypto_hkdf_LDADD = \
  446. libgnunetutil.la
  447. test_crypto_kdf_SOURCES = \
  448. test_crypto_kdf.c
  449. test_crypto_kdf_LDADD = \
  450. libgnunetutil.la -lgcrypt
  451. test_crypto_paillier_SOURCES = \
  452. test_crypto_paillier.c
  453. test_crypto_paillier_LDADD = \
  454. $(LIBGCRYPT_LIBS) \
  455. libgnunetutil.la
  456. test_crypto_random_SOURCES = \
  457. test_crypto_random.c
  458. test_crypto_random_LDADD = \
  459. libgnunetutil.la
  460. test_crypto_rsa_SOURCES = \
  461. test_crypto_rsa.c
  462. test_crypto_rsa_LDADD = \
  463. libgnunetutil.la -lgcrypt
  464. test_disk_SOURCES = \
  465. test_disk.c
  466. test_disk_LDADD = \
  467. libgnunetutil.la
  468. test_getopt_SOURCES = \
  469. test_getopt.c
  470. test_getopt_LDADD = \
  471. libgnunetutil.la
  472. test_mq_SOURCES = \
  473. test_mq.c
  474. test_mq_LDADD = \
  475. libgnunetutil.la
  476. test_os_network_SOURCES = \
  477. test_os_network.c
  478. test_os_network_LDADD = \
  479. libgnunetutil.la
  480. test_peer_SOURCES = \
  481. test_peer.c
  482. test_peer_LDADD = \
  483. libgnunetutil.la -lgcrypt
  484. test_plugin_SOURCES = \
  485. test_plugin.c
  486. test_plugin_LDADD = \
  487. libgnunetutil.la
  488. test_program_SOURCES = \
  489. test_program.c
  490. test_program_LDADD = \
  491. libgnunetutil.la
  492. test_resolver_api_nc_SOURCES = \
  493. test_resolver_api.c
  494. test_resolver_api_nc_LDADD = \
  495. libgnunetutil.la
  496. test_scheduler_SOURCES = \
  497. test_scheduler.c
  498. test_scheduler_LDADD = \
  499. libgnunetutil.la
  500. test_scheduler_delay_SOURCES = \
  501. test_scheduler_delay.c
  502. test_scheduler_delay_LDADD = \
  503. libgnunetutil.la
  504. test_service_SOURCES = \
  505. test_service.c
  506. test_service_LDADD = \
  507. libgnunetutil.la
  508. test_strings_SOURCES = \
  509. test_strings.c
  510. test_strings_LDADD = \
  511. libgnunetutil.la
  512. test_strings_to_data_SOURCES = \
  513. test_strings_to_data.c
  514. test_strings_to_data_LDADD = \
  515. libgnunetutil.la
  516. test_time_SOURCES = \
  517. test_time.c
  518. test_time_LDADD = \
  519. libgnunetutil.la
  520. test_speedup_SOURCES = \
  521. test_speedup.c
  522. test_speedup_LDADD = \
  523. libgnunetutil.la
  524. perf_crypto_hash_SOURCES = \
  525. perf_crypto_hash.c
  526. perf_crypto_hash_LDADD = \
  527. libgnunetutil.la
  528. perf_crypto_ecc_dlog_SOURCES = \
  529. perf_crypto_ecc_dlog.c
  530. perf_crypto_ecc_dlog_LDADD = \
  531. libgnunetutil.la \
  532. -lgcrypt
  533. perf_crypto_rsa_SOURCES = \
  534. perf_crypto_rsa.c
  535. perf_crypto_rsa_LDADD = \
  536. libgnunetutil.la
  537. perf_crypto_symmetric_SOURCES = \
  538. perf_crypto_symmetric.c
  539. perf_crypto_symmetric_LDADD = \
  540. libgnunetutil.la
  541. perf_crypto_asymmetric_SOURCES = \
  542. perf_crypto_asymmetric.c
  543. perf_crypto_asymmetric_LDADD = \
  544. libgnunetutil.la
  545. perf_crypto_paillier_SOURCES = \
  546. perf_crypto_paillier.c
  547. perf_crypto_paillier_LDADD = \
  548. libgnunetutil.la \
  549. -lgcrypt
  550. perf_malloc_SOURCES = \
  551. perf_malloc.c
  552. perf_malloc_LDADD = \
  553. libgnunetutil.la
  554. EXTRA_DIST = \
  555. test_client_data.conf \
  556. test_client_unix.conf \
  557. test_configuration_data.conf \
  558. test_program_data.conf \
  559. test_resolver_api_data.conf \
  560. test_service_data.conf \
  561. test_speedup_data.conf