Makefile.am 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. networkstatus.c onion.c policies.c \
  20. reasons.c relay.c rendcommon.c rendclient.c rendmid.c \
  21. rendservice.c rephist.c router.c routerlist.c routerparse.c \
  22. $(evdns_source) config_codedigest.c
  23. #libtor_a_LIBADD = ../common/libor.a ../common/libor-crypto.a \
  24. # ../common/libor-event.a
  25. tor_SOURCES = tor_main.c
  26. AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
  27. -DLOCALSTATEDIR="\"$(localstatedir)\"" \
  28. -DBINDIR="\"$(bindir)\""
  29. # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
  30. # This seems to matter nowhere but on windows, but I assure you that it
  31. # matters a lot there, and is quite hard to debug if you forget to do it.
  32. tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
  33. tor_LDADD = ./libtor.a ../common/libor.a ../common/libor-crypto.a \
  34. ../common/libor-event.a \
  35. -lz -lm -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
  36. noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
  37. config_codedigest.o: or_sha1.i
  38. tor_main.o: micro-revision.i
  39. micro-revision.i: FORCE
  40. @rm -f micro-revision.tmp; \
  41. if test -d ../../.git && test -x "`which git 2>&1;true`"; then \
  42. HASH="`git rev-parse --short=16 HEAD`"; \
  43. echo \"$$HASH\" > micro-revision.tmp; \
  44. fi; \
  45. if test ! -f micro-revision.tmp ; then \
  46. if test ! -f micro-revision.i ; then \
  47. echo '""' > micro-revision.i; \
  48. fi; \
  49. elif test ! -f micro-revision.i || \
  50. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  51. mv micro-revision.tmp micro-revision.i; \
  52. fi; true
  53. or_sha1.i: $(tor_SOURCES)
  54. if test "@SHA1SUM@" != none; then \
  55. @SHA1SUM@ $(tor_SOURCES) | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
  56. elif test "@OPENSSL@" != none; then \
  57. @OPENSSL@ sha1 $(tor_SOURCES) | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > or_sha1.i; \
  58. else \
  59. rm or_sha1.i; \
  60. touch or_sha1.i; \
  61. fi
  62. #Dummy target to ensure that micro-revision.i _always_ gets built.
  63. FORCE: