Makefile.am 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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
  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 @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @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 @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@
  43. noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
  44. tor_main.o: micro-revision.i
  45. micro-revision.i: FORCE
  46. @svkdir=$$SVKROOT; \
  47. if test "x$$svkdir" = x ; then \
  48. svkdir=$$HOME/.svk; \
  49. fi; \
  50. if test -d ../../.git && test -x "`which git 2>&1;true`" ; then \
  51. if test -d ../../.git/svn && test -x "`which git-svn 2>&1;true`" ; then \
  52. git-svn info ../../README | \
  53. sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' \
  54. > micro-revision.tmp \
  55. || true; \
  56. fi; \
  57. elif test -d ../../.svn && test -x "`which svn 2>&1;true`" ; then \
  58. svn info ../.. | \
  59. sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.tmp \
  60. || true; \
  61. elif test -x "`which svk 2>&1;true`" && test -d $$svkdir/local; then \
  62. location=../..; \
  63. rev=x; \
  64. while test x$$rev = xx; do \
  65. x=`svk info $$location | \
  66. sed -n 's/^Mirrored From:.*, Rev\. \([0-9][0-9]*\)/\1/p'`; \
  67. if test x$$x != x; then \
  68. rev=$$x; \
  69. break; \
  70. else \
  71. loc=`svk info $$location | \
  72. sed -n 's/^Copied From: \(.*\), Rev\. [0-9][0-9]*/\1/p' | \
  73. head -1`; \
  74. if test x$$loc = x; then \
  75. break; \
  76. else \
  77. location=/$$loc; \
  78. fi; \
  79. fi; \
  80. done; \
  81. if test x$$rev != xx; then \
  82. echo \"$$rev\" > micro-revision.tmp; \
  83. fi; \
  84. fi; \
  85. if test ! -f micro-revision.tmp ; then \
  86. if test ! -f micro-revision.i ; then \
  87. echo '""' > micro-revision.i; \
  88. fi; \
  89. elif test ! -f micro-revision.i || \
  90. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  91. mv micro-revision.tmp micro-revision.i; \
  92. fi; true
  93. #Dummy target to ensure that micro-revision.i _always_ gets built.
  94. FORCE: