clean up a few confusions brian levine pointed out
[tor.git] / src / or / Makefile.am
blob2b35ef75c7d858e7e4ee99871f9f4845110606c5
1 TESTS = test
3 noinst_PROGRAMS = test
5 bin_PROGRAMS = tor
7 tor_SOURCES = buffers.c circuitbuild.c circuitlist.c \
8         circuituse.c command.c config.c \
9         connection.c connection_edge.c connection_or.c control.c \
10         cpuworker.c directory.c dirserv.c dns.c dnsserv.c hibernate.c main.c \
11         onion.c policies.c relay.c rendcommon.c rendclient.c rendmid.c \
12         rendservice.c rephist.c router.c routerlist.c routerparse.c \
13         eventdns.c \
14         tor_main.c
16 # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
17 # This seems to matter nowhere but on windows, but I assure you that it
18 # matters a lot there, and is quite hard to debug if you forget to do it.
20 tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
21 tor_LDADD = ../common/libor.a ../common/libor-crypto.a \
22   -lz -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
23 test_SOURCES = buffers.c circuitbuild.c circuitlist.c \
24         circuituse.c command.c config.c \
25         connection.c connection_edge.c connection_or.c control.c \
26         cpuworker.c directory.c dirserv.c dns.c dnsserv.c hibernate.c main.c \
27         onion.c policies.c relay.c rendcommon.c rendclient.c rendmid.c \
28         rendservice.c rephist.c router.c routerlist.c routerparse.c \
29         eventdns.c \
30         test.c
32 test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
33         @TOR_LDFLAGS_libevent@
34 test_LDADD = ../common/libor.a ../common/libor-crypto.a \
35         -lz -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
37 noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
39 tor_main.o: micro-revision.i
41 micro-revision.i: FORCE
42         @if test -d ../../.svn -a x`which svn` != x ; then      \
43           svn info ../.. |                                      \
44           sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.tmp \
45              || true;                                           \
46         elif test x`which svk` != x && test -d ~/.svk; then          \
47           location=../..;                                       \
48           rev=x;                                                \
49           while test x$$rev = xx; do                            \
50             x=`svk info $$location |                            \
51               sed -n 's/^Mirrored From:.*, Rev\. \([0-9][0-9]*\)/\1/p'`; \
52             if test x$$x != x; then                             \
53               rev=$$x;                                          \
54               break;                                            \
55             else                                                \
56               loc=`svk info $$location |                        \
57                 sed -n 's/^Copied From: \(.*\), Rev\. [0-9][0-9]*/\1/p'`; \
58               if test x$$loc = x; then                          \
59                 break;                                          \
60               else                                              \
61                 location=/$$loc;                                \
62               fi;                                               \
63             fi;                                                 \
64           done;                                                 \
65           if test x$$rev != x; then                             \
66             echo \"$$rev\" > micro-revision.tmp;                \
67           fi;                                                   \
68         fi;                                                     \
69         if test ! -f micro-revision.tmp ; then                  \
70           if test ! -f micro-revision.i ; then                  \
71             echo '""' > micro-revision.i;                       \
72           fi;                                                   \
73         elif test ! -f micro-revision.i ||                      \
74           test "`cat micro-revision.tmp`" != "`cat micro-revision.i`"; then \
75           mv micro-revision.tmp micro-revision.i;               \
76         fi
78 #Dummy target to ensure that micro-revision.i _always_ gets built.
79 FORCE: