Makefile.am 3.6 KB

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