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/query_included_headers \ 127 test/selftest \ 128 test/udp_proxy \ 129 test/zeroize \ 130 util/pem2der \ 131 util/strerror \ 132 x509/cert_app \ 133 x509/cert_req \ 134 x509/cert_write \ 135 x509/crl_app \ 136 x509/load_roots \ 137 x509/req_app \ 138# End of APPS 139 140ifdef PTHREAD 141APPS += ssl/ssl_pthread_server 142endif 143 144ifdef BUILD_DLOPEN 145APPS += test/dlopen 146endif 147 148ifdef TEST_CPP 149APPS += test/cpp_dummy_build 150endif 151 152EXES = $(patsubst %,%$(EXEXT),$(APPS)) 153 154.SILENT: 155 156.PHONY: all clean list fuzz 157 158all: $(EXES) 159ifndef WINDOWS 160# APPS doesn't include the fuzzing programs, which aren't "normal" 161# sample or test programs, and don't build with MSVC which is 162# warning about fopen 163all: fuzz 164endif 165 166fuzz: ${MBEDTLS_TEST_OBJS} 167 $(MAKE) -C fuzz THIRDPARTY_INCLUDES=$(THIRDPARTY_INCLUDES) 168 169$(MBEDLIBS): 170 $(MAKE) -C ../library 171 172${MBEDTLS_TEST_OBJS}: 173 $(MAKE) -C ../tests mbedtls_test 174 175.PHONY: generated_files 176GENERATED_FILES = psa/psa_constant_names_generated.c test/query_config.c 177generated_files: $(GENERATED_FILES) 178 179psa/psa_constant_names_generated.c: ../scripts/generate_psa_constants.py 180psa/psa_constant_names_generated.c: ../include/psa/crypto_values.h 181psa/psa_constant_names_generated.c: ../include/psa/crypto_extra.h 182psa/psa_constant_names_generated.c: ../tests/suites/test_suite_psa_crypto_metadata.data 183psa/psa_constant_names_generated.c: 184 echo " Gen $@" 185 $(PYTHON) ../scripts/generate_psa_constants.py 186 187test/query_config.c: ../scripts/generate_query_config.pl 188## The generated file only depends on the options that are present in mbedtls_config.h, 189## not on which options are set. To avoid regenerating this file all the time 190## when switching between configurations, don't declare mbedtls_config.h as a 191## dependency. Remove this file from your working tree if you've just added or 192## removed an option in mbedtls_config.h. 193#test/query_config.c: ../include/mbedtls/mbedtls_config.h 194test/query_config.c: ../scripts/data_files/query_config.fmt 195test/query_config.c: 196 echo " Gen $@" 197 $(PERL) ../scripts/generate_query_config.pl 198 199aes/crypt_and_hash$(EXEXT): aes/crypt_and_hash.c $(DEP) 200 echo " CC aes/crypt_and_hash.c" 201 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) aes/crypt_and_hash.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 202 203cipher/cipher_aead_demo$(EXEXT): cipher/cipher_aead_demo.c $(DEP) 204 echo " CC cipher/cipher_aead_demo.c" 205 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) cipher/cipher_aead_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 206 207hash/generic_sum$(EXEXT): hash/generic_sum.c $(DEP) 208 echo " CC hash/generic_sum.c" 209 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/generic_sum.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 210 211hash/hello$(EXEXT): hash/hello.c $(DEP) 212 echo " CC hash/hello.c" 213 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/hello.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 214 215hash/md_hmac_demo$(EXEXT): hash/md_hmac_demo.c $(DEP) 216 echo " CC hash/md_hmac_demo.c" 217 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/md_hmac_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 218 219pkey/dh_client$(EXEXT): pkey/dh_client.c $(DEP) 220 echo " CC pkey/dh_client.c" 221 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 222 223pkey/dh_genprime$(EXEXT): pkey/dh_genprime.c $(DEP) 224 echo " CC pkey/dh_genprime.c" 225 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_genprime.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 226 227pkey/dh_server$(EXEXT): pkey/dh_server.c $(DEP) 228 echo " CC pkey/dh_server.c" 229 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 230 231pkey/ecdh_curve25519$(EXEXT): pkey/ecdh_curve25519.c $(DEP) 232 echo " CC pkey/ecdh_curve25519.c" 233 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/ecdh_curve25519.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 234 235pkey/ecdsa$(EXEXT): pkey/ecdsa.c $(DEP) 236 echo " CC pkey/ecdsa.c" 237 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/ecdsa.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 238 239pkey/gen_key$(EXEXT): pkey/gen_key.c $(DEP) 240 echo " CC pkey/gen_key.c" 241 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/gen_key.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 242 243pkey/key_app$(EXEXT): pkey/key_app.c $(DEP) 244 echo " CC pkey/key_app.c" 245 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/key_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 246 247pkey/key_app_writer$(EXEXT): pkey/key_app_writer.c $(DEP) 248 echo " CC pkey/key_app_writer.c" 249 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/key_app_writer.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 250 251pkey/mpi_demo$(EXEXT): pkey/mpi_demo.c $(DEP) 252 echo " CC pkey/mpi_demo.c" 253 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/mpi_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 254 255pkey/pk_decrypt$(EXEXT): pkey/pk_decrypt.c $(DEP) 256 echo " CC pkey/pk_decrypt.c" 257 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_decrypt.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 258 259pkey/pk_encrypt$(EXEXT): pkey/pk_encrypt.c $(DEP) 260 echo " CC pkey/pk_encrypt.c" 261 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_encrypt.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 262 263pkey/pk_sign$(EXEXT): pkey/pk_sign.c $(DEP) 264 echo " CC pkey/pk_sign.c" 265 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_sign.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 266 267pkey/pk_verify$(EXEXT): pkey/pk_verify.c $(DEP) 268 echo " CC pkey/pk_verify.c" 269 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_verify.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 270 271pkey/rsa_genkey$(EXEXT): pkey/rsa_genkey.c $(DEP) 272 echo " CC pkey/rsa_genkey.c" 273 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_genkey.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 274 275pkey/rsa_sign$(EXEXT): pkey/rsa_sign.c $(DEP) 276 echo " CC pkey/rsa_sign.c" 277 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_sign.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 278 279pkey/rsa_verify$(EXEXT): pkey/rsa_verify.c $(DEP) 280 echo " CC pkey/rsa_verify.c" 281 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_verify.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 282 283pkey/rsa_sign_pss$(EXEXT): pkey/rsa_sign_pss.c $(DEP) 284 echo " CC pkey/rsa_sign_pss.c" 285 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_sign_pss.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 286 287pkey/rsa_verify_pss$(EXEXT): pkey/rsa_verify_pss.c $(DEP) 288 echo " CC pkey/rsa_verify_pss.c" 289 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_verify_pss.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 290 291pkey/rsa_decrypt$(EXEXT): pkey/rsa_decrypt.c $(DEP) 292 echo " CC pkey/rsa_decrypt.c" 293 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_decrypt.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 294 295pkey/rsa_encrypt$(EXEXT): pkey/rsa_encrypt.c $(DEP) 296 echo " CC pkey/rsa_encrypt.c" 297 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_encrypt.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 298 299psa/aead_demo$(EXEXT): psa/aead_demo.c $(DEP) 300 echo " CC psa/aead_demo.c" 301 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/aead_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 302 303psa/crypto_examples$(EXEXT): psa/crypto_examples.c $(DEP) 304 echo " CC psa/crypto_examples.c" 305 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/crypto_examples.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 306 307psa/hmac_demo$(EXEXT): psa/hmac_demo.c $(DEP) 308 echo " CC psa/hmac_demo.c" 309 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/hmac_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 310 311psa/key_ladder_demo$(EXEXT): psa/key_ladder_demo.c $(DEP) 312 echo " CC psa/key_ladder_demo.c" 313 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/key_ladder_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 314 315psa/psa_constant_names$(EXEXT): psa/psa_constant_names.c psa/psa_constant_names_generated.c $(DEP) 316 echo " CC psa/psa_constant_names.c" 317 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/psa_constant_names.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 318 319random/gen_entropy$(EXEXT): random/gen_entropy.c $(DEP) 320 echo " CC random/gen_entropy.c" 321 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_entropy.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 322 323random/gen_random_ctr_drbg$(EXEXT): random/gen_random_ctr_drbg.c $(DEP) 324 echo " CC random/gen_random_ctr_drbg.c" 325 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_random_ctr_drbg.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 326 327ssl/dtls_client$(EXEXT): ssl/dtls_client.c $(DEP) 328 echo " CC ssl/dtls_client.c" 329 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/dtls_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 330 331ssl/dtls_server$(EXEXT): ssl/dtls_server.c $(DEP) 332 echo " CC ssl/dtls_server.c" 333 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/dtls_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 334 335ssl/ssl_client1$(EXEXT): ssl/ssl_client1.c $(DEP) 336 echo " CC ssl/ssl_client1.c" 337 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_client1.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 338 339SSL_TEST_OBJECTS = test/query_config.o ssl/ssl_test_lib.o 340SSL_TEST_DEPS = $(SSL_TEST_OBJECTS) \ 341 test/query_config.h \ 342 ssl/ssl_test_lib.h \ 343 ssl/ssl_test_common_source.c \ 344 $(DEP) 345 346ssl/ssl_test_lib.o: ssl/ssl_test_lib.c ssl/ssl_test_lib.h $(DEP) 347 echo " CC ssl/ssl_test_lib.c" 348 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c ssl/ssl_test_lib.c -o $@ 349 350ssl/ssl_client2$(EXEXT): ssl/ssl_client2.c $(SSL_TEST_DEPS) 351 echo " CC ssl/ssl_client2.c" 352 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_client2.c $(SSL_TEST_OBJECTS) $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 353 354ssl/ssl_server$(EXEXT): ssl/ssl_server.c $(DEP) 355 echo " CC ssl/ssl_server.c" 356 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 357 358ssl/ssl_server2$(EXEXT): ssl/ssl_server2.c $(SSL_TEST_DEPS) 359 echo " CC ssl/ssl_server2.c" 360 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_server2.c $(SSL_TEST_OBJECTS) $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 361 362ssl/ssl_context_info$(EXEXT): ssl/ssl_context_info.c test/query_config.o test/query_config.h $(DEP) 363 echo " CC ssl/ssl_context_info.c" 364 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_context_info.c test/query_config.o $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 365 366ssl/ssl_fork_server$(EXEXT): ssl/ssl_fork_server.c $(DEP) 367 echo " CC ssl/ssl_fork_server.c" 368 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_fork_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 369 370ssl/ssl_pthread_server$(EXEXT): ssl/ssl_pthread_server.c $(DEP) 371 echo " CC ssl/ssl_pthread_server.c" 372 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_pthread_server.c $(LOCAL_LDFLAGS) -lpthread $(LDFLAGS) -o $@ 373 374ssl/ssl_mail_client$(EXEXT): ssl/ssl_mail_client.c $(DEP) 375 echo " CC ssl/ssl_mail_client.c" 376 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_mail_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 377 378ssl/mini_client$(EXEXT): ssl/mini_client.c $(DEP) 379 echo " CC ssl/mini_client.c" 380 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/mini_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 381 382test/benchmark$(EXEXT): test/benchmark.c $(DEP) 383 echo " CC test/benchmark.c" 384 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/benchmark.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 385 386test/cpp_dummy_build.cpp: test/generate_cpp_dummy_build.sh 387 echo " Gen test/cpp_dummy_build.cpp" 388 test/generate_cpp_dummy_build.sh 389 390test/cpp_dummy_build$(EXEXT): test/cpp_dummy_build.cpp $(DEP) 391 echo " CXX test/cpp_dummy_build.cpp" 392 $(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/cpp_dummy_build.cpp $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 393 394ifdef BUILD_DLOPEN 395test/dlopen$(EXEXT): test/dlopen.c $(DEP) 396 echo " CC test/dlopen.c" 397# Do not link any test objects (that would bring in a static dependency on 398# libmbedcrypto at least). Do not link with libmbed* (that would defeat the 399# purpose of testing dynamic loading). 400 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/dlopen.c $(LDFLAGS) $(DLOPEN_LDFLAGS) -o $@ 401endif 402 403test/query_config.o: test/query_config.c test/query_config.h $(DEP) 404 echo " CC test/query_config.c" 405 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c test/query_config.c -o $@ 406 407test/query_included_headers$(EXEXT): test/query_included_headers.c $(DEP) 408 echo " CC test/query_included_headers.c" 409 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/query_included_headers.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 410 411test/selftest$(EXEXT): test/selftest.c $(DEP) 412 echo " CC test/selftest.c" 413 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/selftest.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 414 415test/udp_proxy$(EXEXT): test/udp_proxy.c $(DEP) 416 echo " CC test/udp_proxy.c" 417 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/udp_proxy.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 418 419test/zeroize$(EXEXT): test/zeroize.c $(DEP) 420 echo " CC test/zeroize.c" 421 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/zeroize.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 422 423test/query_compile_time_config$(EXEXT): test/query_compile_time_config.c test/query_config.o test/query_config.h $(DEP) 424 echo " CC test/query_compile_time_config.c" 425 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/query_compile_time_config.c test/query_config.o $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 426 427util/pem2der$(EXEXT): util/pem2der.c $(DEP) 428 echo " CC util/pem2der.c" 429 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) util/pem2der.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 430 431util/strerror$(EXEXT): util/strerror.c $(DEP) 432 echo " CC util/strerror.c" 433 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) util/strerror.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 434 435x509/cert_app$(EXEXT): x509/cert_app.c $(DEP) 436 echo " CC x509/cert_app.c" 437 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 438 439x509/cert_write$(EXEXT): x509/cert_write.c $(DEP) 440 echo " CC x509/cert_write.c" 441 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_write.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 442 443x509/crl_app$(EXEXT): x509/crl_app.c $(DEP) 444 echo " CC x509/crl_app.c" 445 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/crl_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 446 447x509/cert_req$(EXEXT): x509/cert_req.c $(DEP) 448 echo " CC x509/cert_req.c" 449 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_req.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 450 451x509/load_roots$(EXEXT): x509/load_roots.c $(DEP) 452 echo " CC x509/load_roots.c" 453 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/load_roots.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 454 455x509/req_app$(EXEXT): x509/req_app.c $(DEP) 456 echo " CC x509/req_app.c" 457 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/req_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ 458 459clean: 460ifndef WINDOWS 461 rm -f $(EXES) 462 -rm -f ssl/ssl_pthread_server$(EXEXT) 463 -rm -f test/cpp_dummy_build.cpp test/cpp_dummy_build$(EXEXT) 464 -rm -f test/dlopen$(EXEXT) 465else 466 if exist *.o del /Q /F *.o 467 if exist *.exe del /Q /F *.exe 468 if exist test\cpp_dummy_build.cpp del /Q /F test\cpp_dummy_build.cpp 469endif 470 $(MAKE) -C fuzz clean 471 472neat: clean 473ifndef WINDOWS 474 rm -f $(GENERATED_FILES) 475else 476 for %f in ($(subst /,\,$(GENERATED_FILES))) if exist %f del /Q /F %f 477endif 478 479list: 480 echo $(EXES) 481