2009-01-03 22:22:43 +01:00
|
|
|
|
|
|
|
# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
|
|
|
|
|
2015-02-18 16:55:05 +01:00
|
|
|
CFLAGS ?= -O2
|
2020-12-17 19:17:32 +01:00
|
|
|
WARNING_CFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral
|
|
|
|
WARNING_CXXFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral
|
2015-02-18 16:47:52 +01:00
|
|
|
LDFLAGS ?=
|
2015-02-18 16:55:05 +01:00
|
|
|
|
2020-06-05 16:00:22 +02:00
|
|
|
MBEDTLS_TEST_PATH:=../tests/src
|
2020-07-16 20:26:18 +02:00
|
|
|
MBEDTLS_TEST_OBJS:=$(patsubst %.c,%.o,$(wildcard ${MBEDTLS_TEST_PATH}/*.c ${MBEDTLS_TEST_PATH}/drivers/*.c))
|
2020-06-05 16:00:22 +02:00
|
|
|
|
|
|
|
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../tests/include -I../include -D_FILE_OFFSET_BITS=64
|
2021-02-08 15:34:42 +01:00
|
|
|
LOCAL_CXXFLAGS = $(WARNING_CXXFLAGS) -I../include -I../tests/include -D_FILE_OFFSET_BITS=64
|
2020-06-05 16:00:22 +02:00
|
|
|
LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
|
|
|
|
-L../library \
|
2015-06-25 08:45:12 +02:00
|
|
|
-lmbedtls$(SHARED_SUFFIX) \
|
2015-06-24 13:06:24 +02:00
|
|
|
-lmbedx509$(SHARED_SUFFIX) \
|
2015-06-25 08:45:12 +02:00
|
|
|
-lmbedcrypto$(SHARED_SUFFIX)
|
2015-06-24 13:06:24 +02:00
|
|
|
|
2021-11-04 15:07:28 +01:00
|
|
|
ifeq ($(shell uname -s),Linux)
|
|
|
|
DLOPEN_LDFLAGS ?= -ldl
|
|
|
|
else
|
|
|
|
DLOPEN_LDFLAGS ?=
|
|
|
|
endif
|
|
|
|
|
2019-01-21 18:26:19 +01:00
|
|
|
include ../3rdparty/Makefile.inc
|
|
|
|
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
2018-10-25 18:37:00 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ifndef SHARED
|
2020-06-05 16:00:22 +02:00
|
|
|
MBEDLIBS=../library/libmbedcrypto.a ../library/libmbedx509.a ../library/libmbedtls.a
|
2015-06-24 13:06:24 +02:00
|
|
|
else
|
2020-06-05 16:00:22 +02:00
|
|
|
MBEDLIBS=../library/libmbedcrypto.$(DLEXT) ../library/libmbedx509.$(DLEXT) ../library/libmbedtls.$(DLEXT)
|
2015-06-24 13:06:24 +02:00
|
|
|
endif
|
2020-06-05 16:00:22 +02:00
|
|
|
DEP=${MBEDLIBS} ${MBEDTLS_TEST_OBJS}
|
2018-10-25 13:47:03 +02:00
|
|
|
|
2012-04-05 14:08:29 +02:00
|
|
|
ifdef DEBUG
|
2015-02-18 16:55:05 +01:00
|
|
|
LOCAL_CFLAGS += -g3
|
2012-04-05 14:08:29 +02:00
|
|
|
endif
|
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
# if we're running on Windows, build for Windows
|
2012-05-10 22:49:10 +02:00
|
|
|
ifdef WINDOWS
|
2015-02-14 00:04:58 +01:00
|
|
|
WINDOWS_BUILD=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef WINDOWS_BUILD
|
|
|
|
DLEXT=dll
|
|
|
|
EXEXT=.exe
|
2015-02-18 16:47:52 +01:00
|
|
|
LOCAL_LDFLAGS += -lws2_32
|
2015-02-14 00:04:58 +01:00
|
|
|
ifdef SHARED
|
|
|
|
SHARED_SUFFIX=.$(DLEXT)
|
|
|
|
endif
|
2015-06-24 12:16:20 +02:00
|
|
|
else
|
2018-03-27 20:17:21 +02:00
|
|
|
DLEXT ?= so
|
2015-06-24 12:16:20 +02:00
|
|
|
EXEXT=
|
|
|
|
SHARED_SUFFIX=
|
2021-07-13 18:14:25 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef WINDOWS
|
|
|
|
PYTHON ?= python
|
|
|
|
else
|
2021-04-22 01:01:56 +02:00
|
|
|
PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi)
|
2012-05-10 22:49:10 +02:00
|
|
|
endif
|
|
|
|
|
2021-11-04 15:18:00 +01:00
|
|
|
# Only build the dlopen test in shared library builds, and not when building
|
|
|
|
# for Windows.
|
|
|
|
ifdef BUILD_DLOPEN
|
|
|
|
# Don't override the value
|
|
|
|
else ifdef WINDOWS_BUILD
|
|
|
|
BUILD_DLOPEN =
|
|
|
|
else ifdef SHARED
|
|
|
|
BUILD_DLOPEN = y
|
|
|
|
else
|
|
|
|
BUILD_DLOPEN =
|
|
|
|
endif
|
|
|
|
|
2021-04-22 20:07:44 +02:00
|
|
|
## The following assignment is the list of base names of applications that
|
|
|
|
## will be built on Windows. Extra Linux/Unix/POSIX-only applications can
|
|
|
|
## be declared by appending with `APPS += ...` afterwards.
|
|
|
|
## See the get_app_list function in scripts/generate_visualc_files.pl and
|
|
|
|
## make sure to check that it still works if you tweak the format here.
|
2020-02-11 17:18:08 +01:00
|
|
|
APPS = \
|
2021-04-22 20:07:44 +02:00
|
|
|
aes/crypt_and_hash \
|
2022-02-01 09:38:26 +01:00
|
|
|
cipher/cipher_aead_demo \
|
2021-04-22 20:07:44 +02:00
|
|
|
hash/generic_sum \
|
|
|
|
hash/hello \
|
2022-02-01 09:38:26 +01:00
|
|
|
hash/md_hmac_demo \
|
2021-04-22 20:07:44 +02:00
|
|
|
pkey/dh_client \
|
|
|
|
pkey/dh_genprime \
|
|
|
|
pkey/dh_server \
|
|
|
|
pkey/ecdh_curve25519 \
|
|
|
|
pkey/ecdsa \
|
|
|
|
pkey/gen_key \
|
|
|
|
pkey/key_app \
|
|
|
|
pkey/key_app_writer \
|
|
|
|
pkey/mpi_demo \
|
|
|
|
pkey/pk_decrypt \
|
|
|
|
pkey/pk_encrypt \
|
|
|
|
pkey/pk_sign \
|
|
|
|
pkey/pk_verify \
|
|
|
|
pkey/rsa_decrypt \
|
|
|
|
pkey/rsa_encrypt \
|
|
|
|
pkey/rsa_genkey \
|
|
|
|
pkey/rsa_sign \
|
|
|
|
pkey/rsa_sign_pss \
|
|
|
|
pkey/rsa_verify \
|
|
|
|
pkey/rsa_verify_pss \
|
2022-01-31 13:27:39 +01:00
|
|
|
psa/aead_demo \
|
2021-04-22 20:07:44 +02:00
|
|
|
psa/crypto_examples \
|
2022-01-31 13:09:47 +01:00
|
|
|
psa/hmac_demo \
|
2021-04-22 20:07:44 +02:00
|
|
|
psa/key_ladder_demo \
|
|
|
|
psa/psa_constant_names \
|
|
|
|
random/gen_entropy \
|
|
|
|
random/gen_random_ctr_drbg \
|
|
|
|
ssl/dtls_client \
|
|
|
|
ssl/dtls_server \
|
|
|
|
ssl/mini_client \
|
|
|
|
ssl/ssl_client1 \
|
|
|
|
ssl/ssl_client2 \
|
|
|
|
ssl/ssl_context_info \
|
|
|
|
ssl/ssl_fork_server \
|
|
|
|
ssl/ssl_mail_client \
|
|
|
|
ssl/ssl_server \
|
|
|
|
ssl/ssl_server2 \
|
|
|
|
test/benchmark \
|
|
|
|
test/query_compile_time_config \
|
|
|
|
test/selftest \
|
|
|
|
test/udp_proxy \
|
|
|
|
test/zeroize \
|
|
|
|
util/pem2der \
|
|
|
|
util/strerror \
|
|
|
|
x509/cert_app \
|
|
|
|
x509/cert_req \
|
|
|
|
x509/cert_write \
|
|
|
|
x509/crl_app \
|
2021-07-26 20:20:54 +02:00
|
|
|
x509/load_roots \
|
2021-04-22 20:07:44 +02:00
|
|
|
x509/req_app \
|
2020-02-11 17:18:08 +01:00
|
|
|
# End of APPS
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2013-12-19 15:40:58 +01:00
|
|
|
ifdef PTHREAD
|
2021-04-22 20:07:44 +02:00
|
|
|
APPS += ssl/ssl_pthread_server
|
2013-12-19 15:40:58 +01:00
|
|
|
endif
|
|
|
|
|
2021-11-04 15:18:00 +01:00
|
|
|
ifdef BUILD_DLOPEN
|
2021-11-04 12:45:19 +01:00
|
|
|
APPS += test/dlopen
|
|
|
|
endif
|
|
|
|
|
2018-03-15 10:16:24 +01:00
|
|
|
ifdef TEST_CPP
|
2021-04-22 20:07:44 +02:00
|
|
|
APPS += test/cpp_dummy_build
|
2018-03-15 10:16:24 +01:00
|
|
|
endif
|
|
|
|
|
2021-04-22 20:07:44 +02:00
|
|
|
EXES = $(patsubst %,%$(EXEXT),$(APPS))
|
|
|
|
|
2009-01-03 22:22:43 +01:00
|
|
|
.SILENT:
|
|
|
|
|
2019-06-27 08:46:45 +02:00
|
|
|
.PHONY: all clean list fuzz
|
2015-06-24 13:06:24 +02:00
|
|
|
|
2021-04-22 20:07:44 +02:00
|
|
|
all: $(EXES)
|
2019-07-10 20:37:57 +02:00
|
|
|
ifndef WINDOWS
|
|
|
|
# APPS doesn't include the fuzzing programs, which aren't "normal"
|
|
|
|
# sample or test programs, and don't build with MSVC which is
|
|
|
|
# warning about fopen
|
|
|
|
all: fuzz
|
|
|
|
endif
|
2019-06-27 08:46:45 +02:00
|
|
|
|
2020-06-05 16:00:22 +02:00
|
|
|
fuzz: ${MBEDTLS_TEST_OBJS}
|
2019-08-20 16:12:54 +02:00
|
|
|
$(MAKE) -C fuzz THIRDPARTY_INCLUDES=$(THIRDPARTY_INCLUDES)
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2020-06-05 16:00:22 +02:00
|
|
|
$(MBEDLIBS):
|
2015-06-26 16:50:24 +02:00
|
|
|
$(MAKE) -C ../library
|
2015-06-24 13:06:24 +02:00
|
|
|
|
2020-06-05 16:00:22 +02:00
|
|
|
${MBEDTLS_TEST_OBJS}:
|
|
|
|
$(MAKE) -C ../tests mbedtls_test
|
|
|
|
|
2021-04-22 01:01:56 +02:00
|
|
|
.PHONY: generated_files
|
|
|
|
GENERATED_FILES = psa/psa_constant_names_generated.c test/query_config.c
|
|
|
|
generated_files: $(GENERATED_FILES)
|
|
|
|
|
|
|
|
psa/psa_constant_names_generated.c: ../scripts/generate_psa_constants.py
|
|
|
|
psa/psa_constant_names_generated.c: ../include/psa/crypto_values.h
|
|
|
|
psa/psa_constant_names_generated.c: ../include/psa/crypto_extra.h
|
|
|
|
psa/psa_constant_names_generated.c: ../tests/suites/test_suite_psa_crypto_metadata.data
|
|
|
|
psa/psa_constant_names_generated.c:
|
|
|
|
echo " Gen $@"
|
|
|
|
$(PYTHON) ../scripts/generate_psa_constants.py
|
|
|
|
|
|
|
|
test/query_config.c: ../scripts/generate_query_config.pl
|
2021-05-28 09:42:25 +02:00
|
|
|
## The generated file only depends on the options that are present in mbedtls_config.h,
|
2021-04-22 14:50:16 +02:00
|
|
|
## not on which options are set. To avoid regenerating this file all the time
|
2021-05-28 09:42:25 +02:00
|
|
|
## when switching between configurations, don't declare mbedtls_config.h as a
|
2021-04-22 14:50:16 +02:00
|
|
|
## dependency. Remove this file from your working tree if you've just added or
|
2021-05-28 09:42:25 +02:00
|
|
|
## removed an option in mbedtls_config.h.
|
|
|
|
#test/query_config.c: ../include/mbedtls/mbedtls_config.h
|
2021-04-22 01:01:56 +02:00
|
|
|
test/query_config.c: ../scripts/data_files/query_config.fmt
|
|
|
|
test/query_config.c:
|
|
|
|
echo " Gen $@"
|
|
|
|
$(PERL) ../scripts/generate_query_config.pl
|
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
aes/crypt_and_hash$(EXEXT): aes/crypt_and_hash.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC aes/crypt_and_hash.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) aes/crypt_and_hash.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-01-21 10:32:12 +01:00
|
|
|
|
2022-02-01 09:38:26 +01:00
|
|
|
cipher/cipher_aead_demo$(EXEXT): cipher/cipher_aead_demo.c $(DEP)
|
|
|
|
echo " CC cipher/cipher_aead_demo.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) cipher/cipher_aead_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
hash/generic_sum$(EXEXT): hash/generic_sum.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC hash/generic_sum.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/generic_sum.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-01-21 11:21:11 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
hash/hello$(EXEXT): hash/hello.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC hash/hello.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/hello.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2022-02-01 09:38:26 +01:00
|
|
|
hash/md_hmac_demo$(EXEXT): hash/md_hmac_demo.c $(DEP)
|
|
|
|
echo " CC hash/md_hmac_demo.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/md_hmac_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-01-21 11:21:11 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/dh_client$(EXEXT): pkey/dh_client.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/dh_client.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/dh_genprime$(EXEXT): pkey/dh_genprime.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/dh_genprime.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_genprime.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/dh_server$(EXEXT): pkey/dh_server.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/dh_server.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/dh_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-10-09 13:11:14 +02:00
|
|
|
pkey/ecdh_curve25519$(EXEXT): pkey/ecdh_curve25519.c $(DEP)
|
|
|
|
echo " CC pkey/ecdh_curve25519.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/ecdh_curve25519.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/ecdsa$(EXEXT): pkey/ecdsa.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/ecdsa.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/ecdsa.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2013-08-09 17:10:27 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/gen_key$(EXEXT): pkey/gen_key.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/gen_key.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/gen_key.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2013-09-23 12:05:44 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/key_app$(EXEXT): pkey/key_app.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/key_app.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/key_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-07-13 13:26:43 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/key_app_writer$(EXEXT): pkey/key_app_writer.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/key_app_writer.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/key_app_writer.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2012-02-14 00:11:30 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/mpi_demo$(EXEXT): pkey/mpi_demo.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/mpi_demo.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/mpi_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/pk_decrypt$(EXEXT): pkey/pk_decrypt.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/pk_decrypt.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_decrypt.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2013-09-18 15:34:57 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/pk_encrypt$(EXEXT): pkey/pk_encrypt.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/pk_encrypt.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_encrypt.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2013-09-18 15:34:57 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/pk_sign$(EXEXT): pkey/pk_sign.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/pk_sign.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_sign.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2013-09-18 15:34:57 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/pk_verify$(EXEXT): pkey/pk_verify.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/pk_verify.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/pk_verify.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2013-09-18 15:34:57 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/rsa_genkey$(EXEXT): pkey/rsa_genkey.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/rsa_genkey.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_genkey.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/rsa_sign$(EXEXT): pkey/rsa_sign.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/rsa_sign.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_sign.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/rsa_verify$(EXEXT): pkey/rsa_verify.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/rsa_verify.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_verify.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/rsa_sign_pss$(EXEXT): pkey/rsa_sign_pss.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/rsa_sign_pss.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_sign_pss.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-03-25 15:01:32 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/rsa_verify_pss$(EXEXT): pkey/rsa_verify_pss.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/rsa_verify_pss.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_verify_pss.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-03-25 15:01:32 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/rsa_decrypt$(EXEXT): pkey/rsa_decrypt.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/rsa_decrypt.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_decrypt.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-08-09 12:30:36 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
pkey/rsa_encrypt$(EXEXT): pkey/rsa_encrypt.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC pkey/rsa_encrypt.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) pkey/rsa_encrypt.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-08-09 12:30:36 +02:00
|
|
|
|
2022-01-31 13:27:39 +01:00
|
|
|
psa/aead_demo$(EXEXT): psa/aead_demo.c $(DEP)
|
|
|
|
echo " CC psa/aead_demo.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/aead_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2022-01-07 12:26:32 +01:00
|
|
|
|
2021-11-22 13:00:17 +01:00
|
|
|
psa/crypto_examples$(EXEXT): psa/crypto_examples.c $(DEP)
|
|
|
|
echo " CC psa/crypto_examples.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/crypto_examples.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2022-01-31 13:09:47 +01:00
|
|
|
psa/hmac_demo$(EXEXT): psa/hmac_demo.c $(DEP)
|
|
|
|
echo " CC psa/hmac_demo.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/hmac_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2021-11-22 13:00:17 +01:00
|
|
|
|
2018-07-16 17:08:43 +02:00
|
|
|
psa/key_ladder_demo$(EXEXT): psa/key_ladder_demo.c $(DEP)
|
|
|
|
echo " CC psa/key_ladder_demo.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/key_ladder_demo.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2021-02-24 21:45:38 +01:00
|
|
|
psa/psa_constant_names$(EXEXT): psa/psa_constant_names.c psa/psa_constant_names_generated.c $(DEP)
|
2018-07-16 23:13:37 +02:00
|
|
|
echo " CC psa/psa_constant_names.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) psa/psa_constant_names.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
random/gen_entropy$(EXEXT): random/gen_entropy.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC random/gen_entropy.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_entropy.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-12-03 22:45:14 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
random/gen_random_ctr_drbg$(EXEXT): random/gen_random_ctr_drbg.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC random/gen_random_ctr_drbg.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_random_ctr_drbg.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-01-27 17:50:02 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ssl/dtls_client$(EXEXT): ssl/dtls_client.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/dtls_client.c"
|
2015-06-24 12:16:20 +02:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/dtls_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2014-10-14 11:47:21 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ssl/dtls_server$(EXEXT): ssl/dtls_server.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/dtls_server.c"
|
2015-06-24 12:16:20 +02:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/dtls_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2014-10-14 11:47:21 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ssl/ssl_client1$(EXEXT): ssl/ssl_client1.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/ssl_client1.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_client1.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2021-01-05 21:11:16 +01:00
|
|
|
SSL_TEST_OBJECTS = test/query_config.o ssl/ssl_test_lib.o
|
2021-01-12 15:55:10 +01:00
|
|
|
SSL_TEST_DEPS = $(SSL_TEST_OBJECTS) \
|
|
|
|
test/query_config.h \
|
|
|
|
ssl/ssl_test_lib.h \
|
|
|
|
ssl/ssl_test_common_source.c \
|
|
|
|
$(DEP)
|
2021-01-05 20:59:50 +01:00
|
|
|
|
2021-01-05 21:11:16 +01:00
|
|
|
ssl/ssl_test_lib.o: ssl/ssl_test_lib.c ssl/ssl_test_lib.h $(DEP)
|
|
|
|
echo " CC ssl/ssl_test_lib.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c ssl/ssl_test_lib.c -o $@
|
|
|
|
|
2021-01-05 23:34:27 +01:00
|
|
|
ssl/ssl_client2$(EXEXT): ssl/ssl_client2.c $(SSL_TEST_DEPS)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/ssl_client2.c"
|
2021-01-05 20:59:50 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_client2.c $(SSL_TEST_OBJECTS) $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ssl/ssl_server$(EXEXT): ssl/ssl_server.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/ssl_server.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2021-01-05 23:34:27 +01:00
|
|
|
ssl/ssl_server2$(EXEXT): ssl/ssl_server2.c $(SSL_TEST_DEPS)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/ssl_server2.c"
|
2021-01-05 20:59:50 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_server2.c $(SSL_TEST_OBJECTS) $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2012-09-25 11:05:17 +02:00
|
|
|
|
2021-01-12 15:55:10 +01:00
|
|
|
ssl/ssl_context_info$(EXEXT): ssl/ssl_context_info.c test/query_config.o test/query_config.h $(DEP)
|
2020-03-26 12:49:15 +01:00
|
|
|
echo " CC ssl/ssl_context_info.c"
|
2021-01-05 20:59:50 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_context_info.c test/query_config.o $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2020-03-13 14:43:22 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ssl/ssl_fork_server$(EXEXT): ssl/ssl_fork_server.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/ssl_fork_server.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_fork_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-05-20 14:33:05 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ssl/ssl_pthread_server$(EXEXT): ssl/ssl_pthread_server.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/ssl_pthread_server.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_pthread_server.c $(LOCAL_LDFLAGS) -lpthread $(LDFLAGS) -o $@
|
2013-12-19 15:40:58 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ssl/ssl_mail_client$(EXEXT): ssl/ssl_mail_client.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/ssl_mail_client.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_mail_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-05-23 14:07:29 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
ssl/mini_client$(EXEXT): ssl/mini_client.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC ssl/mini_client.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/mini_client.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2014-11-24 14:05:25 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
test/benchmark$(EXEXT): test/benchmark.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC test/benchmark.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/benchmark.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2021-07-09 15:19:28 +02:00
|
|
|
test/cpp_dummy_build.cpp: test/generate_cpp_dummy_build.sh
|
|
|
|
echo " Gen test/cpp_dummy_build.cpp"
|
|
|
|
test/generate_cpp_dummy_build.sh
|
|
|
|
|
2018-03-16 12:37:44 +01:00
|
|
|
test/cpp_dummy_build$(EXEXT): test/cpp_dummy_build.cpp $(DEP)
|
|
|
|
echo " CXX test/cpp_dummy_build.cpp"
|
|
|
|
$(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/cpp_dummy_build.cpp $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2018-03-14 22:24:01 +01:00
|
|
|
|
2021-11-04 15:18:00 +01:00
|
|
|
ifdef BUILD_DLOPEN
|
2021-11-04 12:45:19 +01:00
|
|
|
test/dlopen$(EXEXT): test/dlopen.c $(DEP)
|
|
|
|
echo " CC test/dlopen.c"
|
|
|
|
# Do not link any test objects (that would bring in a static dependency on
|
|
|
|
# libmbedcrypto at least). Do not link with libmbed* (that would defeat the
|
|
|
|
# purpose of testing dynamic loading).
|
2021-11-04 15:07:28 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/dlopen.c $(LDFLAGS) $(DLOPEN_LDFLAGS) -o $@
|
2021-11-04 12:45:19 +01:00
|
|
|
endif
|
|
|
|
|
2021-01-12 15:55:10 +01:00
|
|
|
test/query_config.o: test/query_config.c test/query_config.h $(DEP)
|
2021-01-05 20:59:50 +01:00
|
|
|
echo " CC test/query_config.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c test/query_config.c -o $@
|
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
test/selftest$(EXEXT): test/selftest.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC test/selftest.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/selftest.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2009-01-03 22:22:43 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
test/udp_proxy$(EXEXT): test/udp_proxy.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC test/udp_proxy.c"
|
2015-06-24 12:16:20 +02:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/udp_proxy.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2014-09-04 14:55:28 +02:00
|
|
|
|
2017-10-24 22:10:45 +02:00
|
|
|
test/zeroize$(EXEXT): test/zeroize.c $(DEP)
|
|
|
|
echo " CC test/zeroize.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/zeroize.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2021-01-12 15:55:10 +01:00
|
|
|
test/query_compile_time_config$(EXEXT): test/query_compile_time_config.c test/query_config.o test/query_config.h $(DEP)
|
2018-10-26 19:41:08 +02:00
|
|
|
echo " CC test/query_compile_time_config.c"
|
2021-01-05 20:59:50 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/query_compile_time_config.c test/query_config.o $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2018-10-26 19:41:08 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
util/pem2der$(EXEXT): util/pem2der.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC util/pem2der.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) util/pem2der.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2013-08-25 14:50:09 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
util/strerror$(EXEXT): util/strerror.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC util/strerror.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) util/strerror.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2012-05-08 10:36:15 +02:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
x509/cert_app$(EXEXT): x509/cert_app.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC x509/cert_app.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2010-03-18 21:11:58 +01:00
|
|
|
|
2015-06-29 15:47:35 +02:00
|
|
|
x509/cert_write$(EXEXT): x509/cert_write.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC x509/cert_write.c"
|
2015-06-29 15:47:35 +02:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_write.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
x509/crl_app$(EXEXT): x509/crl_app.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC x509/crl_app.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/crl_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2011-02-12 16:27:28 +01:00
|
|
|
|
2015-06-24 13:06:24 +02:00
|
|
|
x509/cert_req$(EXEXT): x509/cert_req.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC x509/cert_req.c"
|
2015-02-18 16:55:05 +01:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_req.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
2012-02-14 00:11:30 +01:00
|
|
|
|
2021-07-26 20:20:54 +02:00
|
|
|
x509/load_roots$(EXEXT): x509/load_roots.c $(DEP)
|
|
|
|
echo " CC x509/load_roots.c"
|
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/load_roots.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2015-06-29 15:47:35 +02:00
|
|
|
x509/req_app$(EXEXT): x509/req_app.c $(DEP)
|
2015-07-08 23:12:06 +02:00
|
|
|
echo " CC x509/req_app.c"
|
2015-06-29 15:47:35 +02:00
|
|
|
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/req_app.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 22:22:43 +01:00
|
|
|
clean:
|
2012-05-10 23:26:28 +02:00
|
|
|
ifndef WINDOWS
|
2021-04-22 20:07:44 +02:00
|
|
|
rm -f $(EXES)
|
2019-06-03 10:14:14 +02:00
|
|
|
-rm -f ssl/ssl_pthread_server$(EXEXT)
|
2021-07-09 15:19:28 +02:00
|
|
|
-rm -f test/cpp_dummy_build.cpp test/cpp_dummy_build$(EXEXT)
|
2021-11-04 12:45:19 +01:00
|
|
|
-rm -f test/dlopen$(EXEXT)
|
2015-06-24 13:06:24 +02:00
|
|
|
else
|
2019-08-30 15:51:55 +02:00
|
|
|
if exist *.o del /Q /F *.o
|
|
|
|
if exist *.exe del /Q /F *.exe
|
2021-07-09 15:19:28 +02:00
|
|
|
if exist test\cpp_dummy_build.cpp del /Q /F test\cpp_dummy_build.cpp
|
2012-05-10 23:26:28 +02:00
|
|
|
endif
|
2019-06-27 08:46:45 +02:00
|
|
|
$(MAKE) -C fuzz clean
|
2013-09-16 13:33:42 +02:00
|
|
|
|
2021-04-22 01:01:56 +02:00
|
|
|
neat: clean
|
|
|
|
ifndef WINDOWS
|
|
|
|
rm -f $(GENERATED_FILES)
|
|
|
|
else
|
|
|
|
for %f in ($(subst /,\,$(GENERATED_FILES))) if exist %f del /Q /F %f
|
|
|
|
endif
|
|
|
|
|
2013-09-16 13:33:42 +02:00
|
|
|
list:
|
2021-04-22 20:07:44 +02:00
|
|
|
echo $(EXES)
|