include.am 7.11 KB
Newer Older
Stewart Smith's avatar
Stewart Smith committed
1
bin_PROGRAMS+= src/or/tor
2
3
4
5
6
7
noinst_LIBRARIES += \
	src/or/libtor.a
if UNITTESTS_ENABLED
noinst_LIBRARIES += \
	src/or/libtor-testing.a
endif
8
9
10
if COVERAGE_ENABLED
noinst_PROGRAMS+= src/or/tor-cov
endif
Stewart Smith's avatar
Stewart Smith committed
11
12
13
14
15
16
17

if BUILD_NT_SERVICES
tor_platform_source=src/or/ntmain.c
else
tor_platform_source=
endif

18
EXTRA_DIST+= src/or/ntmain.c src/or/Makefile.nmake
Stewart Smith's avatar
Stewart Smith committed
19

20
LIBTOR_A_SOURCES = \
21
	src/or/addressmap.c				\
22
	src/or/bridges.c				\
Stewart Smith's avatar
Stewart Smith committed
23
	src/or/buffers.c				\
24
	src/or/channel.c				\
25
	src/or/channelpadding.c				\
26
	src/or/channeltls.c				\
27
	src/or/circpathbias.c				\
Stewart Smith's avatar
Stewart Smith committed
28
29
	src/or/circuitbuild.c				\
	src/or/circuitlist.c				\
30
	src/or/circuitmux.c				\
31
	src/or/circuitmux_ewma.c			\
32
	src/or/circuitstats.c				\
Stewart Smith's avatar
Stewart Smith committed
33
34
	src/or/circuituse.c				\
	src/or/command.c				\
35
36
	src/or/config.c					\
	src/or/confparse.c				\
Stewart Smith's avatar
Stewart Smith committed
37
38
39
	src/or/connection.c				\
	src/or/connection_edge.c			\
	src/or/connection_or.c				\
40
	src/or/conscache.c				\
41
	src/or/consdiff.c				\
42
	src/or/consdiffmgr.c				\
Stewart Smith's avatar
Stewart Smith committed
43
44
	src/or/control.c				\
	src/or/cpuworker.c				\
45
	src/or/dircollate.c				\
Stewart Smith's avatar
Stewart Smith committed
46
47
48
49
50
	src/or/directory.c				\
	src/or/dirserv.c				\
	src/or/dirvote.c				\
	src/or/dns.c					\
	src/or/dnsserv.c				\
Sebastian Hahn's avatar
Sebastian Hahn committed
51
	src/or/fp_pair.c				\
Stewart Smith's avatar
Stewart Smith committed
52
	src/or/geoip.c					\
53
54
55
	src/or/entrynodes.c				\
	src/or/ext_orport.c				\
	src/or/hibernate.c				\
56
	src/or/hs_cache.c				\
57
	src/or/hs_cell.c				\
58
	src/or/hs_circuit.c				\
59
	src/or/hs_circuitmap.c				\
60
	src/or/hs_client.c				\
61
	src/or/hs_common.c				\
62
	src/or/hs_config.c				\
63
	src/or/hs_descriptor.c				\
64
65
66
67
	src/or/hs_ident.c				\
	src/or/hs_intropoint.c				\
	src/or/hs_ntor.c				\
	src/or/hs_service.c				\
68
	src/or/keypin.c					\
Stewart Smith's avatar
Stewart Smith committed
69
70
71
72
73
	src/or/main.c					\
	src/or/microdesc.c				\
	src/or/networkstatus.c				\
	src/or/nodelist.c				\
	src/or/onion.c					\
74
75
	src/or/onion_fast.c				\
	src/or/onion_tap.c				\
76
77
	src/or/shared_random.c			\
	src/or/shared_random_state.c		\
Stewart Smith's avatar
Stewart Smith committed
78
	src/or/transports.c				\
79
	src/or/parsecommon.c			\
80
	src/or/periodic.c				\
81
	src/or/protover.c				\
Stewart Smith's avatar
Stewart Smith committed
82
83
84
	src/or/policies.c				\
	src/or/reasons.c				\
	src/or/relay.c					\
David Goulet's avatar
David Goulet committed
85
	src/or/rendcache.c				\
Stewart Smith's avatar
Stewart Smith committed
86
87
88
89
90
91
92
	src/or/rendclient.c				\
	src/or/rendcommon.c				\
	src/or/rendmid.c				\
	src/or/rendservice.c				\
	src/or/rephist.c				\
	src/or/replaycache.c				\
	src/or/router.c					\
93
	src/or/routerkeys.c				\
Stewart Smith's avatar
Stewart Smith committed
94
95
	src/or/routerlist.c				\
	src/or/routerparse.c				\
96
	src/or/routerset.c				\
97
	src/or/scheduler.c				\
98
	src/or/statefile.c				\
Stewart Smith's avatar
Stewart Smith committed
99
	src/or/status.c					\
100
	src/or/torcert.c				\
101
	src/or/onion_ntor.c				\
Nick Mathewson's avatar
Nick Mathewson committed
102
	$(tor_platform_source)
Stewart Smith's avatar
Stewart Smith committed
103

104
105
106
src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES)
src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES)

Stewart Smith's avatar
Stewart Smith committed
107
src_or_tor_SOURCES = src/or/tor_main.c
108
AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
Stewart Smith's avatar
Stewart Smith committed
109

110
111
src/or/tor_main.$(OBJEXT) \
  src/or/src_or_tor_cov-tor_main.$(OBJEXT): micro-revision.i
Stewart Smith's avatar
Stewart Smith committed
112

Sebastian Hahn's avatar
Sebastian Hahn committed
113
114
115
AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\""		\
		-DLOCALSTATEDIR="\"$(localstatedir)\""	\
		-DBINDIR="\"$(bindir)\""
Stewart Smith's avatar
Stewart Smith committed
116

117
src_or_libtor_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
118
src_or_libtor_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
119

Stewart Smith's avatar
Stewart Smith committed
120
121
122
123
124
125
# -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
# This seems to matter nowhere but on windows, but I assure you that it
# matters a lot there, and is quite hard to debug if you forget to do it.


src_or_tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
126
src_or_tor_LDADD = src/or/libtor.a src/common/libor.a src/common/libor-ctime.a \
127
	src/common/libor-crypto.a $(LIBKECCAK_TINY) $(LIBDONNA) \
128
	src/common/libor-event.a src/trunnel/libor-trunnel.a \
129
	src/trace/libor-trace.a \
130
	$(rust_ldadd) \
Stewart Smith's avatar
Stewart Smith committed
131
	@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
132
133
134
	@TOR_LIB_WS32@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
	@CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ \
	@TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
Stewart Smith's avatar
Stewart Smith committed
135

136
137
if COVERAGE_ENABLED
src_or_tor_cov_SOURCES = src/or/tor_main.c
138
src_or_tor_cov_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
139
140
141
src_or_tor_cov_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
src_or_tor_cov_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
src_or_tor_cov_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \
142
	src/common/libor-ctime-testing.a \
143
	src/common/libor-crypto-testing.a $(LIBKECCAK_TINY) $(LIBDONNA) \
144
	src/common/libor-event-testing.a src/trunnel/libor-trunnel-testing.a \
145
	@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
146
	@TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ \
147
	@TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
148
149
endif

150
ORHEADERS = \
151
	src/or/addressmap.h				\
152
	src/or/bridges.h				\
Stewart Smith's avatar
Stewart Smith committed
153
	src/or/buffers.h				\
154
	src/or/channel.h				\
155
	src/or/channelpadding.h				\
156
	src/or/channeltls.h				\
157
	src/or/circpathbias.h				\
Stewart Smith's avatar
Stewart Smith committed
158
159
	src/or/circuitbuild.h				\
	src/or/circuitlist.h				\
160
	src/or/circuitmux.h				\
161
	src/or/circuitmux_ewma.h			\
162
	src/or/circuitstats.h				\
Stewart Smith's avatar
Stewart Smith committed
163
164
165
	src/or/circuituse.h				\
	src/or/command.h				\
	src/or/config.h					\
166
	src/or/confparse.h				\
Stewart Smith's avatar
Stewart Smith committed
167
168
169
	src/or/connection.h				\
	src/or/connection_edge.h			\
	src/or/connection_or.h				\
170
	src/or/conscache.h				\
171
	src/or/consdiff.h				\
172
	src/or/consdiffmgr.h				\
Stewart Smith's avatar
Stewart Smith committed
173
174
	src/or/control.h				\
	src/or/cpuworker.h				\
175
	src/or/dircollate.h				\
Stewart Smith's avatar
Stewart Smith committed
176
177
178
179
	src/or/directory.h				\
	src/or/dirserv.h				\
	src/or/dirvote.h				\
	src/or/dns.h					\
180
	src/or/dns_structs.h				\
Stewart Smith's avatar
Stewart Smith committed
181
	src/or/dnsserv.h				\
182
	src/or/ext_orport.h				\
183
	src/or/fallback_dirs.inc			\
184
	src/or/fp_pair.h				\
Stewart Smith's avatar
Stewart Smith committed
185
	src/or/geoip.h					\
186
	src/or/entrynodes.h				\
Stewart Smith's avatar
Stewart Smith committed
187
	src/or/hibernate.h				\
188
	src/or/hs_cache.h				\
189
190
	src/or/hs_cell.h				\
	src/or/hs_config.h				\
191
	src/or/hs_circuit.h				\
192
193
194
	src/or/hs_circuitmap.h				\
	src/or/hs_client.h				\
	src/or/hs_common.h				\
195
	src/or/hs_descriptor.h				\
196
	src/or/hs_ident.h				\
197
198
199
	src/or/hs_intropoint.h				\
	src/or/hs_ntor.h				\
	src/or/hs_service.h				\
200
	src/or/keypin.h					\
Stewart Smith's avatar
Stewart Smith committed
201
202
203
204
205
206
	src/or/main.h					\
	src/or/microdesc.h				\
	src/or/networkstatus.h				\
	src/or/nodelist.h				\
	src/or/ntmain.h					\
	src/or/onion.h					\
207
	src/or/onion_fast.h				\
208
	src/or/onion_ntor.h				\
209
	src/or/onion_tap.h				\
Stewart Smith's avatar
Stewart Smith committed
210
	src/or/or.h					\
211
212
	src/or/shared_random.h			\
	src/or/shared_random_state.h		\
Stewart Smith's avatar
Stewart Smith committed
213
	src/or/transports.h				\
214
	src/or/parsecommon.h			\
215
	src/or/periodic.h				\
Stewart Smith's avatar
Stewart Smith committed
216
	src/or/policies.h				\
217
	src/or/protover.h				\
Stewart Smith's avatar
Stewart Smith committed
218
219
	src/or/reasons.h				\
	src/or/relay.h					\
David Goulet's avatar
David Goulet committed
220
	src/or/rendcache.h				\
Stewart Smith's avatar
Stewart Smith committed
221
222
223
224
225
226
227
	src/or/rendclient.h				\
	src/or/rendcommon.h				\
	src/or/rendmid.h				\
	src/or/rendservice.h				\
	src/or/rephist.h				\
	src/or/replaycache.h				\
	src/or/router.h					\
228
	src/or/routerkeys.h				\
Stewart Smith's avatar
Stewart Smith committed
229
	src/or/routerlist.h				\
230
	src/or/routerkeys.h				\
231
	src/or/routerset.h				\
Stewart Smith's avatar
Stewart Smith committed
232
	src/or/routerparse.h				\
233
	src/or/scheduler.h				\
234
	src/or/statefile.h				\
235
236
	src/or/status.h					\
	src/or/torcert.h
237
238

noinst_HEADERS+= $(ORHEADERS) micro-revision.i
Stewart Smith's avatar
Stewart Smith committed
239

240
micro-revision.i: FORCE
cypherpunks's avatar
cypherpunks committed
241
	$(AM_V_at)rm -f micro-revision.tmp; \
242
	if test -r "$(top_srcdir)/.git" && \
cypherpunks's avatar
cypherpunks committed
243
244
245
246
247
248
249
250
251
252
253
254
255
256
			test -x "`which git 2>&1;true`"; then \
		HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
		echo \"$$HASH\" > micro-revision.tmp; \
	fi; \
	if test ! -f micro-revision.tmp; then \
		if test ! -f micro-revision.i; then \
			echo '""' > micro-revision.i; \
		fi; \
	elif test ! -f micro-revision.i || \
			test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
		mv micro-revision.tmp micro-revision.i; \
	fi; \
	rm -f micro-revision.tmp; \
	true
Stewart Smith's avatar
Stewart Smith committed
257

Nick Mathewson's avatar
Nick Mathewson committed
258
CLEANFILES+= micro-revision.i src/or/micro-revision.i micro-revision.tmp
Stewart Smith's avatar
Stewart Smith committed
259

260
FORCE: