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