Makefile.am 2.9 KB

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