Makefile.am 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. bin_PROGRAMS = tor
  2. noinst_LIBRARIES = libtor.a
  3. if BUILD_NT_SERVICES
  4. tor_platform_source=ntmain.c
  5. else
  6. tor_platform_source=
  7. endif
  8. EXTRA_DIST=ntmain.c or_sha1.i
  9. if USE_EXTERNAL_EVDNS
  10. evdns_source=
  11. else
  12. evdns_source=eventdns.c
  13. endif
  14. libtor_a_SOURCES = \
  15. buffers.c \
  16. circuitbuild.c \
  17. circuitlist.c \
  18. circuituse.c \
  19. command.c \
  20. config.c \
  21. connection.c \
  22. connection_edge.c \
  23. connection_or.c \
  24. control.c \
  25. cpuworker.c \
  26. directory.c \
  27. dirserv.c \
  28. dirvote.c \
  29. dns.c \
  30. dnsserv.c \
  31. geoip.c \
  32. hibernate.c \
  33. main.c \
  34. microdesc.c \
  35. networkstatus.c \
  36. nodelist.c \
  37. onion.c \
  38. policies.c \
  39. reasons.c \
  40. relay.c \
  41. rendclient.c \
  42. rendcommon.c \
  43. rendmid.c \
  44. rendservice.c \
  45. rephist.c \
  46. router.c \
  47. routerlist.c \
  48. routerparse.c \
  49. $(evdns_source) \
  50. $(tor_platform_source) \
  51. config_codedigest.c
  52. #libtor_a_LIBADD = ../common/libor.a ../common/libor-crypto.a \
  53. # ../common/libor-event.a
  54. tor_SOURCES = tor_main.c
  55. AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
  56. -DLOCALSTATEDIR="\"$(localstatedir)\"" \
  57. -DBINDIR="\"$(bindir)\""
  58. # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
  59. # This seems to matter nowhere but on windows, but I assure you that it
  60. # matters a lot there, and is quite hard to debug if you forget to do it.
  61. if USE_BUFFEREVENTS
  62. levent_openssl_lib = -levent_openssl
  63. else
  64. levent_openssl_lib =
  65. endif
  66. tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
  67. tor_LDADD = ./libtor.a ../common/libor.a ../common/libor-crypto.a \
  68. ../common/libor-event.a \
  69. @TOR_ZLIB_LIBS@ -lm @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
  70. @TOR_LIB_WS32@ @TOR_LIB_GDI@ $(levent_openssl_lib)
  71. noinst_HEADERS = \
  72. buffers.h \
  73. circuitbuild.h \
  74. circuitlist.h \
  75. circuituse.h \
  76. command.h \
  77. config.h \
  78. connection.h \
  79. connection_edge.h \
  80. connection_or.h \
  81. control.h \
  82. cpuworker.h \
  83. directory.h \
  84. dirserv.h \
  85. dirvote.h \
  86. dns.h \
  87. dnsserv.h \
  88. eventdns.h \
  89. eventdns_tor.h \
  90. geoip.h \
  91. hibernate.h \
  92. main.h \
  93. microdesc.h \
  94. networkstatus.h \
  95. nodelist.h \
  96. ntmain.h \
  97. onion.h \
  98. or.h \
  99. policies.h \
  100. reasons.h \
  101. relay.h \
  102. rendclient.h \
  103. rendcommon.h \
  104. rendmid.h \
  105. rendservice.h \
  106. rephist.h \
  107. router.h \
  108. routerlist.h \
  109. routerparse.h \
  110. micro-revision.i
  111. config_codedigest.o: or_sha1.i
  112. tor_main.o: micro-revision.i
  113. micro-revision.i: FORCE
  114. @rm -f micro-revision.tmp; \
  115. if test -d ../../.git && test -x "`which git 2>&1;true`"; then \
  116. HASH="`git rev-parse --short=16 HEAD`"; \
  117. echo \"$$HASH\" > micro-revision.tmp; \
  118. fi; \
  119. if test ! -f micro-revision.tmp ; then \
  120. if test ! -f micro-revision.i ; then \
  121. echo '""' > micro-revision.i; \
  122. fi; \
  123. elif test ! -f micro-revision.i || \
  124. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  125. mv micro-revision.tmp micro-revision.i; \
  126. fi; true
  127. or_sha1.i: $(tor_SOURCES)
  128. if test "@SHA1SUM@" != none; then \
  129. @SHA1SUM@ $(tor_SOURCES) | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
  130. elif test "@OPENSSL@" != none; then \
  131. @OPENSSL@ sha1 $(tor_SOURCES) | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > or_sha1.i; \
  132. else \
  133. rm or_sha1.i; \
  134. touch or_sha1.i; \
  135. fi
  136. CLEANFILES = micro-revision.i
  137. #Dummy target to ensure that micro-revision.i _always_ gets built.
  138. FORCE: