include.am 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. bin_PROGRAMS+= src/or/tor
  2. noinst_LIBRARIES+= src/or/libtor.a
  3. if BUILD_NT_SERVICES
  4. tor_platform_source=src/or/ntmain.c
  5. else
  6. tor_platform_source=
  7. endif
  8. EXTRA_DIST+= src/or/ntmain.c src/or/or_sha1.i src/or/Makefile.nmake
  9. if USE_EXTERNAL_EVDNS
  10. evdns_source=
  11. else
  12. evdns_source=src/ext/eventdns.c
  13. endif
  14. if CURVE25519_ENABLED
  15. onion_ntor_source=src/or/onion_ntor.c
  16. else
  17. onion_ntor_source=
  18. endif
  19. src_or_libtor_a_SOURCES = \
  20. src/or/addressmap.c \
  21. src/or/buffers.c \
  22. src/or/channel.c \
  23. src/or/channeltls.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/control.c \
  37. src/or/cpuworker.c \
  38. src/or/directory.c \
  39. src/or/dirserv.c \
  40. src/or/dirvote.c \
  41. src/or/dns.c \
  42. src/or/dnsserv.c \
  43. src/or/fp_pair.c \
  44. src/or/geoip.c \
  45. src/or/entrynodes.c \
  46. src/or/hibernate.c \
  47. src/or/main.c \
  48. src/or/microdesc.c \
  49. src/or/networkstatus.c \
  50. src/or/nodelist.c \
  51. src/or/onion.c \
  52. src/or/onion_fast.c \
  53. src/or/onion_tap.c \
  54. src/or/transports.c \
  55. src/or/policies.c \
  56. src/or/reasons.c \
  57. src/or/relay.c \
  58. src/or/rendclient.c \
  59. src/or/rendcommon.c \
  60. src/or/rendmid.c \
  61. src/or/rendservice.c \
  62. src/or/rephist.c \
  63. src/or/replaycache.c \
  64. src/or/router.c \
  65. src/or/routerlist.c \
  66. src/or/routerparse.c \
  67. src/or/routerset.c \
  68. src/or/statefile.c \
  69. src/or/status.c \
  70. $(evdns_source) \
  71. $(tor_platform_source) \
  72. $(onion_ntor_source) \
  73. src/or/config_codedigest.c
  74. #libtor_a_LIBADD = ../common/libor.a ../common/libor-crypto.a \
  75. # ../common/libor-event.a
  76. src_or_tor_SOURCES = src/or/tor_main.c
  77. AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
  78. src/or/tor_main.o: micro-revision.i
  79. AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\"" \
  80. -DLOCALSTATEDIR="\"$(localstatedir)\"" \
  81. -DBINDIR="\"$(bindir)\""
  82. # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
  83. # This seems to matter nowhere but on windows, but I assure you that it
  84. # matters a lot there, and is quite hard to debug if you forget to do it.
  85. src_or_tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
  86. src_or_tor_LDADD = src/or/libtor.a src/common/libor.a \
  87. src/common/libor-crypto.a $(LIBDONNA) \
  88. src/common/libor-event.a \
  89. @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
  90. @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
  91. ORHEADERS = \
  92. src/or/addressmap.h \
  93. src/or/buffers.h \
  94. src/or/channel.h \
  95. src/or/channeltls.h \
  96. src/or/circuitbuild.h \
  97. src/or/circuitlist.h \
  98. src/or/circuitmux.h \
  99. src/or/circuitmux_ewma.h \
  100. src/or/circuitstats.h \
  101. src/or/circuituse.h \
  102. src/or/command.h \
  103. src/or/config.h \
  104. src/or/confparse.h \
  105. src/or/connection.h \
  106. src/or/connection_edge.h \
  107. src/or/connection_or.h \
  108. src/or/control.h \
  109. src/or/cpuworker.h \
  110. src/or/directory.h \
  111. src/or/dirserv.h \
  112. src/or/dirvote.h \
  113. src/or/dns.h \
  114. src/or/dnsserv.h \
  115. src/or/eventdns_tor.h \
  116. src/or/fp_pair.h \
  117. src/or/geoip.h \
  118. src/or/entrynodes.h \
  119. src/or/hibernate.h \
  120. src/or/main.h \
  121. src/or/microdesc.h \
  122. src/or/networkstatus.h \
  123. src/or/nodelist.h \
  124. src/or/ntmain.h \
  125. src/or/onion.h \
  126. src/or/onion_fast.h \
  127. src/or/onion_ntor.h \
  128. src/or/onion_tap.h \
  129. src/or/or.h \
  130. src/or/transports.h \
  131. src/or/policies.h \
  132. src/or/reasons.h \
  133. src/or/relay.h \
  134. src/or/rendclient.h \
  135. src/or/rendcommon.h \
  136. src/or/rendmid.h \
  137. src/or/rendservice.h \
  138. src/or/rephist.h \
  139. src/or/replaycache.h \
  140. src/or/router.h \
  141. src/or/routerlist.h \
  142. src/or/routerset.h \
  143. src/or/routerparse.h \
  144. src/or/statefile.h \
  145. src/or/status.h
  146. noinst_HEADERS+= $(ORHEADERS) micro-revision.i
  147. src/or/config_codedigest.o: src/or/or_sha1.i
  148. micro-revision.i: FORCE
  149. @rm -f micro-revision.tmp; \
  150. if test -d "$(top_srcdir)/.git" && \
  151. test -x "`which git 2>&1;true`"; then \
  152. HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
  153. echo \"$$HASH\" > micro-revision.tmp; \
  154. fi; \
  155. if test ! -f micro-revision.tmp ; then \
  156. if test ! -f micro-revision.i ; then \
  157. echo '""' > micro-revision.i; \
  158. fi; \
  159. elif test ! -f micro-revision.i || \
  160. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  161. mv micro-revision.tmp micro-revision.i; \
  162. fi; true
  163. src/or/or_sha1.i: $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)
  164. $(AM_V_GEN)if test "@SHA1SUM@" != none; then \
  165. (cd "$(srcdir)" && "@SHA1SUM@" $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS) ) | \
  166. "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > src/or/or_sha1.i; \
  167. elif test "@OPENSSL@" != none; then \
  168. (cd "$(srcdir)" && "@OPENSSL@" sha1 $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)) | \
  169. "@SED@" -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > src/or/or_sha1.i; \
  170. else \
  171. rm src/or/or_sha1.i; \
  172. touch src/or/or_sha1.i; \
  173. fi
  174. CLEANFILES+= micro-revision.i src/or/micro-revision.i
  175. FORCE: