Makefile.am 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
  34. tor_LDADD = ./libtor.a ../common/libor.a ../common/libor-crypto.a \
  35. ../common/libor-event.a \
  36. @TOR_ZLIB_LIBS@ -lm @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@
  37. noinst_HEADERS = buffers.h circuitbuild.h circuitlist.h circuituse.h \
  38. command.h config.h connection_edge.h connection.h connection_or.h \
  39. control.h cpuworker.h directory.h dirserv.h dirvote.h dns.h \
  40. dnsserv.h geoip.h hibernate.h main.h microdesc.h networkstatus.h \
  41. ntmain.h onion.h policies.h reasons.h relay.h rendclient.h \
  42. rendcommon.h rendmid.h rendservice.h rephist.h router.h routerlist.h \
  43. routerparse.h or.h eventdns.h eventdns_tor.h micro-revision.i
  44. config_codedigest.o: or_sha1.i
  45. tor_main.o: micro-revision.i
  46. micro-revision.i: FORCE
  47. @rm -f micro-revision.tmp; \
  48. if test -d ../../.git && test -x "`which git 2>&1;true`"; then \
  49. HASH="`git rev-parse --short=16 HEAD`"; \
  50. echo \"$$HASH\" > micro-revision.tmp; \
  51. fi; \
  52. if test ! -f micro-revision.tmp ; then \
  53. if test ! -f micro-revision.i ; then \
  54. echo '""' > micro-revision.i; \
  55. fi; \
  56. elif test ! -f micro-revision.i || \
  57. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  58. mv micro-revision.tmp micro-revision.i; \
  59. fi; true
  60. or_sha1.i: $(tor_SOURCES)
  61. if test "@SHA1SUM@" != none; then \
  62. @SHA1SUM@ $(tor_SOURCES) | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
  63. elif test "@OPENSSL@" != none; then \
  64. @OPENSSL@ sha1 $(tor_SOURCES) | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > or_sha1.i; \
  65. else \
  66. rm or_sha1.i; \
  67. touch or_sha1.i; \
  68. fi
  69. CLEANFILES = micro-revision.i
  70. #Dummy target to ensure that micro-revision.i _always_ gets built.
  71. FORCE: