include.am 6.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				\
Stewart Smith's avatar
Stewart Smith committed
22
	src/or/buffers.c				\
23
	src/or/channel.c				\
24
	src/or/channeltls.c				\
25
	src/or/circpathbias.c				\
Stewart Smith's avatar
Stewart Smith committed
26
27
	src/or/circuitbuild.c				\
	src/or/circuitlist.c				\
28
	src/or/circuitmux.c				\
29
	src/or/circuitmux_ewma.c			\
30
	src/or/circuitstats.c				\
Stewart Smith's avatar
Stewart Smith committed
31
32
	src/or/circuituse.c				\
	src/or/command.c				\
33
34
	src/or/config.c					\
	src/or/confparse.c				\
Stewart Smith's avatar
Stewart Smith committed
35
36
37
38
39
	src/or/connection.c				\
	src/or/connection_edge.c			\
	src/or/connection_or.c				\
	src/or/control.c				\
	src/or/cpuworker.c				\
40
	src/or/dircollate.c				\
Stewart Smith's avatar
Stewart Smith committed
41
42
43
44
45
	src/or/directory.c				\
	src/or/dirserv.c				\
	src/or/dirvote.c				\
	src/or/dns.c					\
	src/or/dnsserv.c				\
46
	src/or/dos.c					\
Sebastian Hahn's avatar
Sebastian Hahn committed
47
	src/or/fp_pair.c				\
Stewart Smith's avatar
Stewart Smith committed
48
	src/or/geoip.c					\
49
	src/or/entrynodes.c				\
50
	src/or/ext_orport.c				\
Stewart Smith's avatar
Stewart Smith committed
51
	src/or/hibernate.c				\
52
	src/or/keypin.c					\
Stewart Smith's avatar
Stewart Smith committed
53
54
55
56
57
	src/or/main.c					\
	src/or/microdesc.c				\
	src/or/networkstatus.c				\
	src/or/nodelist.c				\
	src/or/onion.c					\
58
59
	src/or/onion_fast.c				\
	src/or/onion_tap.c				\
60
61
	src/or/shared_random.c			\
	src/or/shared_random_state.c		\
Stewart Smith's avatar
Stewart Smith committed
62
	src/or/transports.c				\
63
	src/or/periodic.c				\
64
	src/or/protover.c				\
Stewart Smith's avatar
Stewart Smith committed
65
66
67
	src/or/policies.c				\
	src/or/reasons.c				\
	src/or/relay.c					\
David Goulet's avatar
David Goulet committed
68
	src/or/rendcache.c				\
Stewart Smith's avatar
Stewart Smith committed
69
70
71
72
73
74
75
	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					\
76
	src/or/routerkeys.c				\
Stewart Smith's avatar
Stewart Smith committed
77
78
	src/or/routerlist.c				\
	src/or/routerparse.c				\
79
	src/or/routerset.c				\
80
	src/or/scheduler.c				\
81
	src/or/statefile.c				\
Stewart Smith's avatar
Stewart Smith committed
82
	src/or/status.c					\
83
	src/or/torcert.c				\
84
	src/or/onion_ntor.c				\
Nick Mathewson's avatar
Nick Mathewson committed
85
	$(tor_platform_source)
Stewart Smith's avatar
Stewart Smith committed
86

87
88
89
src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES)
src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES)

Stewart Smith's avatar
Stewart Smith committed
90
src_or_tor_SOURCES = src/or/tor_main.c
91
AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
Stewart Smith's avatar
Stewart Smith committed
92

93
94
src/or/tor_main.$(OBJEXT) \
  src/or/src_or_tor_cov-tor_main.$(OBJEXT): micro-revision.i
Stewart Smith's avatar
Stewart Smith committed
95

Sebastian Hahn's avatar
Sebastian Hahn committed
96
97
98
AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\""		\
		-DLOCALSTATEDIR="\"$(localstatedir)\""	\
		-DBINDIR="\"$(bindir)\""
Stewart Smith's avatar
Stewart Smith committed
99

100
src_or_libtor_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
101
src_or_libtor_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
102

Stewart Smith's avatar
Stewart Smith committed
103
104
105
106
107
108
# -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@
109
src_or_tor_LDADD = src/or/libtor.a src/common/libor.a src/common/libor-ctime.a \
110
	src/common/libor-crypto.a $(LIBKECCAK_TINY) $(LIBDONNA) \
111
	src/common/libor-event.a src/trunnel/libor-trunnel.a \
Stewart Smith's avatar
Stewart Smith committed
112
	@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
113
	@TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@
Stewart Smith's avatar
Stewart Smith committed
114

115
116
if COVERAGE_ENABLED
src_or_tor_cov_SOURCES = src/or/tor_main.c
117
src_or_tor_cov_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
118
119
120
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 \
121
	src/common/libor-ctime-testing.a \
122
	src/common/libor-crypto-testing.a $(LIBKECCAK_TINY) $(LIBDONNA) \
123
	src/common/libor-event-testing.a src/trunnel/libor-trunnel-testing.a \
124
	@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
125
	@TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@
126
127
endif

128
ORHEADERS = \
129
	src/or/addressmap.h				\
Stewart Smith's avatar
Stewart Smith committed
130
	src/or/buffers.h				\
131
	src/or/channel.h				\
132
	src/or/channeltls.h				\
133
	src/or/circpathbias.h				\
Stewart Smith's avatar
Stewart Smith committed
134
135
	src/or/circuitbuild.h				\
	src/or/circuitlist.h				\
136
	src/or/circuitmux.h				\
137
	src/or/circuitmux_ewma.h			\
138
	src/or/circuitstats.h				\
Stewart Smith's avatar
Stewart Smith committed
139
140
141
	src/or/circuituse.h				\
	src/or/command.h				\
	src/or/config.h					\
142
	src/or/confparse.h				\
Stewart Smith's avatar
Stewart Smith committed
143
144
145
146
147
	src/or/connection.h				\
	src/or/connection_edge.h			\
	src/or/connection_or.h				\
	src/or/control.h				\
	src/or/cpuworker.h				\
148
	src/or/dircollate.h				\
Stewart Smith's avatar
Stewart Smith committed
149
150
151
152
	src/or/directory.h				\
	src/or/dirserv.h				\
	src/or/dirvote.h				\
	src/or/dns.h					\
153
	src/or/dns_structs.h				\
Stewart Smith's avatar
Stewart Smith committed
154
	src/or/dnsserv.h				\
155
	src/or/dos.h					\
156
	src/or/ext_orport.h				\
157
	src/or/fallback_dirs.inc			\
158
	src/or/fp_pair.h				\
Stewart Smith's avatar
Stewart Smith committed
159
	src/or/geoip.h					\
160
	src/or/entrynodes.h				\
Stewart Smith's avatar
Stewart Smith committed
161
	src/or/hibernate.h				\
162
	src/or/keypin.h					\
Stewart Smith's avatar
Stewart Smith committed
163
164
165
166
167
168
	src/or/main.h					\
	src/or/microdesc.h				\
	src/or/networkstatus.h				\
	src/or/nodelist.h				\
	src/or/ntmain.h					\
	src/or/onion.h					\
169
	src/or/onion_fast.h				\
170
	src/or/onion_ntor.h				\
171
	src/or/onion_tap.h				\
Stewart Smith's avatar
Stewart Smith committed
172
	src/or/or.h					\
173
174
	src/or/shared_random.h			\
	src/or/shared_random_state.h		\
Stewart Smith's avatar
Stewart Smith committed
175
	src/or/transports.h				\
176
	src/or/periodic.h				\
Stewart Smith's avatar
Stewart Smith committed
177
	src/or/policies.h				\
178
	src/or/protover.h				\
Stewart Smith's avatar
Stewart Smith committed
179
180
	src/or/reasons.h				\
	src/or/relay.h					\
David Goulet's avatar
David Goulet committed
181
	src/or/rendcache.h				\
Stewart Smith's avatar
Stewart Smith committed
182
183
184
185
186
187
188
	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					\
189
	src/or/routerkeys.h				\
Stewart Smith's avatar
Stewart Smith committed
190
	src/or/routerlist.h				\
191
	src/or/routerkeys.h				\
192
	src/or/routerset.h				\
Stewart Smith's avatar
Stewart Smith committed
193
	src/or/routerparse.h				\
194
	src/or/scheduler.h				\
195
	src/or/statefile.h				\
196
197
	src/or/status.h					\
	src/or/torcert.h
198
199

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

201
micro-revision.i: FORCE
cypherpunks's avatar
cypherpunks committed
202
	$(AM_V_at)rm -f micro-revision.tmp; \
203
	if test -r "$(top_srcdir)/.git" && \
cypherpunks's avatar
cypherpunks committed
204
205
206
207
208
209
210
211
212
213
214
215
216
217
			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
218

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

221
FORCE: