mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 15:35:50 +00:00
Adjust build systems
Adjust build systems such as we can built Mbed TLS in the default and full configuration. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
1606cff72c
commit
aef8cf3b2e
@ -294,12 +294,10 @@ add_subdirectory(framework)
|
||||
|
||||
add_subdirectory(include)
|
||||
|
||||
add_subdirectory(3rdparty)
|
||||
add_subdirectory(tf-psa-crypto)
|
||||
|
||||
add_subdirectory(library)
|
||||
|
||||
add_subdirectory(tf-psa-crypto)
|
||||
|
||||
add_subdirectory(pkgconfig)
|
||||
|
||||
#
|
||||
@ -374,7 +372,7 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/core
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/drivers/builtin/src
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/everest/include)
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/drivers/everest/include)
|
||||
|
||||
# Pass-through MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE
|
||||
if(MBEDTLS_CONFIG_FILE)
|
||||
|
@ -326,9 +326,9 @@ endif(USE_SHARED_MBEDTLS_LIBRARY)
|
||||
|
||||
foreach(target IN LISTS target_libraries)
|
||||
add_library(MbedTLS::${target} ALIAS ${target}) # add_subdirectory support
|
||||
# Include public header files from /include, tf-psa-crypto/include/ and
|
||||
# /tf-psa-crypto/drivers/builtin/include/. Include private header files
|
||||
# from /library.
|
||||
# Include public header files from /include, /tf-psa-crypto/include/ and
|
||||
# tf-psa-crypto/drivers/builtin/include/. Include private header files
|
||||
# from /library, tf-psa-crypto/core/ and tf-psa-crypto/drivers/builtin/src/.
|
||||
target_include_directories(${target}
|
||||
PUBLIC $<BUILD_INTERFACE:${MBEDTLS_DIR}/include/>
|
||||
$<BUILD_INTERFACE:${MBEDTLS_DIR}/tf-psa-crypto/include/>
|
||||
|
@ -192,7 +192,9 @@ OBJS_CRYPTO= \
|
||||
$(TF_PSA_CRYPTO_DRIVERS_BUILTIN_SRC_PATH)/version_features.o \
|
||||
# This line is intentionally left blank
|
||||
|
||||
include ../3rdparty/Makefile.inc
|
||||
THIRDPARTY_DIR := $(MBEDTLS_PATH)/tf-psa-crypto/drivers
|
||||
include $(MBEDTLS_PATH)/tf-psa-crypto/drivers/everest/Makefile.inc
|
||||
include $(MBEDTLS_PATH)/tf-psa-crypto/drivers/p256-m/Makefile.inc
|
||||
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
||||
OBJS_CRYPTO+=$(THIRDPARTY_CRYPTO_OBJECTS)
|
||||
|
||||
|
@ -44,7 +44,9 @@ LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
|
||||
-lmbedcrypto$(SHARED_SUFFIX)
|
||||
endif
|
||||
|
||||
include $(MBEDTLS_PATH)/3rdparty/Makefile.inc
|
||||
THIRDPARTY_DIR = $(MBEDTLS_PATH)/tf-psa-crypto/drivers
|
||||
include $(MBEDTLS_PATH)/tf-psa-crypto/drivers/everest/Makefile.inc
|
||||
include $(MBEDTLS_PATH)/tf-psa-crypto/drivers/p256-m/Makefile.inc
|
||||
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
||||
|
||||
ifdef PSASIM
|
||||
|
@ -2,7 +2,7 @@
|
||||
"prefix": "p256",
|
||||
"type": "transparent",
|
||||
"mbedtls/h_condition": "defined(MBEDTLS_PSA_P256M_DRIVER_ENABLED)",
|
||||
"headers": ["../3rdparty/p256-m/p256-m_driver_entrypoints.h"],
|
||||
"headers": ["../tf-psa-crypto/drivers/p256-m/p256-m_driver_entrypoints.h"],
|
||||
"capabilities": [
|
||||
{
|
||||
"mbedtls/c_condition": "defined(MBEDTLS_PSA_P256M_DRIVER_ENABLED)",
|
||||
|
@ -34,12 +34,12 @@ my $test_drivers_header_dir = 'tests/include/test/drivers';
|
||||
my $test_drivers_source_dir = 'tests/src/drivers';
|
||||
|
||||
my @thirdparty_header_dirs = qw(
|
||||
3rdparty/everest/include/everest
|
||||
tf-psa-crypto/drivers/everest/include/everest
|
||||
);
|
||||
my @thirdparty_source_dirs = qw(
|
||||
3rdparty/everest/library
|
||||
3rdparty/everest/library/kremlib
|
||||
3rdparty/everest/library/legacy
|
||||
tf-psa-crypto/drivers/everest/library
|
||||
tf-psa-crypto/drivers/everest/library/kremlib
|
||||
tf-psa-crypto/drivers/everest/library/legacy
|
||||
);
|
||||
|
||||
# Directories to add to the include path.
|
||||
@ -49,10 +49,10 @@ my @include_directories = qw(
|
||||
include
|
||||
tf-psa-crypto/include
|
||||
tf-psa-crypto/drivers/builtin/include
|
||||
3rdparty/everest/include/
|
||||
3rdparty/everest/include/everest
|
||||
3rdparty/everest/include/everest/vs2013
|
||||
3rdparty/everest/include/everest/kremlib
|
||||
tf-psa-crypto/drivers/everest/include/
|
||||
tf-psa-crypto/drivers/everest/include/everest
|
||||
tf-psa-crypto/drivers/everest/include/everest/vs2013
|
||||
tf-psa-crypto/drivers/everest/include/everest/kremlib
|
||||
tests/include
|
||||
);
|
||||
my $include_directories = join(';', map {"../../$_"} @include_directories);
|
||||
@ -69,7 +69,7 @@ my $library_include_directories =
|
||||
@include_directories));
|
||||
|
||||
my @excluded_files = qw(
|
||||
3rdparty/everest/library/Hacl_Curve25519.c
|
||||
tf-psa-crypto/drivers/everest/library/Hacl_Curve25519.c
|
||||
);
|
||||
my %excluded_files = ();
|
||||
foreach (@excluded_files) { $excluded_files{$_} = 1 }
|
||||
|
@ -1 +1,3 @@
|
||||
add_subdirectory(builtin)
|
||||
add_subdirectory(everest)
|
||||
add_subdirectory(p256-m)
|
||||
|
Loading…
x
Reference in New Issue
Block a user