Changes file for backporting 29530 to 0.3.5
[tor.git] / src / core / include.am
blob1b8ef2ac585e3064921e0bb4f4dc7169f4b8c03e
2 noinst_LIBRARIES += \
3         src/core/libtor-app.a
4 if UNITTESTS_ENABLED
5 noinst_LIBRARIES += \
6         src/core/libtor-app-testing.a
7 endif
9 LIBTOR_APP_A_SOURCES =                          \
10         src/app/config/config.c                 \
11         src/app/config/confparse.c              \
12         src/app/config/statefile.c              \
13         src/app/main/main.c                     \
14         src/core/crypto/hs_ntor.c               \
15         src/core/crypto/onion_crypto.c          \
16         src/core/crypto/onion_fast.c            \
17         src/core/crypto/onion_ntor.c            \
18         src/core/crypto/onion_tap.c             \
19         src/core/crypto/relay_crypto.c          \
20         src/core/mainloop/connection.c          \
21         src/core/mainloop/cpuworker.c           \
22         src/core/mainloop/mainloop.c            \
23         src/core/mainloop/netstatus.c           \
24         src/core/mainloop/periodic.c            \
25         src/core/or/address_set.c               \
26         src/core/or/channel.c                   \
27         src/core/or/channelpadding.c            \
28         src/core/or/channeltls.c                \
29         src/core/or/circuitbuild.c              \
30         src/core/or/circuitlist.c               \
31         src/core/or/circuitmux.c                \
32         src/core/or/circuitmux_ewma.c           \
33         src/core/or/circuitstats.c              \
34         src/core/or/circuituse.c                \
35         src/core/or/command.c                   \
36         src/core/or/connection_edge.c           \
37         src/core/or/connection_or.c             \
38         src/core/or/dos.c                       \
39         src/core/or/onion.c                     \
40         src/core/or/policies.c                  \
41         src/core/or/protover.c                  \
42         src/core/or/protover_rust.c             \
43         src/core/or/reasons.c                   \
44         src/core/or/relay.c                     \
45         src/core/or/scheduler.c                 \
46         src/core/or/scheduler_kist.c            \
47         src/core/or/scheduler_vanilla.c         \
48         src/core/or/status.c                    \
49         src/core/or/versions.c                  \
50         src/core/proto/proto_cell.c             \
51         src/core/proto/proto_control0.c         \
52         src/core/proto/proto_ext_or.c           \
53         src/core/proto/proto_http.c             \
54         src/core/proto/proto_socks.c            \
55         src/feature/api/tor_api.c               \
56         src/feature/client/addressmap.c         \
57         src/feature/client/bridges.c            \
58         src/feature/client/circpathbias.c       \
59         src/feature/client/dnsserv.c            \
60         src/feature/client/entrynodes.c         \
61         src/feature/client/transports.c         \
62         src/feature/control/control.c           \
63         src/feature/control/fmt_serverstatus.c  \
64         src/feature/control/getinfo_geoip.c     \
65         src/feature/dirauth/keypin.c            \
66         src/feature/dircache/conscache.c        \
67         src/feature/dircache/consdiffmgr.c      \
68         src/feature/dircache/dircache.c         \
69         src/feature/dircache/dirserv.c          \
70         src/feature/dirclient/dirclient.c       \
71         src/feature/dirclient/dlstatus.c        \
72         src/feature/dircommon/consdiff.c        \
73         src/feature/dircommon/directory.c       \
74         src/feature/dircommon/fp_pair.c         \
75         src/feature/dircommon/voting_schedule.c \
76         src/feature/dirparse/authcert_parse.c   \
77         src/feature/dirparse/microdesc_parse.c  \
78         src/feature/dirparse/ns_parse.c         \
79         src/feature/dirparse/parsecommon.c      \
80         src/feature/dirparse/policy_parse.c     \
81         src/feature/dirparse/routerparse.c      \
82         src/feature/dirparse/sigcommon.c        \
83         src/feature/dirparse/signing.c          \
84         src/feature/dirparse/unparseable.c      \
85         src/feature/hibernate/hibernate.c       \
86         src/feature/hs/hs_cache.c               \
87         src/feature/hs/hs_cell.c                \
88         src/feature/hs/hs_circuit.c             \
89         src/feature/hs/hs_circuitmap.c          \
90         src/feature/hs/hs_client.c              \
91         src/feature/hs/hs_common.c              \
92         src/feature/hs/hs_config.c              \
93         src/feature/hs/hs_control.c             \
94         src/feature/hs/hs_descriptor.c          \
95         src/feature/hs/hs_ident.c               \
96         src/feature/hs/hs_intropoint.c          \
97         src/feature/hs/hs_service.c             \
98         src/feature/hs/hs_stats.c               \
99         src/feature/hs_common/replaycache.c     \
100         src/feature/hs_common/shared_random_client.c    \
101         src/feature/keymgt/loadkey.c            \
102         src/feature/dirauth/keypin.c            \
103         src/feature/nodelist/authcert.c         \
104         src/feature/nodelist/describe.c         \
105         src/feature/nodelist/dirlist.c          \
106         src/feature/nodelist/microdesc.c        \
107         src/feature/nodelist/networkstatus.c    \
108         src/feature/nodelist/nickname.c         \
109         src/feature/nodelist/nodelist.c         \
110         src/feature/nodelist/node_select.c      \
111         src/feature/nodelist/routerinfo.c       \
112         src/feature/nodelist/routerlist.c       \
113         src/feature/nodelist/routerset.c        \
114         src/feature/nodelist/fmt_routerstatus.c \
115         src/feature/nodelist/torcert.c          \
116         src/feature/relay/dns.c                 \
117         src/feature/relay/ext_orport.c          \
118         src/feature/relay/onion_queue.c         \
119         src/feature/relay/router.c              \
120         src/feature/relay/routerkeys.c          \
121         src/feature/relay/routermode.c          \
122         src/feature/relay/selftest.c            \
123         src/feature/rend/rendcache.c            \
124         src/feature/rend/rendclient.c           \
125         src/feature/rend/rendcommon.c           \
126         src/feature/rend/rendmid.c              \
127         src/feature/rend/rendparse.c            \
128         src/feature/rend/rendservice.c          \
129         src/feature/stats/geoip_stats.c         \
130         src/feature/stats/rephist.c             \
131         src/feature/stats/predict_ports.c
133 # These should eventually move into module_dirauth_sources, but for now
134 # the separation is only in the code location.
135 LIBTOR_APP_A_SOURCES +=                         \
136         src/feature/dirauth/bwauth.c            \
137         src/feature/dirauth/dsigs_parse.c       \
138         src/feature/dirauth/guardfraction.c     \
139         src/feature/dirauth/reachability.c      \
140         src/feature/dirauth/recommend_pkg.c     \
141         src/feature/dirauth/process_descs.c     \
142         src/feature/dirauth/voteflags.c
144 if BUILD_NT_SERVICES
145 LIBTOR_APP_A_SOURCES += src/app/main/ntmain.c
146 endif
149 # Modules are conditionnally compiled in tor starting here. We add the C files
150 # only if the modules has been enabled at configure time. We always add the
151 # source files of every module to libtor-testing.a so we can build the unit
152 # tests for everything. See the UNITTESTS_ENABLED branch below.
154 LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
156 # The Directory Authority module.
157 MODULE_DIRAUTH_SOURCES =                                        \
158         src/feature/dirauth/authmode.c                          \
159         src/feature/dirauth/dircollate.c                        \
160         src/feature/dirauth/dirvote.c                           \
161         src/feature/dirauth/shared_random.c                     \
162         src/feature/dirauth/shared_random_state.c
164 if BUILD_MODULE_DIRAUTH
165 LIBTOR_APP_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
166 endif
168 src_core_libtor_app_a_SOURCES = $(LIBTOR_APP_A_SOURCES)
169 if UNITTESTS_ENABLED
171 # Add the sources of the modules that are needed for tests to work here.
172 LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
174 src_core_libtor_app_testing_a_SOURCES = $(LIBTOR_APP_TESTING_A_SOURCES)
175 else
176 src_core_libtor_app_testing_a_SOURCES =
177 endif
179 AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\""         \
180                 -DLOCALSTATEDIR="\"$(localstatedir)\""  \
181                 -DBINDIR="\"$(bindir)\""
183 src_core_libtor_app_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
184 src_core_libtor_app_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
186 noinst_HEADERS +=                                       \
187         src/app/config/config.h                         \
188         src/app/config/confparse.h                      \
189         src/app/config/or_options_st.h                  \
190         src/app/config/or_state_st.h                    \
191         src/app/config/statefile.h                      \
192         src/app/main/main.h                             \
193         src/app/main/ntmain.h                           \
194         src/core/crypto/hs_ntor.h                       \
195         src/core/crypto/onion_crypto.h                  \
196         src/core/crypto/onion_fast.h                    \
197         src/core/crypto/onion_ntor.h                    \
198         src/core/crypto/onion_tap.h                     \
199         src/core/crypto/relay_crypto.h                  \
200         src/core/mainloop/connection.h                  \
201         src/core/mainloop/cpuworker.h                   \
202         src/core/mainloop/mainloop.h                    \
203         src/core/mainloop/netstatus.h                   \
204         src/core/mainloop/periodic.h                    \
205         src/core/or/addr_policy_st.h                    \
206         src/core/or/address_set.h                       \
207         src/core/or/cell_queue_st.h                     \
208         src/core/or/cell_st.h                           \
209         src/core/or/channel.h                           \
210         src/core/or/channelpadding.h                    \
211         src/core/or/channeltls.h                        \
212         src/core/or/circuit_st.h                        \
213         src/core/or/circuitbuild.h                      \
214         src/core/or/circuitlist.h                       \
215         src/core/or/circuitmux.h                        \
216         src/core/or/circuitmux_ewma.h                   \
217         src/core/or/circuitstats.h                      \
218         src/core/or/circuituse.h                        \
219         src/core/or/command.h                           \
220         src/core/or/connection_edge.h                   \
221         src/core/or/connection_or.h                     \
222         src/core/or/connection_st.h                     \
223         src/core/or/cpath_build_state_st.h              \
224         src/core/or/crypt_path_reference_st.h           \
225         src/core/or/crypt_path_st.h                     \
226         src/core/or/destroy_cell_queue_st.h             \
227         src/core/or/dos.h                               \
228         src/core/or/edge_connection_st.h                \
229         src/core/or/half_edge_st.h              \
230         src/core/or/entry_connection_st.h               \
231         src/core/or/entry_port_cfg_st.h                 \
232         src/core/or/extend_info_st.h                    \
233         src/core/or/listener_connection_st.h            \
234         src/core/or/onion.h                             \
235         src/core/or/or.h                                \
236         src/core/or/or_circuit_st.h                     \
237         src/core/or/or_connection_st.h                  \
238         src/core/or/or_handshake_certs_st.h             \
239         src/core/or/or_handshake_state_st.h             \
240         src/core/or/origin_circuit_st.h                 \
241         src/core/or/policies.h                          \
242         src/core/or/port_cfg_st.h                       \
243         src/core/or/protover.h                          \
244         src/core/or/reasons.h                           \
245         src/core/or/relay.h                             \
246         src/core/or/relay_crypto_st.h                   \
247         src/core/or/scheduler.h                         \
248         src/core/or/server_port_cfg_st.h                \
249         src/core/or/socks_request_st.h                  \
250         src/core/or/status.h                            \
251         src/core/or/tor_version_st.h                    \
252         src/core/or/var_cell_st.h                       \
253         src/core/or/versions.h                          \
254         src/core/proto/proto_cell.h                     \
255         src/core/proto/proto_control0.h                 \
256         src/core/proto/proto_ext_or.h                   \
257         src/core/proto/proto_http.h                     \
258         src/core/proto/proto_socks.h                    \
259         src/feature/api/tor_api_internal.h              \
260         src/feature/client/addressmap.h                 \
261         src/feature/client/bridges.h                    \
262         src/feature/client/circpathbias.h               \
263         src/feature/client/dnsserv.h                    \
264         src/feature/client/entrynodes.h                 \
265         src/feature/client/transports.h                 \
266         src/feature/control/control.h                   \
267         src/feature/control/control_connection_st.h     \
268         src/feature/control/fmt_serverstatus.h          \
269         src/feature/control/getinfo_geoip.h             \
270         src/feature/dirauth/authmode.h                  \
271         src/feature/dirauth/bwauth.h                    \
272         src/feature/dirauth/dircollate.h                \
273         src/feature/dirauth/dirvote.h                   \
274         src/feature/dirauth/dsigs_parse.h               \
275         src/feature/dirauth/guardfraction.h             \
276         src/feature/dirauth/keypin.h                    \
277         src/feature/dirauth/ns_detached_signatures_st.h \
278         src/feature/dirauth/reachability.h              \
279         src/feature/dirauth/recommend_pkg.h             \
280         src/feature/dirauth/process_descs.h             \
281         src/feature/dirauth/shared_random.h             \
282         src/feature/dirauth/shared_random_state.h       \
283         src/feature/dirauth/vote_microdesc_hash_st.h    \
284         src/feature/dirauth/voteflags.h                 \
285         src/feature/dircache/cached_dir_st.h            \
286         src/feature/dircache/conscache.h                \
287         src/feature/dircache/consdiffmgr.h              \
288         src/feature/dircache/dircache.h                 \
289         src/feature/dircache/dirserv.h                  \
290         src/feature/dirclient/dir_server_st.h           \
291         src/feature/dirclient/dirclient.h               \
292         src/feature/dirclient/dlstatus.h                \
293         src/feature/dirclient/download_status_st.h      \
294         src/feature/dircommon/consdiff.h                \
295         src/feature/dircommon/dir_connection_st.h       \
296         src/feature/dircommon/directory.h               \
297         src/feature/dircommon/fp_pair.h                 \
298         src/feature/dircommon/vote_timing_st.h          \
299         src/feature/dircommon/voting_schedule.h         \
300         src/feature/dirparse/authcert_members.i         \
301         src/feature/dirparse/authcert_parse.h           \
302         src/feature/dirparse/microdesc_parse.h          \
303         src/feature/dirparse/ns_parse.h                 \
304         src/feature/dirparse/parsecommon.h              \
305         src/feature/dirparse/policy_parse.h             \
306         src/feature/dirparse/routerparse.h              \
307         src/feature/dirparse/sigcommon.h                \
308         src/feature/dirparse/signing.h                  \
309         src/feature/dirparse/unparseable.h              \
310         src/feature/hibernate/hibernate.h               \
311         src/feature/hs/hs_cache.h                       \
312         src/feature/hs/hs_cell.h                        \
313         src/feature/hs/hs_circuit.h                     \
314         src/feature/hs/hs_circuitmap.h                  \
315         src/feature/hs/hs_client.h                      \
316         src/feature/hs/hs_common.h                      \
317         src/feature/hs/hs_config.h                      \
318         src/feature/hs/hs_control.h                     \
319         src/feature/hs/hs_descriptor.h                  \
320         src/feature/hs/hs_ident.h                       \
321         src/feature/hs/hs_intropoint.h                  \
322         src/feature/hs/hs_service.h                     \
323         src/feature/hs/hs_stats.h                       \
324         src/feature/hs/hsdir_index_st.h                 \
325         src/feature/hs_common/replaycache.h             \
326         src/feature/hs_common/shared_random_client.h    \
327         src/feature/keymgt/loadkey.h                    \
328         src/feature/nodelist/authcert.h                 \
329         src/feature/nodelist/authority_cert_st.h        \
330         src/feature/nodelist/describe.h                 \
331         src/feature/nodelist/desc_store_st.h            \
332         src/feature/nodelist/dirlist.h                  \
333         src/feature/nodelist/document_signature_st.h    \
334         src/feature/nodelist/extrainfo_st.h             \
335         src/feature/nodelist/microdesc.h                \
336         src/feature/nodelist/microdesc_st.h             \
337         src/feature/nodelist/networkstatus.h            \
338         src/feature/nodelist/networkstatus_sr_info_st.h \
339         src/feature/nodelist/networkstatus_st.h         \
340         src/feature/nodelist/networkstatus_voter_info_st.h      \
341         src/feature/nodelist/nickname.h                 \
342         src/feature/nodelist/node_st.h                  \
343         src/feature/nodelist/nodelist.h                 \
344         src/feature/nodelist/node_select.h              \
345         src/feature/nodelist/routerinfo.h               \
346         src/feature/nodelist/routerinfo_st.h            \
347         src/feature/nodelist/routerlist.h               \
348         src/feature/nodelist/routerlist_st.h            \
349         src/feature/nodelist/routerset.h                \
350         src/feature/nodelist/fmt_routerstatus.h         \
351         src/feature/nodelist/routerstatus_st.h          \
352         src/feature/nodelist/signed_descriptor_st.h     \
353         src/feature/nodelist/torcert.h                  \
354         src/feature/nodelist/vote_routerstatus_st.h     \
355         src/feature/relay/dns.h                         \
356         src/feature/relay/dns_structs.h                 \
357         src/feature/relay/ext_orport.h                  \
358         src/feature/relay/onion_queue.h                 \
359         src/feature/relay/router.h                      \
360         src/feature/relay/routerkeys.h                  \
361         src/feature/relay/routermode.h                  \
362         src/feature/relay/selftest.h                    \
363         src/feature/rend/rend_authorized_client_st.h    \
364         src/feature/rend/rend_encoded_v2_service_descriptor_st.h        \
365         src/feature/rend/rend_intro_point_st.h          \
366         src/feature/rend/rend_service_descriptor_st.h   \
367         src/feature/rend/rendcache.h                    \
368         src/feature/rend/rendclient.h                   \
369         src/feature/rend/rendcommon.h                   \
370         src/feature/rend/rendmid.h                      \
371         src/feature/rend/rendparse.h                    \
372         src/feature/rend/rendservice.h                  \
373         src/feature/stats/geoip_stats.h                 \
374         src/feature/stats/rephist.h                     \
375         src/feature/stats/predict_ports.h
377 noinst_HEADERS +=                       \
378         src/app/config/auth_dirs.inc    \
379         src/app/config/fallback_dirs.inc
381 # This may someday want to be an installed file?
382 noinst_HEADERS += src/feature/api/tor_api.h
384 micro-revision.i: FORCE
385         $(AM_V_at)rm -f micro-revision.tmp; \
386         if test -r "$(top_srcdir)/.git" && \
387                         test -x "`which git 2>&1;true`"; then \
388                 HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
389                 echo \"$$HASH\" > micro-revision.tmp; \
390         fi; \
391         if test ! -f micro-revision.tmp; then \
392                 if test ! -f micro-revision.i; then \
393                         echo '""' > micro-revision.i; \
394                 fi; \
395         elif test ! -f micro-revision.i || \
396                         test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
397                 mv micro-revision.tmp micro-revision.i; \
398         fi; \
399         rm -f micro-revision.tmp; \
400         true
402 CLEANFILES+= micro-revision.i micro-revision.tmp
404 FORCE: