• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
3
4CFLAGS	?= -O2
5WARNING_CFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral
6WARNING_CXXFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral
7LDFLAGS ?=
8
9MBEDTLS_TEST_PATH:=../tests/src
10MBEDTLS_TEST_OBJS:=$(patsubst %.c,%.o,$(wildcard ${MBEDTLS_TEST_PATH}/*.c ${MBEDTLS_TEST_PATH}/drivers/*.c))
11
12LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../tests/include -I../include -D_FILE_OFFSET_BITS=64
13LOCAL_CXXFLAGS = $(WARNING_CXXFLAGS) -I../include -I../tests/include -D_FILE_OFFSET_BITS=64
14LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} 		\
15		-L../library 			\
16		-lmbedtls$(SHARED_SUFFIX)	\
17		-lmbedx509$(SHARED_SUFFIX)	\
18		-lmbedcrypto$(SHARED_SUFFIX)
19
20ifeq ($(shell uname -s),Linux)
21DLOPEN_LDFLAGS ?= -ldl
22else
23DLOPEN_LDFLAGS ?=
24endif
25
26include ../3rdparty/Makefile.inc
27LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
28
29ifndef SHARED
30MBEDLIBS=../library/libmbedcrypto.a ../library/libmbedx509.a ../library/libmbedtls.a
31else
32MBEDLIBS=../library/libmbedcrypto.$(DLEXT) ../library/libmbedx509.$(DLEXT) ../library/libmbedtls.$(DLEXT)
33endif
34DEP=${MBEDLIBS} ${MBEDTLS_TEST_OBJS}
35
36ifdef DEBUG
37LOCAL_CFLAGS += -g3
38endif
39
40# if we're running on Windows, build for Windows
41ifdef WINDOWS
42WINDOWS_BUILD=1
43endif
44
45ifdef WINDOWS_BUILD
46DLEXT=dll
47EXEXT=.exe
48LOCAL_LDFLAGS += -lws2_32
49ifdef SHARED
50SHARED_SUFFIX=.$(DLEXT)
51endif
52else
53DLEXT ?= so
54EXEXT=
55SHARED_SUFFIX=
56endif
57
58ifdef WINDOWS
59PYTHON ?= python
60else
61PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi)
62endif
63
64# Only build the dlopen test in shared library builds, and not when building
65# for Windows.
66ifdef BUILD_DLOPEN
67# Don't override the value
68else ifdef WINDOWS_BUILD
69BUILD_DLOPEN =
70else ifdef SHARED
71BUILD_DLOPEN = y
72else
73BUILD_DLOPEN =
74endif
75
76## The following assignment is the list of base names of applications that
77## will be built on Windows. Extra Linux/Unix/POSIX-only applications can
78## be declared by appending with `APPS += ...` afterwards.
79## See the get_app_list function in scripts/generate_visualc_files.pl and
80## make sure to check that it still works if you tweak the format here.
81APPS = \
82	aes/crypt_and_hash \
83	cipher/cipher_aead_demo \
84	hash/generic_sum \
85	hash/hello \
86	hash/md_hmac_demo \
87	pkey/dh_client \
88	pkey/dh_genprime \
89	pkey/dh_server \
90	pkey/ecdh_curve25519 \
91	pkey/ecdsa \
92	pkey/gen_key \
93	pkey/key_app \
94	pkey/key_app_writer \
95	pkey/mpi_demo \
96	pkey/pk_decrypt \
97	pkey/pk_encrypt \
98	pkey/pk_sign \
99	pkey/pk_verify \
100	pkey/rsa_decrypt \
101	pkey/rsa_encrypt \
102	pkey/rsa_genkey \
103	pkey/rsa_sign \
104	pkey/rsa_sign_pss \
105	pkey/rsa_verify \
106	pkey/rsa_verify_pss \
107	psa/aead_demo \
108	psa/crypto_examples \
109	psa/hmac_demo \
110	psa/key_ladder_demo \
111	psa/psa_constant_names \
112	random/gen_entropy \
113	random/gen_random_ctr_drbg \
114	ssl/dtls_client \
115	ssl/dtls_server \
116	ssl/mini_client \
117	ssl/ssl_client1 \
118	ssl/ssl_client2 \
119	ssl/ssl_context_info \
120	ssl/ssl_fork_server \
121	ssl/ssl_mail_client \
122	ssl/ssl_server \
123	ssl/ssl_server2 \
124	test/benchmark \
125	test/query_compile_time_config \
126	test/selftest \
127	test/udp_proxy \
128	test/zeroize \
129	util/pem2der \
130	util/strerror \
131	x509/cert_app \
132	x509/cert_req \
133	x509/cert_write \
134	x509/crl_app \
135	x509/load_roots \
136	x509/req_app \
137# End of APPS
138
139ifdef PTHREAD
140APPS +=	ssl/ssl_pthread_server
141endif
142
143ifdef BUILD_DLOPEN
144APPS +=	test/dlopen
145endif
146
147ifdef TEST_CPP
148APPS += test/cpp_dummy_build
149endif
150
151EXES = $(patsubst %,%$(EXEXT),$(APPS))
152
153.SILENT:
154
155.PHONY: all clean list fuzz
156
157all: $(EXES)
158ifndef WINDOWS
159# APPS doesn't include the fuzzing programs, which aren't "normal"
160# sample or test programs, and don't build with MSVC which is
161# warning about fopen
162all: fuzz
163endif
164
165fuzz: ${MBEDTLS_TEST_OBJS}
166	$(MAKE) -C fuzz THIRDPARTY_INCLUDES=$(THIRDPARTY_INCLUDES)
167
168$(MBEDLIBS):
169	$(MAKE) -C ../library
170
171${MBEDTLS_TEST_OBJS}:
172	$(MAKE) -C ../tests mbedtls_test
173
174.PHONY: generated_files
175GENERATED_FILES = psa/psa_constant_names_generated.c test/query_config.c
176generated_files: $(GENERATED_FILES)
177
178psa/psa_constant_names_generated.c: ../scripts/generate_psa_constants.py
179psa/psa_constant_names_generated.c: ../include/psa/crypto_values.h
180psa/psa_constant_names_generated.c: ../include/psa/crypto_extra.h
181psa/psa_constant_names_generated.c: ../tests/suites/test_suite_psa_crypto_metadata.data
182psa/psa_constant_names_generated.c:
183	echo "  Gen   $@"
184	$(PYTHON) ../scripts/generate_psa_constants.py
185
186test/query_config.c: ../scripts/generate_query_config.pl
187## The generated file only depends on the options that are present in mbedtls_config.h,
188## not on which options are set. To avoid regenerating this file all the time
189## when switching between configurations, don't declare mbedtls_config.h as a
190## dependency. Remove this file from your working tree if you've just added or
191## removed an option in mbedtls_config.h.
192#test/query_config.c: ../include/mbedtls/mbedtls_config.h
193test/query_config.c: ../scripts/data_files/query_config.fmt
194test/query_config.c:
195	echo "  Gen   $@"
196	$(PERL) ../scripts/generate_query_config.pl
197
198aes/crypt_and_hash$(EXEXT): aes/crypt_and_hash.c $(DEP)
199	echo "  CC    aes/crypt_and_hash.c"
200	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) aes/crypt_and_hash.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
201
202cipher/cipher_aead_demo$(EXEXT): cipher/cipher_aead_demo.c $(DEP)
203	echo "  CC    cipher/cipher_aead_demo.c"
204	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) cipher/cipher_aead_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
205
206hash/generic_sum$(EXEXT): hash/generic_sum.c $(DEP)
207	echo "  CC    hash/generic_sum.c"
208	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/generic_sum.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
209
210hash/hello$(EXEXT): hash/hello.c $(DEP)
211	echo "  CC    hash/hello.c"
212	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/hello.c       $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
213
214hash/md_hmac_demo$(EXEXT): hash/md_hmac_demo.c $(DEP)
215	echo "  CC    hash/md_hmac_demo.c"
216	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/md_hmac_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
217
218pkey/dh_client$(EXEXT): pkey/dh_client.c $(DEP)
219	echo "  CC    pkey/dh_client.c"
220	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_client.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
221
222pkey/dh_genprime$(EXEXT): pkey/dh_genprime.c $(DEP)
223	echo "  CC    pkey/dh_genprime.c"
224	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_genprime.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
225
226pkey/dh_server$(EXEXT): pkey/dh_server.c $(DEP)
227	echo "  CC    pkey/dh_server.c"
228	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_server.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
229
230pkey/ecdh_curve25519$(EXEXT): pkey/ecdh_curve25519.c $(DEP)
231	echo "  CC    pkey/ecdh_curve25519.c"
232	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/ecdh_curve25519.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
233
234pkey/ecdsa$(EXEXT): pkey/ecdsa.c $(DEP)
235	echo "  CC    pkey/ecdsa.c"
236	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/ecdsa.c       $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
237
238pkey/gen_key$(EXEXT): pkey/gen_key.c $(DEP)
239	echo "  CC    pkey/gen_key.c"
240	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/gen_key.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
241
242pkey/key_app$(EXEXT): pkey/key_app.c $(DEP)
243	echo "  CC    pkey/key_app.c"
244	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/key_app.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
245
246pkey/key_app_writer$(EXEXT): pkey/key_app_writer.c $(DEP)
247	echo "  CC    pkey/key_app_writer.c"
248	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/key_app_writer.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
249
250pkey/mpi_demo$(EXEXT): pkey/mpi_demo.c $(DEP)
251	echo "  CC    pkey/mpi_demo.c"
252	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/mpi_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
253
254pkey/pk_decrypt$(EXEXT): pkey/pk_decrypt.c $(DEP)
255	echo "  CC    pkey/pk_decrypt.c"
256	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_decrypt.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
257
258pkey/pk_encrypt$(EXEXT): pkey/pk_encrypt.c $(DEP)
259	echo "  CC    pkey/pk_encrypt.c"
260	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_encrypt.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
261
262pkey/pk_sign$(EXEXT): pkey/pk_sign.c $(DEP)
263	echo "  CC    pkey/pk_sign.c"
264	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_sign.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
265
266pkey/pk_verify$(EXEXT): pkey/pk_verify.c $(DEP)
267	echo "  CC    pkey/pk_verify.c"
268	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_verify.c  $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
269
270pkey/rsa_genkey$(EXEXT): pkey/rsa_genkey.c $(DEP)
271	echo "  CC    pkey/rsa_genkey.c"
272	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_genkey.c  $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
273
274pkey/rsa_sign$(EXEXT): pkey/rsa_sign.c $(DEP)
275	echo "  CC    pkey/rsa_sign.c"
276	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_sign.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
277
278pkey/rsa_verify$(EXEXT): pkey/rsa_verify.c $(DEP)
279	echo "  CC    pkey/rsa_verify.c"
280	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_verify.c  $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
281
282pkey/rsa_sign_pss$(EXEXT): pkey/rsa_sign_pss.c $(DEP)
283	echo "  CC    pkey/rsa_sign_pss.c"
284	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_sign_pss.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
285
286pkey/rsa_verify_pss$(EXEXT): pkey/rsa_verify_pss.c $(DEP)
287	echo "  CC    pkey/rsa_verify_pss.c"
288	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_verify_pss.c  $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
289
290pkey/rsa_decrypt$(EXEXT): pkey/rsa_decrypt.c $(DEP)
291	echo "  CC    pkey/rsa_decrypt.c"
292	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_decrypt.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
293
294pkey/rsa_encrypt$(EXEXT): pkey/rsa_encrypt.c $(DEP)
295	echo "  CC    pkey/rsa_encrypt.c"
296	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_encrypt.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
297
298psa/aead_demo$(EXEXT): psa/aead_demo.c $(DEP)
299	echo "  CC    psa/aead_demo.c"
300	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/aead_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
301
302psa/crypto_examples$(EXEXT): psa/crypto_examples.c $(DEP)
303	echo "  CC    psa/crypto_examples.c"
304	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/crypto_examples.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
305
306psa/hmac_demo$(EXEXT): psa/hmac_demo.c $(DEP)
307	echo "  CC    psa/hmac_demo.c"
308	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/hmac_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
309
310psa/key_ladder_demo$(EXEXT): psa/key_ladder_demo.c $(DEP)
311	echo "  CC    psa/key_ladder_demo.c"
312	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/key_ladder_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
313
314psa/psa_constant_names$(EXEXT): psa/psa_constant_names.c psa/psa_constant_names_generated.c $(DEP)
315	echo "  CC    psa/psa_constant_names.c"
316	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/psa_constant_names.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
317
318random/gen_entropy$(EXEXT): random/gen_entropy.c $(DEP)
319	echo "  CC    random/gen_entropy.c"
320	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_entropy.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
321
322random/gen_random_ctr_drbg$(EXEXT): random/gen_random_ctr_drbg.c $(DEP)
323	echo "  CC    random/gen_random_ctr_drbg.c"
324	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_random_ctr_drbg.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
325
326ssl/dtls_client$(EXEXT): ssl/dtls_client.c $(DEP)
327	echo "  CC    ssl/dtls_client.c"
328	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/dtls_client.c  $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
329
330ssl/dtls_server$(EXEXT): ssl/dtls_server.c $(DEP)
331	echo "  CC    ssl/dtls_server.c"
332	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/dtls_server.c  $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
333
334ssl/ssl_client1$(EXEXT): ssl/ssl_client1.c $(DEP)
335	echo "  CC    ssl/ssl_client1.c"
336	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_client1.c  $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
337
338SSL_TEST_OBJECTS = test/query_config.o ssl/ssl_test_lib.o
339SSL_TEST_DEPS = $(SSL_TEST_OBJECTS) \
340		test/query_config.h \
341		ssl/ssl_test_lib.h \
342		ssl/ssl_test_common_source.c \
343		$(DEP)
344
345ssl/ssl_test_lib.o: ssl/ssl_test_lib.c ssl/ssl_test_lib.h $(DEP)
346	echo "  CC    ssl/ssl_test_lib.c"
347	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c ssl/ssl_test_lib.c -o $@
348
349ssl/ssl_client2$(EXEXT): ssl/ssl_client2.c $(SSL_TEST_DEPS)
350	echo "  CC    ssl/ssl_client2.c"
351	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_client2.c $(SSL_TEST_OBJECTS) $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
352
353ssl/ssl_server$(EXEXT): ssl/ssl_server.c $(DEP)
354	echo "  CC    ssl/ssl_server.c"
355	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_server.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
356
357ssl/ssl_server2$(EXEXT): ssl/ssl_server2.c $(SSL_TEST_DEPS)
358	echo "  CC    ssl/ssl_server2.c"
359	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_server2.c $(SSL_TEST_OBJECTS) $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
360
361ssl/ssl_context_info$(EXEXT): ssl/ssl_context_info.c test/query_config.o test/query_config.h $(DEP)
362	echo "  CC    ssl/ssl_context_info.c"
363	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_context_info.c test/query_config.o $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
364
365ssl/ssl_fork_server$(EXEXT): ssl/ssl_fork_server.c $(DEP)
366	echo "  CC    ssl/ssl_fork_server.c"
367	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_fork_server.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
368
369ssl/ssl_pthread_server$(EXEXT): ssl/ssl_pthread_server.c $(DEP)
370	echo "  CC    ssl/ssl_pthread_server.c"
371	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_pthread_server.c   $(LOCAL_LDFLAGS) -lpthread  $(LDFLAGS) -o $@
372
373ssl/ssl_mail_client$(EXEXT): ssl/ssl_mail_client.c $(DEP)
374	echo "  CC    ssl/ssl_mail_client.c"
375	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_mail_client.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
376
377ssl/mini_client$(EXEXT): ssl/mini_client.c $(DEP)
378	echo "  CC    ssl/mini_client.c"
379	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/mini_client.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
380
381test/benchmark$(EXEXT): test/benchmark.c $(DEP)
382	echo "  CC    test/benchmark.c"
383	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/benchmark.c   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
384
385test/cpp_dummy_build.cpp: test/generate_cpp_dummy_build.sh
386	echo "  Gen   test/cpp_dummy_build.cpp"
387	test/generate_cpp_dummy_build.sh
388
389test/cpp_dummy_build$(EXEXT): test/cpp_dummy_build.cpp $(DEP)
390	echo "  CXX   test/cpp_dummy_build.cpp"
391	$(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/cpp_dummy_build.cpp   $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
392
393ifdef BUILD_DLOPEN
394test/dlopen$(EXEXT): test/dlopen.c $(DEP)
395	echo "  CC    test/dlopen.c"
396# Do not link any test objects (that would bring in a static dependency on
397# libmbedcrypto at least). Do not link with libmbed* (that would defeat the
398# purpose of testing dynamic loading).
399	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/dlopen.c $(LDFLAGS) $(DLOPEN_LDFLAGS) -o $@
400endif
401
402test/query_config.o: test/query_config.c test/query_config.h $(DEP)
403	echo "  CC    test/query_config.c"
404	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c test/query_config.c -o $@
405
406test/selftest$(EXEXT): test/selftest.c $(DEP)
407	echo "  CC    test/selftest.c"
408	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/selftest.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
409
410test/udp_proxy$(EXEXT): test/udp_proxy.c $(DEP)
411	echo "  CC    test/udp_proxy.c"
412	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/udp_proxy.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
413
414test/zeroize$(EXEXT): test/zeroize.c $(DEP)
415	echo "  CC    test/zeroize.c"
416	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/zeroize.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
417
418test/query_compile_time_config$(EXEXT): test/query_compile_time_config.c test/query_config.o test/query_config.h $(DEP)
419	echo "  CC    test/query_compile_time_config.c"
420	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/query_compile_time_config.c test/query_config.o $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
421
422util/pem2der$(EXEXT): util/pem2der.c $(DEP)
423	echo "  CC    util/pem2der.c"
424	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) util/pem2der.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
425
426util/strerror$(EXEXT): util/strerror.c $(DEP)
427	echo "  CC    util/strerror.c"
428	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) util/strerror.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
429
430x509/cert_app$(EXEXT): x509/cert_app.c $(DEP)
431	echo "  CC    x509/cert_app.c"
432	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_app.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
433
434x509/cert_write$(EXEXT): x509/cert_write.c $(DEP)
435	echo "  CC    x509/cert_write.c"
436	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_write.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
437
438x509/crl_app$(EXEXT): x509/crl_app.c $(DEP)
439	echo "  CC    x509/crl_app.c"
440	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/crl_app.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
441
442x509/cert_req$(EXEXT): x509/cert_req.c $(DEP)
443	echo "  CC    x509/cert_req.c"
444	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_req.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
445
446x509/load_roots$(EXEXT): x509/load_roots.c $(DEP)
447	echo "  CC    x509/load_roots.c"
448	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/load_roots.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
449
450x509/req_app$(EXEXT): x509/req_app.c $(DEP)
451	echo "  CC    x509/req_app.c"
452	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/req_app.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
453
454clean:
455ifndef WINDOWS
456	rm -f $(EXES)
457	-rm -f ssl/ssl_pthread_server$(EXEXT)
458	-rm -f test/cpp_dummy_build.cpp test/cpp_dummy_build$(EXEXT)
459	-rm -f test/dlopen$(EXEXT)
460else
461	if exist *.o del /Q /F *.o
462	if exist *.exe del /Q /F *.exe
463	if exist test\cpp_dummy_build.cpp del /Q /F test\cpp_dummy_build.cpp
464endif
465	$(MAKE) -C fuzz clean
466
467neat: clean
468ifndef WINDOWS
469	rm -f $(GENERATED_FILES)
470else
471	for %f in ($(subst /,\,$(GENERATED_FILES))) if exist %f del /Q /F %f
472endif
473
474list:
475	echo $(EXES)
476