Makefile.am 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. TESTS = test
  2. noinst_PROGRAMS = test
  3. bin_PROGRAMS = tor
  4. if BUILD_NT_SERVICES
  5. tor_platform_source=ntmain.c
  6. else
  7. tor_platform_source=
  8. endif
  9. EXTRA_DIST=ntmain.c or_sha1.i
  10. tor_SOURCES = buffers.c circuitbuild.c circuitlist.c \
  11. circuituse.c command.c config.c \
  12. connection.c connection_edge.c connection_or.c control.c \
  13. cpuworker.c directory.c dirserv.c dirvote.c \
  14. dns.c dnsserv.c geoip.c hibernate.c main.c $(tor_platform_source) \
  15. networkstatus.c onion.c policies.c \
  16. reasons.c relay.c rendcommon.c rendclient.c rendmid.c \
  17. rendservice.c rephist.c router.c routerlist.c routerparse.c \
  18. eventdns.c \
  19. tor_main.c
  20. AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
  21. -DLOCALSTATEDIR="\"$(localstatedir)\"" \
  22. -DBINDIR="\"$(bindir)\""
  23. # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
  24. # This seems to matter nowhere but on windows, but I assure you that it
  25. # matters a lot there, and is quite hard to debug if you forget to do it.
  26. tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
  27. tor_LDADD = ../common/libor.a ../common/libor-crypto.a \
  28. -lz -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
  29. test_SOURCES = buffers.c circuitbuild.c circuitlist.c \
  30. circuituse.c command.c config.c \
  31. connection.c connection_edge.c connection_or.c control.c \
  32. cpuworker.c directory.c dirserv.c dirvote.c \
  33. dns.c dnsserv.c geoip.c hibernate.c main.c $(tor_platform_source) \
  34. networkstatus.c onion.c policies.c \
  35. reasons.c relay.c rendcommon.c rendclient.c rendmid.c \
  36. rendservice.c rephist.c router.c routerlist.c routerparse.c \
  37. eventdns.c \
  38. test_data.c test.c
  39. test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
  40. @TOR_LDFLAGS_libevent@
  41. test_LDADD = ../common/libor.a ../common/libor-crypto.a \
  42. -lz -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
  43. noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
  44. config.o: or_sha1.i
  45. tor_main.o: micro-revision.i
  46. micro-revision.i: FORCE
  47. @svkdir=$$SVKROOT; \
  48. if test "x$$svkdir" = x ; then \
  49. svkdir=$$HOME/.svk; \
  50. fi; \
  51. if test -d ../../.git && test -x "`which git 2>&1;true`" ; then \
  52. if test -d ../../.git/svn && test -x "`which git-svn 2>&1;true`" ; then \
  53. git-svn info ../../README | \
  54. sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' \
  55. > micro-revision.tmp \
  56. || true; \
  57. fi; \
  58. elif test -d ../../.svn && test -x "`which svn 2>&1;true`" ; then \
  59. svn info ../.. | \
  60. sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.tmp \
  61. || true; \
  62. elif test -x "`which svk 2>&1;true`" && test -d $$svkdir/local; then \
  63. location=../..; \
  64. rev=x; \
  65. while test x$$rev = xx; do \
  66. x=`svk info $$location | \
  67. sed -n 's/^Mirrored From:.*, Rev\. \([0-9][0-9]*\)/\1/p'`; \
  68. if test x$$x != x; then \
  69. rev=$$x; \
  70. break; \
  71. else \
  72. loc=`svk info $$location | \
  73. sed -n 's/^Copied From: \(.*\), Rev\. [0-9][0-9]*/\1/p' | \
  74. head -1`; \
  75. if test x$$loc = x; then \
  76. break; \
  77. else \
  78. location=/$$loc; \
  79. fi; \
  80. fi; \
  81. done; \
  82. if test x$$rev != xx; then \
  83. echo \"$$rev\" > micro-revision.tmp; \
  84. fi; \
  85. fi; \
  86. if test ! -f micro-revision.tmp ; then \
  87. if test ! -f micro-revision.i ; then \
  88. echo '""' > micro-revision.i; \
  89. fi; \
  90. elif test ! -f micro-revision.i || \
  91. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  92. mv micro-revision.tmp micro-revision.i; \
  93. fi; true
  94. or_sha1.i: $(tor_SOURCES) test_data.c test.c
  95. if test "@SHA1SUM@" != none; then \
  96. @SHA1SUM@ $(tor_SOURCES) test_data.c test.c | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
  97. elif test "@OPENSSL@" != none; then \
  98. @OPENSSL@ sha1 $(tor_SOURCES) test_data.c test.c | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > or_sha1.i; \
  99. else \
  100. rm or_sha1.i; \
  101. touch or_sha1.i; \
  102. fi
  103. #Dummy target to ensure that micro-revision.i _always_ gets built.
  104. FORCE: