include.am 4.8 KB

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