aboutsummaryrefslogtreecommitdiff
path: root/src/common/include.am
blob: cb307e9d5f9ba1e3fb90931e81b60c7d745cd075 (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
noinst_LIBRARIES += \
	src/common/libor.a \
	src/common/libor-ctime.a \
	src/common/libor-crypto.a \
	src/common/libor-event.a

if UNITTESTS_ENABLED
noinst_LIBRARIES += \
	src/common/libor-testing.a \
	src/common/libor-ctime-testing.a \
	src/common/libor-crypto-testing.a \
	src/common/libor-event-testing.a
endif

EXTRA_DIST += src/common/Makefile.nmake

#CFLAGS  = -Wall -Wpointer-arith -O2
AM_CPPFLAGS += -I$(srcdir)/src/common -Isrc/common -I$(srcdir)/src/ext/trunnel -I$(srcdir)/src/trunnel

if USE_OPENBSD_MALLOC
libor_extra_source=src/ext/OpenBSD_malloc_Linux.c
else
libor_extra_source=
endif

src_common_libcurve25519_donna_a_CFLAGS=

if BUILD_CURVE25519_DONNA
src_common_libcurve25519_donna_a_SOURCES=\
	src/ext/curve25519_donna/curve25519-donna.c
# See bug 13538 -- this code is known to have signed overflow issues.
src_common_libcurve25519_donna_a_CFLAGS+=\
	@F_OMIT_FRAME_POINTER@ @CFLAGS_CONSTTIME@
noinst_LIBRARIES+=src/common/libcurve25519_donna.a
LIBDONNA=src/common/libcurve25519_donna.a
else
if BUILD_CURVE25519_DONNA_C64
src_common_libcurve25519_donna_a_CFLAGS+=@CFLAGS_CONSTTIME@
src_common_libcurve25519_donna_a_SOURCES=\
	src/ext/curve25519_donna/curve25519-donna-c64.c
noinst_LIBRARIES+=src/common/libcurve25519_donna.a
LIBDONNA=src/common/libcurve25519_donna.a
else
LIBDONNA=
endif
endif

LIBDONNA += $(LIBED25519_REF10)
LIBDONNA += $(LIBED25519_DONNA)

if THREADS_PTHREADS
threads_impl_source=src/common/compat_pthreads.c
endif
if THREADS_WIN32
threads_impl_source=src/common/compat_winthreads.c
endif

if BUILD_READPASSPHRASE_C
readpassphrase_source=src/ext/readpassphrase.c
else
readpassphrase_source=
endif

if ADD_MULODI4
mulodi4_source=src/ext/mulodi/mulodi4.c
else
mulodi4_source=
endif

LIBOR_CTIME_A_SRC = \
   $(mulodi4_source) \
   src/ext/csiphash.c   \
   src/common/di_ops.c

src_common_libor_ctime_a_SOURCES = $(LIBOR_CTIME_A_SRC)
src_common_libor_ctime_testing_a_SOURCES = $(LIBOR_CTIME_A_SRC)
src_common_libor_ctime_a_CFLAGS = @CFLAGS_CONSTTIME@
src_common_libor_ctime_testing_a_CFLAGS = @CFLAGS_CONSTTIME@ $(TEST_CFLAGS)

LIBOR_A_SRC = \
  src/common/address.c					\
  src/common/address_set.c				\
  src/common/backtrace.c				\
  src/common/compat.c					\
  src/common/compat_threads.c				\
  src/common/compat_time.c				\
  src/common/container.c				\
  src/common/log.c					\
  src/common/memarea.c					\
  src/common/pubsub.c					\
  src/common/util.c					\
  src/common/util_bug.c					\
  src/common/util_format.c				\
  src/common/util_process.c				\
  src/common/sandbox.c					\
  src/common/workqueue.c				\
  $(libor_extra_source)					\
  $(threads_impl_source)				\
  $(readpassphrase_source)

src/common/src_common_libor_testing_a-log.$(OBJEXT) \
  src/common/log.$(OBJEXT): micro-revision.i

LIBOR_CRYPTO_A_SRC = \
  src/common/aes.c		\
  src/common/crypto.c		\
  src/common/crypto_pwbox.c     \
  src/common/crypto_s2k.c	\
  src/common/crypto_format.c	\
  src/common/torgzip.c		\
  src/common/tortls.c		\
  src/common/crypto_curve25519.c \
  src/common/crypto_ed25519.c

LIBOR_EVENT_A_SRC = \
	src/common/compat_libevent.c \
	src/common/procmon.c         \
	src/common/timers.c          \
	src/ext/timeouts/timeout.c

src_common_libor_a_SOURCES = $(LIBOR_A_SRC)
src_common_libor_crypto_a_SOURCES = $(LIBOR_CRYPTO_A_SRC)
src_common_libor_event_a_SOURCES = $(LIBOR_EVENT_A_SRC)

src_common_libor_testing_a_SOURCES = $(LIBOR_A_SRC)
src_common_libor_crypto_testing_a_SOURCES = $(LIBOR_CRYPTO_A_SRC)
src_common_libor_event_testing_a_SOURCES = $(LIBOR_EVENT_A_SRC)

src_common_libor_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
src_common_libor_crypto_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
src_common_libor_event_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
src_common_libor_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
src_common_libor_crypto_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
src_common_libor_event_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)

COMMONHEADERS = \
  src/common/address.h				\
  src/common/address_set.h			\
  src/common/backtrace.h			\
  src/common/aes.h				\
  src/common/ciphers.inc			\
  src/common/compat.h				\
  src/common/compat_libevent.h			\
  src/common/compat_openssl.h			\
  src/common/compat_threads.h			\
  src/common/compat_time.h			\
  src/common/container.h			\
  src/common/crypto.h				\
  src/common/crypto_curve25519.h		\
  src/common/crypto_ed25519.h			\
  src/common/crypto_format.h			\
  src/common/crypto_pwbox.h			\
  src/common/crypto_s2k.h			\
  src/common/di_ops.h				\
  src/common/handles.h				\
  src/common/memarea.h				\
  src/common/linux_syscalls.inc			\
  src/common/procmon.h				\
  src/common/pubsub.h				\
  src/common/sandbox.h				\
  src/common/testsupport.h			\
  src/common/timers.h				\
  src/common/torgzip.h				\
  src/common/torint.h				\
  src/common/torlog.h				\
  src/common/tortls.h				\
  src/common/util.h				\
  src/common/util_bug.h				\
  src/common/util_format.h			\
  src/common/util_process.h			\
  src/common/workqueue.h

noinst_HEADERS+= $(COMMONHEADERS)