Makefile.am 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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
  9. if USE_EXTERNAL_EVDNS
  10. evdns_source=
  11. else
  12. evdns_source=eventdns.c
  13. endif
  14. libtor_a_SOURCES = buffers.c circuitbuild.c circuitlist.c \
  15. circuituse.c command.c config.c \
  16. connection.c connection_edge.c connection_or.c control.c \
  17. cpuworker.c directory.c dirserv.c dirvote.c \
  18. dns.c dnsserv.c geoip.c hibernate.c main.c $(tor_platform_source) \
  19. microdesc.c \
  20. networkstatus.c onion.c policies.c \
  21. reasons.c relay.c rendcommon.c rendclient.c rendmid.c \
  22. rendservice.c rephist.c router.c routerlist.c routerparse.c \
  23. $(evdns_source) config_codedigest.c
  24. #libtor_a_LIBADD = ../common/libor.a ../common/libor-crypto.a \
  25. # ../common/libor-event.a
  26. tor_SOURCES = tor_main.c
  27. AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
  28. -DLOCALSTATEDIR="\"$(localstatedir)\"" \
  29. -DBINDIR="\"$(bindir)\""
  30. # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
  31. # This seems to matter nowhere but on windows, but I assure you that it
  32. # matters a lot there, and is quite hard to debug if you forget to do it.
  33. if USE_BUFFEREVENTS
  34. levent_openssl_lib = -levent_openssl
  35. else
  36. levent_openssl_lib =
  37. endif
  38. tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
  39. tor_LDADD = ./libtor.a ../common/libor.a ../common/libor-crypto.a \
  40. ../common/libor-event.a \
  41. @TOR_ZLIB_LIBS@ -lm @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
  42. @TOR_LIB_WS32@ @TOR_LIB_GDI@ $(levent_openssl_lib)
  43. noinst_HEADERS = buffers.h circuitbuild.h circuitlist.h circuituse.h \
  44. command.h config.h connection_edge.h connection.h connection_or.h \
  45. control.h cpuworker.h directory.h dirserv.h dirvote.h dns.h \
  46. dnsserv.h geoip.h hibernate.h main.h microdesc.h networkstatus.h \
  47. ntmain.h onion.h policies.h reasons.h relay.h rendclient.h \
  48. rendcommon.h rendmid.h rendservice.h rephist.h router.h routerlist.h \
  49. routerparse.h or.h eventdns.h eventdns_tor.h micro-revision.i
  50. config_codedigest.o: or_sha1.i
  51. tor_main.o: micro-revision.i
  52. micro-revision.i: FORCE
  53. @rm -f micro-revision.tmp; \
  54. if test -d ../../.git && test -x "`which git 2>&1;true`"; then \
  55. HASH="`git rev-parse --short=16 HEAD`"; \
  56. echo \"$$HASH\" > micro-revision.tmp; \
  57. fi; \
  58. if test ! -f micro-revision.tmp ; then \
  59. if test ! -f micro-revision.i ; then \
  60. echo '""' > micro-revision.i; \
  61. fi; \
  62. elif test ! -f micro-revision.i || \
  63. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  64. mv micro-revision.tmp micro-revision.i; \
  65. fi; true
  66. or_sha1.i: $(tor_SOURCES)
  67. if test "@SHA1SUM@" != none; then \
  68. @SHA1SUM@ $(tor_SOURCES) | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
  69. elif test "@OPENSSL@" != none; then \
  70. @OPENSSL@ sha1 $(tor_SOURCES) | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > or_sha1.i; \
  71. else \
  72. rm or_sha1.i; \
  73. touch or_sha1.i; \
  74. fi
  75. CLEANFILES = micro-revision.i
  76. #Dummy target to ensure that micro-revision.i _always_ gets built.
  77. FORCE: