Makefile.am 3.6 KB

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