include.am 10.6 KB
Newer Older
Nick Mathewson's avatar
Nick Mathewson committed
1

2
noinst_LIBRARIES += \
Nick Mathewson's avatar
Nick Mathewson committed
3
	src/core/libtor-app.a
4
5
if UNITTESTS_ENABLED
noinst_LIBRARIES += \
Nick Mathewson's avatar
Nick Mathewson committed
6
	src/core/libtor-app-testing.a
Stewart Smith's avatar
Stewart Smith committed
7
8
endif

9
10
11
12
LIBTOR_APP_A_SOURCES = 				\
	src/app/config/config.c			\
	src/app/config/confparse.c		\
	src/app/config/statefile.c		\
13
	src/core/crypto/hs_ntor.c		\
14
15
	src/core/crypto/onion.c			\
	src/core/crypto/onion_fast.c		\
16
	src/core/crypto/onion_ntor.c		\
17
	src/core/crypto/onion_tap.c		\
18
19
20
21
22
23
24
25
26
	src/core/crypto/relay_crypto.c		\
	src/core/mainloop/connection.c		\
	src/core/mainloop/cpuworker.c		\
	src/core/mainloop/main.c		\
	src/core/mainloop/periodic.c		\
	src/core/or/address_set.c		\
	src/core/or/channel.c			\
	src/core/or/channelpadding.c		\
	src/core/or/channeltls.c		\
27
	src/core/or/circuitbuild.c		\
28
29
30
	src/core/or/circuitlist.c		\
	src/core/or/circuitmux.c		\
	src/core/or/circuitmux_ewma.c		\
31
32
	src/core/or/circuitstats.c		\
	src/core/or/circuituse.c		\
33
34
35
36
	src/core/or/command.c			\
	src/core/or/connection_edge.c		\
	src/core/or/connection_or.c		\
	src/core/or/dos.c			\
37
	src/core/or/policies.c			\
38
39
	src/core/or/protover.c			\
	src/core/or/reasons.c			\
40
	src/core/or/relay.c			\
41
42
	src/core/or/scheduler.c			\
	src/core/or/scheduler_kist.c		\
43
44
	src/core/or/scheduler_vanilla.c		\
	src/core/or/status.c			\
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
	src/core/proto/proto_cell.c		\
	src/core/proto/proto_control0.c		\
	src/core/proto/proto_ext_or.c		\
	src/core/proto/proto_http.c		\
	src/core/proto/proto_socks.c		\
	src/core/proto/protover_rust.c		\
	src/feature/api/tor_api.c		\
	src/feature/client/addressmap.c		\
	src/feature/client/bridges.c		\
	src/feature/client/circpathbias.c	\
	src/feature/client/dnsserv.c		\
	src/feature/client/entrynodes.c		\
	src/feature/client/transports.c		\
	src/feature/control/control.c		\
	src/feature/dirauth/keypin.c		\
	src/feature/dircache/conscache.c	\
	src/feature/dircache/consdiffmgr.c	\
	src/feature/dircache/directory.c	\
	src/feature/dircache/dirserv.c		\
64
65
66
67
68
	src/feature/dircommon/consdiff.c	\
	src/feature/dircommon/fp_pair.c		\
	src/feature/dircommon/voting_schedule.c	\
	src/feature/hibernate/hibernate.c	\
	src/feature/hs/hs_cache.c		\
69
70
71
72
	src/feature/hs/hs_cell.c		\
	src/feature/hs/hs_circuit.c		\
	src/feature/hs/hs_circuitmap.c		\
	src/feature/hs/hs_client.c		\
73
	src/feature/hs/hs_common.c		\
74
	src/feature/hs/hs_config.c		\
75
	src/feature/hs/hs_control.c		\
76
	src/feature/hs/hs_descriptor.c		\
77
	src/feature/hs/hs_ident.c		\
78
	src/feature/hs/hs_intropoint.c		\
79
80
	src/feature/hs/hs_service.c		\
	src/feature/hs/hs_stats.c		\
81
82
83
84
85
86
87
88
89
90
91
	src/feature/hs_common/replaycache.c	\
	src/feature/hs_common/shared_random_client.c	\
	src/feature/nodelist/microdesc.c	\
	src/feature/nodelist/networkstatus.c	\
	src/feature/nodelist/nodelist.c		\
	src/feature/nodelist/parsecommon.c	\
	src/feature/nodelist/routerlist.c	\
	src/feature/nodelist/routerparse.c	\
	src/feature/nodelist/routerset.c	\
	src/feature/nodelist/torcert.c		\
	src/feature/relay/dns.c			\
92
93
94
	src/feature/relay/ext_orport.c		\
	src/feature/relay/router.c		\
	src/feature/relay/routerkeys.c		\
95
96
	src/feature/rend/rendcache.c		\
	src/feature/rend/rendclient.c		\
97
98
99
	src/feature/rend/rendcommon.c		\
	src/feature/rend/rendmid.c		\
	src/feature/rend/rendservice.c		\
100
101
	src/feature/stats/geoip.c		\
	src/feature/stats/rephist.c
Stewart Smith's avatar
Stewart Smith committed
102

103
104
105
106
if BUILD_NT_SERVICES
LIBTOR_APP_A_SOURCES += src/app/main/ntmain.c
endif

107
108
#
# Modules are conditionnally compiled in tor starting here. We add the C files
109
110
# only if the modules has been enabled at configure time. We always add the
# source files of every module to libtor-testing.a so we can build the unit
111
# tests for everything. See the UNITTESTS_ENABLED branch below.
112
#
113
LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
114
115

# The Directory Authority module.
116
117
118
119
120
121
MODULE_DIRAUTH_SOURCES = 					\
	src/feature/dirauth/dircollate.c			\
	src/feature/dirauth/dirvote.c				\
	src/feature/dirauth/shared_random.c			\
	src/feature/dirauth/shared_random_state.c

122
if BUILD_MODULE_DIRAUTH
123
LIBTOR_APP_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
124
125
endif

Nick Mathewson's avatar
Nick Mathewson committed
126
src_core_libtor_app_a_SOURCES = $(LIBTOR_APP_A_SOURCES)
rl1987's avatar
rl1987 committed
127
if UNITTESTS_ENABLED
128
129

# Add the sources of the modules that are needed for tests to work here.
130
LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
131

Nick Mathewson's avatar
Nick Mathewson committed
132
src_core_libtor_app_testing_a_SOURCES = $(LIBTOR_APP_TESTING_A_SOURCES)
rl1987's avatar
rl1987 committed
133
else
Nick Mathewson's avatar
Nick Mathewson committed
134
src_core_libtor_app_testing_a_SOURCES =
rl1987's avatar
rl1987 committed
135
endif
136

Sebastian Hahn's avatar
Sebastian Hahn committed
137
138
139
AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\""		\
		-DLOCALSTATEDIR="\"$(localstatedir)\""	\
		-DBINDIR="\"$(bindir)\""
Stewart Smith's avatar
Stewart Smith committed
140

Nick Mathewson's avatar
Nick Mathewson committed
141
142
src_core_libtor_app_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
src_core_libtor_app_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
143

144
145
noinst_HEADERS +=					\
	src/app/config/config.h				\
146
	src/app/config/confparse.h			\
147
148
	src/app/config/or_options_st.h			\
	src/app/config/or_state_st.h			\
149
	src/app/config/statefile.h			\
150
151
	src/app/main/ntmain.h				\
	src/core/crypto/hs_ntor.h			\
152
	src/core/crypto/onion.h				\
153
	src/core/crypto/onion_fast.h			\
154
155
	src/core/crypto/onion_ntor.h			\
	src/core/crypto/onion_tap.h			\
156
	src/core/crypto/relay_crypto.h			\
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
	src/core/mainloop/connection.h			\
	src/core/mainloop/cpuworker.h			\
	src/core/mainloop/main.h			\
	src/core/mainloop/periodic.h			\
	src/core/or/addr_policy_st.h			\
	src/core/or/address_set.h			\
	src/core/or/cell_queue_st.h			\
	src/core/or/cell_st.h				\
	src/core/or/channel.h				\
	src/core/or/channelpadding.h			\
	src/core/or/channeltls.h			\
	src/core/or/circuit_st.h			\
	src/core/or/circuitbuild.h			\
	src/core/or/circuitlist.h			\
	src/core/or/circuitmux.h			\
	src/core/or/circuitmux_ewma.h			\
173
	src/core/or/circuitstats.h			\
174
	src/core/or/circuituse.h			\
175
	src/core/or/command.h				\
176
177
	src/core/or/connection_edge.h			\
	src/core/or/connection_or.h			\
178
	src/core/or/connection_st.h			\
179
	src/core/or/cpath_build_state_st.h		\
180
181
	src/core/or/crypt_path_reference_st.h		\
	src/core/or/crypt_path_st.h			\
182
	src/core/or/destroy_cell_queue_st.h		\
183
	src/core/or/dos.h				\
184
185
	src/core/or/edge_connection_st.h		\
	src/core/or/entry_connection_st.h		\
186
	src/core/or/entry_port_cfg_st.h			\
187
188
189
190
191
192
	src/core/or/extend_info_st.h			\
	src/core/or/listener_connection_st.h		\
	src/core/or/or.h				\
	src/core/or/or_circuit_st.h			\
	src/core/or/or_connection_st.h			\
	src/core/or/or_handshake_certs_st.h		\
193
	src/core/or/or_handshake_state_st.h		\
194
	src/core/or/origin_circuit_st.h			\
195
	src/core/or/policies.h				\
196
197
	src/core/or/port_cfg_st.h			\
	src/core/or/protover.h				\
198
	src/core/or/reasons.h				\
199
200
201
202
203
204
	src/core/or/relay.h				\
	src/core/or/relay_crypto_st.h			\
	src/core/or/scheduler.h				\
	src/core/or/server_port_cfg_st.h		\
	src/core/or/socks_request_st.h			\
	src/core/or/status.h				\
205
	src/core/or/tor_version_st.h			\
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
	src/core/or/var_cell_st.h			\
	src/core/proto/proto_cell.h			\
	src/core/proto/proto_control0.h			\
	src/core/proto/proto_ext_or.h			\
	src/core/proto/proto_http.h			\
	src/core/proto/proto_socks.h			\
	src/feature/api/tor_api_internal.h		\
	src/feature/client/addressmap.h			\
	src/feature/client/bridges.h			\
	src/feature/client/circpathbias.h		\
	src/feature/client/dnsserv.h			\
	src/feature/client/entrynodes.h			\
	src/feature/client/transports.h			\
	src/feature/control/control.h			\
	src/feature/control/control_connection_st.h	\
	src/feature/dirauth/dircollate.h		\
	src/feature/dirauth/dirvote.h			\
	src/feature/dirauth/keypin.h			\
	src/feature/dirauth/mode.h			\
	src/feature/dirauth/ns_detached_signatures_st.h	\
	src/feature/dirauth/shared_random.h		\
	src/feature/dirauth/shared_random_state.h	\
	src/feature/dirauth/vote_microdesc_hash_st.h	\
	src/feature/dircache/cached_dir_st.h		\
	src/feature/dircache/conscache.h		\
	src/feature/dircache/consdiffmgr.h		\
	src/feature/dircache/directory.h		\
	src/feature/dircache/dirserv.h			\
	src/feature/dirclient/dir_server_st.h		\
	src/feature/dirclient/download_status_st.h	\
236
237
238
239
	src/feature/dircommon/consdiff.h		\
	src/feature/dircommon/dir_connection_st.h	\
	src/feature/dircommon/fp_pair.h			\
	src/feature/dircommon/vote_timing_st.h		\
240
	src/feature/dircommon/voting_schedule.h		\
241
242
	src/feature/hibernate/hibernate.h		\
	src/feature/hs/hs_cache.h			\
243
244
245
	src/feature/hs/hs_cell.h			\
	src/feature/hs/hs_circuit.h			\
	src/feature/hs/hs_circuitmap.h			\
246
	src/feature/hs/hs_client.h			\
247
	src/feature/hs/hs_common.h			\
248
	src/feature/hs/hs_config.h			\
249
	src/feature/hs/hs_control.h			\
250
	src/feature/hs/hs_descriptor.h			\
251
252
	src/feature/hs/hs_ident.h			\
	src/feature/hs/hs_intropoint.h			\
253
	src/feature/hs/hs_service.h			\
254
	src/feature/hs/hs_stats.h			\
255
	src/feature/hs/hsdir_index_st.h			\
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
	src/feature/hs_common/replaycache.h		\
	src/feature/hs_common/shared_random_client.h	\
	src/feature/nodelist/authority_cert_st.h	\
	src/feature/nodelist/desc_store_st.h		\
	src/feature/nodelist/document_signature_st.h	\
	src/feature/nodelist/extrainfo_st.h		\
	src/feature/nodelist/microdesc.h		\
	src/feature/nodelist/microdesc_st.h		\
	src/feature/nodelist/networkstatus.h		\
	src/feature/nodelist/networkstatus_sr_info_st.h	\
	src/feature/nodelist/networkstatus_st.h		\
	src/feature/nodelist/networkstatus_voter_info_st.h	\
	src/feature/nodelist/node_st.h			\
	src/feature/nodelist/nodelist.h			\
	src/feature/nodelist/parsecommon.h		\
	src/feature/nodelist/routerinfo_st.h		\
	src/feature/nodelist/routerlist.h		\
	src/feature/nodelist/routerlist_st.h		\
	src/feature/nodelist/routerparse.h		\
	src/feature/nodelist/routerset.h		\
	src/feature/nodelist/routerstatus_st.h		\
	src/feature/nodelist/signed_descriptor_st.h	\
	src/feature/nodelist/torcert.h			\
	src/feature/nodelist/vote_routerstatus_st.h	\
280
	src/feature/relay/dns.h				\
281
	src/feature/relay/dns_structs.h			\
282
283
284
285
286
	src/feature/relay/ext_orport.h			\
	src/feature/relay/router.h			\
	src/feature/relay/routerkeys.h			\
	src/feature/rend/rend_authorized_client_st.h	\
	src/feature/rend/rend_encoded_v2_service_descriptor_st.h	\
287
	src/feature/rend/rend_intro_point_st.h		\
288
	src/feature/rend/rend_service_descriptor_st.h	\
289
	src/feature/rend/rendcache.h			\
290
	src/feature/rend/rendclient.h			\
291
292
293
294
295
	src/feature/rend/rendcommon.h			\
	src/feature/rend/rendmid.h			\
	src/feature/rend/rendservice.h			\
	src/feature/stats/geoip.h			\
	src/feature/stats/rephist.h
296

297
298
299
noinst_HEADERS +=			\
	src/app/config/auth_dirs.inc	\
	src/app/config/fallback_dirs.inc
300

301
# This may someday want to be an installed file?
302
noinst_HEADERS += src/feature/api/tor_api.h
Stewart Smith's avatar
Stewart Smith committed
303

304
micro-revision.i: FORCE
cypherpunks's avatar
cypherpunks committed
305
	$(AM_V_at)rm -f micro-revision.tmp; \
306
	if test -r "$(top_srcdir)/.git" && \
cypherpunks's avatar
cypherpunks committed
307
308
309
310
311
312
313
314
315
316
317
318
319
320
			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
321

322
CLEANFILES+= micro-revision.i micro-revision.tmp
Stewart Smith's avatar
Stewart Smith committed
323

324
FORCE: