include.am 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. bin_PROGRAMS+= src/or/tor
  2. noinst_LIBRARIES += \
  3. src/or/libtor.a
  4. if UNITTESTS_ENABLED
  5. noinst_LIBRARIES += \
  6. src/or/libtor-testing.a
  7. endif
  8. if COVERAGE_ENABLED
  9. noinst_PROGRAMS+= src/or/tor-cov
  10. endif
  11. if BUILD_NT_SERVICES
  12. tor_platform_source=src/or/ntmain.c
  13. else
  14. tor_platform_source=
  15. endif
  16. EXTRA_DIST+= src/or/ntmain.c src/or/Makefile.nmake
  17. LIBTOR_A_SOURCES = \
  18. src/or/addressmap.c \
  19. src/or/bridges.c \
  20. src/or/channel.c \
  21. src/or/channelpadding.c \
  22. src/or/channeltls.c \
  23. src/or/circpathbias.c \
  24. src/or/circuitbuild.c \
  25. src/or/circuitlist.c \
  26. src/or/circuitmux.c \
  27. src/or/circuitmux_ewma.c \
  28. src/or/circuitstats.c \
  29. src/or/circuituse.c \
  30. src/or/command.c \
  31. src/or/config.c \
  32. src/or/confparse.c \
  33. src/or/connection.c \
  34. src/or/connection_edge.c \
  35. src/or/connection_or.c \
  36. src/or/conscache.c \
  37. src/or/consdiff.c \
  38. src/or/consdiffmgr.c \
  39. src/or/control.c \
  40. src/or/cpuworker.c \
  41. src/or/dircollate.c \
  42. src/or/directory.c \
  43. src/or/dirserv.c \
  44. src/or/dirvote.c \
  45. src/or/dns.c \
  46. src/or/dnsserv.c \
  47. src/or/fp_pair.c \
  48. src/or/geoip.c \
  49. src/or/entrynodes.c \
  50. src/or/ext_orport.c \
  51. src/or/hibernate.c \
  52. src/or/hs_cache.c \
  53. src/or/hs_cell.c \
  54. src/or/hs_circuit.c \
  55. src/or/hs_circuitmap.c \
  56. src/or/hs_client.c \
  57. src/or/hs_common.c \
  58. src/or/hs_config.c \
  59. src/or/hs_descriptor.c \
  60. src/or/hs_ident.c \
  61. src/or/hs_intropoint.c \
  62. src/or/hs_ntor.c \
  63. src/or/hs_service.c \
  64. src/or/keypin.c \
  65. src/or/main.c \
  66. src/or/microdesc.c \
  67. src/or/networkstatus.c \
  68. src/or/nodelist.c \
  69. src/or/onion.c \
  70. src/or/onion_fast.c \
  71. src/or/onion_tap.c \
  72. src/or/shared_random.c \
  73. src/or/shared_random_state.c \
  74. src/or/transports.c \
  75. src/or/parsecommon.c \
  76. src/or/periodic.c \
  77. src/or/protover.c \
  78. src/or/proto_cell.c \
  79. src/or/proto_control0.c \
  80. src/or/proto_ext_or.c \
  81. src/or/proto_http.c \
  82. src/or/proto_socks.c \
  83. src/or/policies.c \
  84. src/or/reasons.c \
  85. src/or/relay.c \
  86. src/or/rendcache.c \
  87. src/or/rendclient.c \
  88. src/or/rendcommon.c \
  89. src/or/rendmid.c \
  90. src/or/rendservice.c \
  91. src/or/rephist.c \
  92. src/or/replaycache.c \
  93. src/or/router.c \
  94. src/or/routerkeys.c \
  95. src/or/routerlist.c \
  96. src/or/routerparse.c \
  97. src/or/routerset.c \
  98. src/or/scheduler.c \
  99. src/or/scheduler_kist.c \
  100. src/or/scheduler_vanilla.c \
  101. src/or/statefile.c \
  102. src/or/status.c \
  103. src/or/torcert.c \
  104. src/or/onion_ntor.c \
  105. $(tor_platform_source)
  106. src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES)
  107. src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES)
  108. src_or_tor_SOURCES = src/or/tor_main.c
  109. AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
  110. src/or/tor_main.$(OBJEXT) \
  111. src/or/src_or_tor_cov-tor_main.$(OBJEXT): micro-revision.i
  112. AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\"" \
  113. -DLOCALSTATEDIR="\"$(localstatedir)\"" \
  114. -DBINDIR="\"$(bindir)\""
  115. src_or_libtor_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
  116. src_or_libtor_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
  117. # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
  118. # This seems to matter nowhere but on windows, but I assure you that it
  119. # matters a lot there, and is quite hard to debug if you forget to do it.
  120. src_or_tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
  121. src_or_tor_LDADD = src/or/libtor.a src/common/libor.a src/common/libor-ctime.a \
  122. src/common/libor-crypto.a $(LIBKECCAK_TINY) $(LIBDONNA) \
  123. src/common/libor-event.a src/trunnel/libor-trunnel.a \
  124. src/trace/libor-trace.a \
  125. $(rust_ldadd) \
  126. @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
  127. @TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
  128. @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ \
  129. @TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
  130. if COVERAGE_ENABLED
  131. src_or_tor_cov_SOURCES = src/or/tor_main.c
  132. src_or_tor_cov_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
  133. src_or_tor_cov_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
  134. src_or_tor_cov_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
  135. src_or_tor_cov_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \
  136. src/common/libor-ctime-testing.a \
  137. src/common/libor-crypto-testing.a $(LIBKECCAK_TINY) $(LIBDONNA) \
  138. src/common/libor-event-testing.a src/trunnel/libor-trunnel-testing.a \
  139. @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
  140. @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ \
  141. @TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
  142. endif
  143. ORHEADERS = \
  144. src/or/addressmap.h \
  145. src/or/bridges.h \
  146. src/or/channel.h \
  147. src/or/channelpadding.h \
  148. src/or/channeltls.h \
  149. src/or/circpathbias.h \
  150. src/or/circuitbuild.h \
  151. src/or/circuitlist.h \
  152. src/or/circuitmux.h \
  153. src/or/circuitmux_ewma.h \
  154. src/or/circuitstats.h \
  155. src/or/circuituse.h \
  156. src/or/command.h \
  157. src/or/config.h \
  158. src/or/confparse.h \
  159. src/or/connection.h \
  160. src/or/connection_edge.h \
  161. src/or/connection_or.h \
  162. src/or/conscache.h \
  163. src/or/consdiff.h \
  164. src/or/consdiffmgr.h \
  165. src/or/control.h \
  166. src/or/cpuworker.h \
  167. src/or/dircollate.h \
  168. src/or/directory.h \
  169. src/or/dirserv.h \
  170. src/or/dirvote.h \
  171. src/or/dns.h \
  172. src/or/dns_structs.h \
  173. src/or/dnsserv.h \
  174. src/or/ext_orport.h \
  175. src/or/fallback_dirs.inc \
  176. src/or/fp_pair.h \
  177. src/or/geoip.h \
  178. src/or/entrynodes.h \
  179. src/or/hibernate.h \
  180. src/or/hs_cache.h \
  181. src/or/hs_cell.h \
  182. src/or/hs_config.h \
  183. src/or/hs_circuit.h \
  184. src/or/hs_circuitmap.h \
  185. src/or/hs_client.h \
  186. src/or/hs_common.h \
  187. src/or/hs_descriptor.h \
  188. src/or/hs_ident.h \
  189. src/or/hs_intropoint.h \
  190. src/or/hs_ntor.h \
  191. src/or/hs_service.h \
  192. src/or/keypin.h \
  193. src/or/main.h \
  194. src/or/microdesc.h \
  195. src/or/networkstatus.h \
  196. src/or/nodelist.h \
  197. src/or/ntmain.h \
  198. src/or/onion.h \
  199. src/or/onion_fast.h \
  200. src/or/onion_ntor.h \
  201. src/or/onion_tap.h \
  202. src/or/or.h \
  203. src/or/shared_random.h \
  204. src/or/shared_random_state.h \
  205. src/or/transports.h \
  206. src/or/parsecommon.h \
  207. src/or/periodic.h \
  208. src/or/policies.h \
  209. src/or/protover.h \
  210. src/or/proto_cell.h \
  211. src/or/proto_control0.h \
  212. src/or/proto_ext_or.h \
  213. src/or/proto_http.h \
  214. src/or/proto_socks.h \
  215. src/or/reasons.h \
  216. src/or/relay.h \
  217. src/or/rendcache.h \
  218. src/or/rendclient.h \
  219. src/or/rendcommon.h \
  220. src/or/rendmid.h \
  221. src/or/rendservice.h \
  222. src/or/rephist.h \
  223. src/or/replaycache.h \
  224. src/or/router.h \
  225. src/or/routerkeys.h \
  226. src/or/routerlist.h \
  227. src/or/routerkeys.h \
  228. src/or/routerset.h \
  229. src/or/routerparse.h \
  230. src/or/scheduler.h \
  231. src/or/statefile.h \
  232. src/or/status.h \
  233. src/or/torcert.h
  234. noinst_HEADERS+= $(ORHEADERS) micro-revision.i
  235. micro-revision.i: FORCE
  236. $(AM_V_at)rm -f micro-revision.tmp; \
  237. if test -r "$(top_srcdir)/.git" && \
  238. test -x "`which git 2>&1;true`"; then \
  239. HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
  240. echo \"$$HASH\" > micro-revision.tmp; \
  241. fi; \
  242. if test ! -f micro-revision.tmp; then \
  243. if test ! -f micro-revision.i; then \
  244. echo '""' > micro-revision.i; \
  245. fi; \
  246. elif test ! -f micro-revision.i || \
  247. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  248. mv micro-revision.tmp micro-revision.i; \
  249. fi; \
  250. rm -f micro-revision.tmp; \
  251. true
  252. CLEANFILES+= micro-revision.i src/or/micro-revision.i micro-revision.tmp
  253. FORCE: