1 bin_PROGRAMS+= src/or/tor
6 src/or/libtor-testing.a
9 noinst_PROGRAMS+= src/or/tor-cov
13 tor_platform_source=src/or/ntmain.c
18 EXTRA_DIST+= src/or/ntmain.c src/or/or_sha1.i src/or/Makefile.nmake
23 evdns_source=src/ext/eventdns.c
27 onion_ntor_source=src/or/onion_ntor.c
37 src/or/circpathbias.c \
38 src/or/circuitbuild.c \
39 src/or/circuitlist.c \
41 src/or/circuitmux_ewma.c \
42 src/or/circuitstats.c \
48 src/or/connection_edge.c \
49 src/or/connection_or.c \
64 src/or/networkstatus.c \
76 src/or/rendservice.c \
78 src/or/replaycache.c \
81 src/or/routerparse.c \
86 $(tor_platform_source) \
87 $(onion_ntor_source) \
88 src/or/config_codedigest.c
90 src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES)
91 src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES)
93 #libtor_a_LIBADD = ../common/libor.a ../common/libor-crypto.a \
94 # ../common/libor-event.a
97 src_or_tor_SOURCES = src/or/tor_main.c
98 AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
100 src/or/tor_main.o: micro-revision.i
102 AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\"" \
103 -DLOCALSTATEDIR="\"$(localstatedir)\"" \
104 -DBINDIR="\"$(bindir)\""
106 src_or_libtor_testing_a_CPPFLAGS = -DTOR_UNIT_TESTS $(AM_CPPFLAGS)
107 src_or_libtor_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
109 # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
110 # This seems to matter nowhere but on windows, but I assure you that it
111 # matters a lot there, and is quite hard to debug if you forget to do it.
114 src_or_tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
115 src_or_tor_LDADD = src/or/libtor.a src/common/libor.a \
116 src/common/libor-crypto.a $(LIBDONNA) \
117 src/common/libor-event.a \
118 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
119 @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
122 src_or_tor_cov_SOURCES = src/or/tor_main.c
123 src_or_tor_cov_CPPFLAGS = -DTOR_UNIT_TESTS $(AM_CPPFLAGS)
124 src_or_tor_cov_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
125 src_or_tor_cov_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
126 src_or_tor_cov_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \
127 src/common/libor-crypto-testing.a $(LIBDONNA) \
128 src/common/libor-event-testing.a \
129 @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
130 @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
134 src/or/addressmap.h \
137 src/or/channeltls.h \
138 src/or/circpathbias.h \
139 src/or/circuitbuild.h \
140 src/or/circuitlist.h \
141 src/or/circuitmux.h \
142 src/or/circuitmux_ewma.h \
143 src/or/circuitstats.h \
144 src/or/circuituse.h \
148 src/or/connection.h \
149 src/or/connection_edge.h \
150 src/or/connection_or.h \
158 src/or/eventdns_tor.h \
159 src/or/ext_orport.h \
162 src/or/entrynodes.h \
166 src/or/networkstatus.h \
170 src/or/onion_fast.h \
171 src/or/onion_ntor.h \
174 src/or/transports.h \
178 src/or/rendclient.h \
179 src/or/rendcommon.h \
181 src/or/rendservice.h \
183 src/or/replaycache.h \
185 src/or/routerlist.h \
187 src/or/routerparse.h \
191 noinst_HEADERS+= $(ORHEADERS) micro-revision.i
193 src/or/config_codedigest.o: src/or/or_sha1.i
195 micro-revision.i: FORCE
196 @rm -f micro-revision.tmp; \
197 if test -d "$(top_srcdir)/.git" && \
198 test -x "`which git 2>&1;true`"; then \
199 HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
200 echo \"$$HASH\" > micro-revision.tmp; \
202 if test ! -f micro-revision.tmp ; then \
203 if test ! -f micro-revision.i ; then \
204 echo '""' > micro-revision.i; \
206 elif test ! -f micro-revision.i || \
207 test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
208 mv micro-revision.tmp micro-revision.i; \
211 src/or/or_sha1.i: $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)
212 $(AM_V_GEN)if test "@SHA1SUM@" != none; then \
213 (cd "$(srcdir)" && "@SHA1SUM@" $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS) ) | \
214 "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > src/or/or_sha1.i; \
215 elif test "@OPENSSL@" != none; then \
216 (cd "$(srcdir)" && "@OPENSSL@" sha1 $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)) | \
217 "@SED@" -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > src/or/or_sha1.i; \
219 rm src/or/or_sha1.i; \
220 touch src/or/or_sha1.i; \
223 CLEANFILES+= micro-revision.i src/or/micro-revision.i