Makefile.am 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. -lz -lm @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@
  37. noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
  38. config_codedigest.o: or_sha1.i
  39. tor_main.o: micro-revision.i
  40. micro-revision.i: FORCE
  41. @rm -f micro-revision.tmp; \
  42. if test -d ../../.git && test -x "`which git 2>&1;true`"; then \
  43. HASH="`git rev-parse --short=16 HEAD`"; \
  44. echo \"$$HASH\" > micro-revision.tmp; \
  45. fi; \
  46. if test ! -f micro-revision.tmp ; then \
  47. if test ! -f micro-revision.i ; then \
  48. echo '""' > micro-revision.i; \
  49. fi; \
  50. elif test ! -f micro-revision.i || \
  51. test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
  52. mv micro-revision.tmp micro-revision.i; \
  53. fi; true
  54. or_sha1.i: $(tor_SOURCES)
  55. if test "@SHA1SUM@" != none; then \
  56. @SHA1SUM@ $(tor_SOURCES) | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
  57. elif test "@OPENSSL@" != none; then \
  58. @OPENSSL@ sha1 $(tor_SOURCES) | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > or_sha1.i; \
  59. else \
  60. rm or_sha1.i; \
  61. touch or_sha1.i; \
  62. fi
  63. #Dummy target to ensure that micro-revision.i _always_ gets built.
  64. FORCE: