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