8 tor_platform_source=ntmain.c
15 tor_SOURCES = buffers.c circuitbuild.c circuitlist.c \
16 circuituse.c command.c config.c \
17 connection.c connection_edge.c connection_or.c control.c \
18 cpuworker.c directory.c dirserv.c dirvote.c \
19 dns.c dnsserv.c geoip.c hibernate.c main.c $(tor_platform_source) \
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 \
26 AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
27 -DLOCALSTATEDIR="\"$(localstatedir)\"" \
28 -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.
34 tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
35 tor_LDADD = ../common/libor.a ../common/libor-crypto.a \
36 -lz -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
37 test_SOURCES = buffers.c circuitbuild.c circuitlist.c \
38 circuituse.c command.c config.c \
39 connection.c connection_edge.c connection_or.c control.c \
40 cpuworker.c directory.c dirserv.c dirvote.c \
41 dns.c dnsserv.c geoip.c hibernate.c main.c $(tor_platform_source) \
42 networkstatus.c onion.c policies.c \
43 reasons.c relay.c rendcommon.c rendclient.c rendmid.c \
44 rendservice.c rephist.c router.c routerlist.c routerparse.c \
48 test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
49 @TOR_LDFLAGS_libevent@
50 test_LDADD = ../common/libor.a ../common/libor-crypto.a \
51 -lz -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
53 noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
55 tor_main.o: micro-revision.i
57 micro-revision.i: FORCE
59 if test "x$$svkdir" = x ; then \
62 if test -d ../../.git && test -x "`which git 2>&1;true`" ; then \
63 if test -d ../../.git/svn && test -x "`which git-svn 2>&1;true`" ; then \
64 git-svn info ../../README | \
65 sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' \
66 > micro-revision.tmp \
69 elif test -d ../../.svn && test -x "`which svn 2>&1;true`" ; then \
71 sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.tmp \
73 elif test -x "`which svk 2>&1;true`" && test -d $$svkdir/local; then \
76 while test x$$rev = xx; do \
77 x=`svk info $$location | \
78 sed -n 's/^Mirrored From:.*, Rev\. \([0-9][0-9]*\)/\1/p'`; \
79 if test x$$x != x; then \
83 loc=`svk info $$location | \
84 sed -n 's/^Copied From: \(.*\), Rev\. [0-9][0-9]*/\1/p' | \
86 if test x$$loc = x; then \
93 if test x$$rev != xx; then \
94 echo \"$$rev\" > micro-revision.tmp; \
97 if test ! -f micro-revision.tmp ; then \
98 if test ! -f micro-revision.i ; then \
99 echo '""' > micro-revision.i; \
101 elif test ! -f micro-revision.i || \
102 test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
103 mv micro-revision.tmp micro-revision.i; \
106 #Dummy target to ensure that micro-revision.i _always_ gets built.