aboutsummaryrefslogtreecommitdiff
path: root/src/or/include.am
blob: 08a27e17b2059cad1a77c901ab608b30a475ca16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
bin_PROGRAMS+= src/or/tor
noinst_LIBRARIES+= src/or/libtor.a

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

EXTRA_DIST+= src/or/ntmain.c src/or/or_sha1.i src/or/Makefile.nmake

if USE_EXTERNAL_EVDNS
evdns_source=
else
evdns_source=src/ext/eventdns.c
endif

if CURVE25519_ENABLED
onion_ntor_source=src/or/onion_ntor.c
else
onion_ntor_source=
endif

src_or_libtor_a_SOURCES = \
	src/or/addressmap.c				\
	src/or/buffers.c				\
	src/or/channel.c				\
	src/or/channeltls.c				\
	src/or/circuitbuild.c				\
	src/or/circuitlist.c				\
	src/or/circuitmux.c				\
	src/or/circuitmux_ewma.c			\
	src/or/circuitstats.c				\
	src/or/circuituse.c				\
	src/or/command.c				\
	src/or/config.c					\
	src/or/confparse.c				\
	src/or/connection.c				\
	src/or/connection_edge.c			\
	src/or/connection_or.c				\
	src/or/control.c				\
	src/or/cpuworker.c				\
	src/or/directory.c				\
	src/or/dirserv.c				\
	src/or/dirvote.c				\
	src/or/dns.c					\
	src/or/dnsserv.c				\
	src/or/geoip.c					\
	src/or/entrynodes.c				\
	src/or/hibernate.c				\
	src/or/main.c					\
	src/or/microdesc.c				\
	src/or/networkstatus.c				\
	src/or/nodelist.c				\
	src/or/onion.c					\
	src/or/onion_fast.c				\
	src/or/onion_tap.c				\
	src/or/transports.c				\
	src/or/policies.c				\
	src/or/reasons.c				\
	src/or/relay.c					\
	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					\
	src/or/routerlist.c				\
	src/or/routerparse.c				\
	src/or/routerset.c				\
	src/or/statefile.c				\
	src/or/status.c					\
	$(evdns_source)					\
	$(tor_platform_source)				\
	$(onion_ntor_source)				\
	src/or/config_codedigest.c

#libtor_a_LIBADD = ../common/libor.a ../common/libor-crypto.a \
#	../common/libor-event.a


src_or_tor_SOURCES = src/or/tor_main.c
AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or

src/or/tor_main.o: micro-revision.i

AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\"" \
        -DLOCALSTATEDIR="\"$(localstatedir)\"" \
        -DBINDIR="\"$(bindir)\""

# -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@
src_or_tor_LDADD = src/or/libtor.a src/common/libor.a \
	src/common/libor-crypto.a $(LIBDONNA) \
	src/common/libor-event.a \
	@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
	@TOR_LIB_WS32@ @TOR_LIB_GDI@

ORHEADERS = \
	src/or/addressmap.h				\
	src/or/buffers.h				\
	src/or/channel.h				\
	src/or/channeltls.h				\
	src/or/circuitbuild.h				\
	src/or/circuitlist.h				\
	src/or/circuitmux.h				\
	src/or/circuitmux_ewma.h			\
	src/or/circuitstats.h				\
	src/or/circuituse.h				\
	src/or/command.h				\
	src/or/config.h					\
	src/or/confparse.h				\
	src/or/connection.h				\
	src/or/connection_edge.h			\
	src/or/connection_or.h				\
	src/or/control.h				\
	src/or/cpuworker.h				\
	src/or/directory.h				\
	src/or/dirserv.h				\
	src/or/dirvote.h				\
	src/or/dns.h					\
	src/or/dnsserv.h				\
	src/or/eventdns_tor.h				\
	src/or/geoip.h					\
	src/or/entrynodes.h				\
	src/or/hibernate.h				\
	src/or/main.h					\
	src/or/microdesc.h				\
	src/or/networkstatus.h				\
	src/or/nodelist.h				\
	src/or/ntmain.h					\
	src/or/onion.h					\
	src/or/onion_fast.h				\
	src/or/onion_ntor.h				\
	src/or/onion_tap.h				\
	src/or/or.h					\
	src/or/transports.h				\
	src/or/policies.h				\
	src/or/reasons.h				\
	src/or/relay.h					\
	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					\
	src/or/routerlist.h				\
	src/or/routerset.h				\
	src/or/routerparse.h				\
	src/or/statefile.h				\
	src/or/status.h

noinst_HEADERS+= $(ORHEADERS) micro-revision.i

src/or/config_codedigest.o: src/or/or_sha1.i

micro-revision.i: FORCE
	@rm -f micro-revision.tmp;				\
	if test -d "$(top_srcdir)/.git" &&				\
	  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; true

src/or/or_sha1.i: $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)
	$(AM_V_GEN)if test "@SHA1SUM@" != none; then \
	  (cd "$(srcdir)" && "@SHA1SUM@" $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS) ) | \
	  "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > src/or/or_sha1.i; \
	elif test "@OPENSSL@" != none; then \
	  (cd "$(srcdir)" && "@OPENSSL@" sha1 $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)) | \
	  "@SED@" -n 's/SHA1(\(.*\))= \(.*\)/"\2  \1\\n"/p' > src/or/or_sha1.i; \
	else \
	  rm src/or/or_sha1.i; \
	  touch src/or/or_sha1.i; \
	fi

CLEANFILES+= micro-revision.i

FORCE: