Makefile.am 3.4 KB

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