Makefile.am 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. # This Makefile.am is in the public domain
  2. AM_CPPFLAGS = -I$(top_srcdir)/src/include
  3. if HAVE_GLIBCNSS
  4. NSS_SUBDIR = nss
  5. endif
  6. SUBDIRS = . $(NSS_SUBDIR)
  7. pkgdata_DATA = \
  8. gnunet-gns-proxy-ca.template
  9. if HAVE_LIBIDN
  10. LIBIDN= -lidn
  11. else
  12. LIBIDN=
  13. endif
  14. if HAVE_LIBIDN2
  15. LIBIDN2= -lidn2
  16. else
  17. LIBIDN2=
  18. endif
  19. EXTRA_DIST = \
  20. test_gns_defaults.conf \
  21. test_gns_lookup.conf \
  22. test_gns_proxy.conf \
  23. test_gns_simple_lookup.conf \
  24. openssl.cnf \
  25. gnunet-gns-proxy-setup-ca.in \
  26. zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey \
  27. zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
  28. zonefiles/test_zonekey \
  29. $(check_SCRIPTS) \
  30. $(pkgdata_DATA) \
  31. test_gnunet_gns.sh.in
  32. USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la
  33. if USE_COVERAGE
  34. AM_CFLAGS = --coverage -O0
  35. endif
  36. pkgcfgdir = $(pkgdatadir)/config.d/
  37. libexecdir= $(pkglibdir)/libexec/
  38. plugindir = $(libdir)/gnunet
  39. pkgcfg_DATA = \
  40. gns.conf
  41. lib_LTLIBRARIES = \
  42. libgnunetgns.la
  43. if HAVE_MHD
  44. if HAVE_GNUTLS
  45. if HAVE_LIBGNURL
  46. DO_PROXY=gnunet-gns-proxy
  47. LIB_GNURL=@LIBGNURL@
  48. CPP_GNURL=@LIBGNURL_CPPFLAGS@
  49. else
  50. if HAVE_LIBCURL
  51. DO_PROXY=gnunet-gns-proxy
  52. LIB_GNURL=@LIBCURL@
  53. CPP_GNURL=@LIBCURL_CPPFLAGS@
  54. endif
  55. endif
  56. endif
  57. endif
  58. libexec_PROGRAMS = \
  59. gnunet-service-gns \
  60. gnunet-dns2gns \
  61. $(DO_PROXY)
  62. bin_PROGRAMS = \
  63. gnunet-gns
  64. noinst_PROGRAMS = \
  65. gnunet-gns-benchmark
  66. if HAVE_MHD
  67. if LINUX
  68. bin_PROGRAMS += gnunet-bcd
  69. endif
  70. endif
  71. if HAVE_MHD
  72. if HAVE_JSON
  73. REST_PLUGIN = libgnunet_plugin_rest_gns.la
  74. endif
  75. endif
  76. plugin_LTLIBRARIES = \
  77. libgnunet_plugin_block_gns.la \
  78. libgnunet_plugin_gnsrecord_gns.la \
  79. $(REST_PLUGIN)
  80. bin_SCRIPTS = \
  81. gnunet-gns-proxy-setup-ca
  82. gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile
  83. $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca
  84. @chmod +x gnunet-gns-proxy-setup-ca
  85. test_gnunet_gns.sh: test_gnunet_gns.sh.in Makefile
  86. $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/test_gnunet_gns.sh.in > test_gnunet_gns.sh
  87. @chmod +x test_gnunet_gns.sh
  88. CLEANFILES = test_gnunet_gns.sh
  89. libgnunet_plugin_rest_gns_la_SOURCES = \
  90. plugin_rest_gns.c
  91. libgnunet_plugin_rest_gns_la_LIBADD = \
  92. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  93. libgnunetgns.la \
  94. $(top_builddir)/src/rest/libgnunetrest.la \
  95. $(top_builddir)/src/identity/libgnunetidentity.la \
  96. $(top_builddir)/src/json/libgnunetjson.la \
  97. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
  98. $(LTLIBINTL) -ljansson $(MHD_LIBS)
  99. libgnunet_plugin_rest_gns_la_LDFLAGS = \
  100. $(GN_PLUGIN_LDFLAGS)
  101. libgnunet_plugin_rest_gns_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
  102. libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
  103. plugin_gnsrecord_gns.c
  104. libgnunet_plugin_gnsrecord_gns_la_LIBADD = \
  105. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  106. $(top_builddir)/src/util/libgnunetutil.la \
  107. $(LTLIBINTL)
  108. libgnunet_plugin_gnsrecord_gns_la_LDFLAGS = \
  109. $(GN_PLUGIN_LDFLAGS)
  110. gnunet_gns_SOURCES = \
  111. gnunet-gns.c
  112. gnunet_gns_LDADD = \
  113. libgnunetgns.la \
  114. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  115. $(top_builddir)/src/util/libgnunetutil.la \
  116. $(LIBIDN) $(LIBIDN2) \
  117. $(GN_LIBINTL)
  118. gnunet_gns_benchmark_SOURCES = \
  119. gnunet-gns-benchmark.c
  120. gnunet_gns_benchmark_LDADD = \
  121. libgnunetgns.la \
  122. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  123. $(top_builddir)/src/util/libgnunetutil.la \
  124. $(GN_LIBINTL)
  125. gnunet_bcd_SOURCES = \
  126. gnunet-bcd.c
  127. gnunet_bcd_LDADD = \
  128. $(top_builddir)/src/util/libgnunetutil.la \
  129. $(GN_LIBINTL) $(MHD_LIBS)
  130. gnunet_bcd_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
  131. gnunet_dns2gns_SOURCES = \
  132. gnunet-dns2gns.c
  133. gnunet_dns2gns_LDADD = \
  134. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  135. libgnunetgns.la \
  136. $(top_builddir)/src/util/libgnunetutil.la \
  137. $(top_builddir)/src/identity/libgnunetidentity.la \
  138. $(GN_LIBINTL)
  139. if HAVE_SUDO
  140. SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
  141. else
  142. if HAVE_DOAS_BINARY
  143. SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
  144. endif
  145. endif
  146. if LINUX
  147. HIJACKBIN = gnunet-dns2gns
  148. install-exec-hook:
  149. $(SUDO_OR_DOAS_BINARY) setcap 'cap_net_bind_service=+ep' $(DESTDIR)$(libexecdir)/gnunet-dns2gns || true
  150. else
  151. install-exec-hook:
  152. endif
  153. gnunet_gns_proxy_SOURCES = \
  154. gnunet-gns-proxy.c
  155. gnunet_gns_proxy_LDADD = $(MHD_LIBS) $(LIB_GNURL) -lgnutls \
  156. libgnunetgns.la \
  157. $(top_builddir)/src/identity/libgnunetidentity.la \
  158. $(top_builddir)/src/util/libgnunetutil.la \
  159. $(GN_LIBINTL)
  160. if HAVE_GNUTLS_DANE
  161. gnunet_gns_proxy_LDADD += -lgnutls-dane
  162. endif
  163. gnunet_gns_proxy_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
  164. test_gns_proxy_SOURCES = \
  165. test_gns_proxy.c
  166. test_gns_proxy_LDADD = $(MHD_LIBS) $(LIB_GNURL) -lgnutls \
  167. $(top_builddir)/src/util/libgnunetutil.la \
  168. $(GN_LIBINTL)
  169. test_gns_proxy_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
  170. #gnunet_gns_import_SOURCES = \
  171. # gnunet-gns-import.c
  172. #gnunet_gns_import_LDADD = \
  173. # $(top_builddir)/src/identity/libgnunetidentity.la \
  174. # $(top_builddir)/src/namestore/libgnunetnamestore.la \
  175. # $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  176. # $(top_builddir)/src/util/libgnunetutil.la \
  177. # $(GN_LIBINTL)
  178. gnunet_service_gns_SOURCES = \
  179. gnunet-service-gns.c gnunet-service-gns.h \
  180. gnunet-service-gns_resolver.c gnunet-service-gns_resolver.h \
  181. gnunet-service-gns_interceptor.c gnunet-service-gns_interceptor.h
  182. gnunet_service_gns_LDADD = \
  183. -lm \
  184. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  185. $(top_builddir)/src/identity/libgnunetidentity.la \
  186. $(top_builddir)/src/revocation/libgnunetrevocation.la \
  187. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  188. $(top_builddir)/src/util/libgnunetutil.la \
  189. $(top_builddir)/src/dns/libgnunetdns.la \
  190. $(top_builddir)/src/dht/libgnunetdht.la \
  191. $(top_builddir)/src/namecache/libgnunetnamecache.la \
  192. $(LIBIDN) $(LIBIDN2) \
  193. $(USE_VPN) \
  194. $(GN_LIBINTL)
  195. libgnunetgns_la_SOURCES = \
  196. gns_api.c gns_api.h \
  197. gns_tld_api.c gns.h
  198. libgnunetgns_la_LIBADD = \
  199. $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
  200. $(top_builddir)/src/identity/libgnunetidentity.la \
  201. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
  202. libgnunetgns_la_LDFLAGS = \
  203. $(GN_LIBINTL) \
  204. $(GN_LIB_LDFLAGS)
  205. libgnunet_plugin_block_gns_la_SOURCES = \
  206. plugin_block_gns.c
  207. libgnunet_plugin_block_gns_la_LIBADD = \
  208. $(top_builddir)/src/util/libgnunetutil.la \
  209. $(top_builddir)/src/block/libgnunetblock.la \
  210. $(top_builddir)/src/block/libgnunetblockgroup.la \
  211. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la
  212. libgnunet_plugin_block_gns_la_LDFLAGS = \
  213. $(GN_LIBINTL) \
  214. $(GN_PLUGIN_LDFLAGS)
  215. if HAVE_MHD
  216. if HAVE_GNUTLS
  217. if HAVE_LIBGNURL
  218. check_PROGRAMS = \
  219. test_gns_proxy
  220. endif
  221. endif
  222. endif
  223. check_SCRIPTS = \
  224. test_gns_lookup.sh \
  225. test_gns_config_lookup.sh \
  226. test_gns_ipv6_lookup.sh\
  227. test_gns_txt_lookup.sh\
  228. test_gns_caa_lookup.sh\
  229. test_gns_mx_lookup.sh \
  230. test_gns_gns2dns_lookup.sh \
  231. test_gns_gns2dns_zkey_lookup.sh \
  232. test_gns_gns2dns_cname_lookup.sh \
  233. test_gns_dht_lookup.sh\
  234. test_gns_delegated_lookup.sh \
  235. test_gns_at_lookup.sh\
  236. test_gns_zkey_lookup.sh\
  237. test_gns_rel_expiration.sh\
  238. test_gns_soa_lookup.sh\
  239. test_gns_revocation.sh\
  240. test_gns_cname_lookup.sh
  241. if HAVE_MHD
  242. if HAVE_GNUTLS
  243. if HAVE_LIBGNURL
  244. check_SCRIPTS += \
  245. test_proxy.sh
  246. endif
  247. endif
  248. if HAVE_JSON
  249. check_SCRIPTS += \
  250. test_plugin_rest_gns.sh
  251. endif
  252. endif
  253. if ENABLE_TEST_RUN
  254. if HAVE_SQLITE
  255. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  256. TESTS = $(check_SCRIPTS)
  257. endif
  258. endif