mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-10 00:49:04 +08: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(include)
|
||||||
|
|
||||||
add_subdirectory(3rdparty)
|
add_subdirectory(tf-psa-crypto)
|
||||||
|
|
||||||
add_subdirectory(library)
|
add_subdirectory(library)
|
||||||
|
|
||||||
add_subdirectory(tf-psa-crypto)
|
|
||||||
|
|
||||||
add_subdirectory(pkgconfig)
|
add_subdirectory(pkgconfig)
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -374,7 +372,7 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
|
|||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/core
|
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}/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
|
# Pass-through MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE
|
||||||
if(MBEDTLS_CONFIG_FILE)
|
if(MBEDTLS_CONFIG_FILE)
|
||||||
|
@ -326,9 +326,9 @@ endif(USE_SHARED_MBEDTLS_LIBRARY)
|
|||||||
|
|
||||||
foreach(target IN LISTS target_libraries)
|
foreach(target IN LISTS target_libraries)
|
||||||
add_library(MbedTLS::${target} ALIAS ${target}) # add_subdirectory support
|
add_library(MbedTLS::${target} ALIAS ${target}) # add_subdirectory support
|
||||||
# Include public header files from /include, tf-psa-crypto/include/ and
|
# Include public header files from /include, /tf-psa-crypto/include/ and
|
||||||
# /tf-psa-crypto/drivers/builtin/include/. Include private header files
|
# tf-psa-crypto/drivers/builtin/include/. Include private header files
|
||||||
# from /library.
|
# from /library, tf-psa-crypto/core/ and tf-psa-crypto/drivers/builtin/src/.
|
||||||
target_include_directories(${target}
|
target_include_directories(${target}
|
||||||
PUBLIC $<BUILD_INTERFACE:${MBEDTLS_DIR}/include/>
|
PUBLIC $<BUILD_INTERFACE:${MBEDTLS_DIR}/include/>
|
||||||
$<BUILD_INTERFACE:${MBEDTLS_DIR}/tf-psa-crypto/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 \
|
$(TF_PSA_CRYPTO_DRIVERS_BUILTIN_SRC_PATH)/version_features.o \
|
||||||
# This line is intentionally left blank
|
# 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)
|
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
||||||
OBJS_CRYPTO+=$(THIRDPARTY_CRYPTO_OBJECTS)
|
OBJS_CRYPTO+=$(THIRDPARTY_CRYPTO_OBJECTS)
|
||||||
|
|
||||||
|
@ -44,7 +44,9 @@ LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
|
|||||||
-lmbedcrypto$(SHARED_SUFFIX)
|
-lmbedcrypto$(SHARED_SUFFIX)
|
||||||
endif
|
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)
|
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
||||||
|
|
||||||
ifdef PSASIM
|
ifdef PSASIM
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"prefix": "p256",
|
"prefix": "p256",
|
||||||
"type": "transparent",
|
"type": "transparent",
|
||||||
"mbedtls/h_condition": "defined(MBEDTLS_PSA_P256M_DRIVER_ENABLED)",
|
"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": [
|
"capabilities": [
|
||||||
{
|
{
|
||||||
"mbedtls/c_condition": "defined(MBEDTLS_PSA_P256M_DRIVER_ENABLED)",
|
"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 $test_drivers_source_dir = 'tests/src/drivers';
|
||||||
|
|
||||||
my @thirdparty_header_dirs = qw(
|
my @thirdparty_header_dirs = qw(
|
||||||
3rdparty/everest/include/everest
|
tf-psa-crypto/drivers/everest/include/everest
|
||||||
);
|
);
|
||||||
my @thirdparty_source_dirs = qw(
|
my @thirdparty_source_dirs = qw(
|
||||||
3rdparty/everest/library
|
tf-psa-crypto/drivers/everest/library
|
||||||
3rdparty/everest/library/kremlib
|
tf-psa-crypto/drivers/everest/library/kremlib
|
||||||
3rdparty/everest/library/legacy
|
tf-psa-crypto/drivers/everest/library/legacy
|
||||||
);
|
);
|
||||||
|
|
||||||
# Directories to add to the include path.
|
# Directories to add to the include path.
|
||||||
@ -49,10 +49,10 @@ my @include_directories = qw(
|
|||||||
include
|
include
|
||||||
tf-psa-crypto/include
|
tf-psa-crypto/include
|
||||||
tf-psa-crypto/drivers/builtin/include
|
tf-psa-crypto/drivers/builtin/include
|
||||||
3rdparty/everest/include/
|
tf-psa-crypto/drivers/everest/include/
|
||||||
3rdparty/everest/include/everest
|
tf-psa-crypto/drivers/everest/include/everest
|
||||||
3rdparty/everest/include/everest/vs2013
|
tf-psa-crypto/drivers/everest/include/everest/vs2013
|
||||||
3rdparty/everest/include/everest/kremlib
|
tf-psa-crypto/drivers/everest/include/everest/kremlib
|
||||||
tests/include
|
tests/include
|
||||||
);
|
);
|
||||||
my $include_directories = join(';', map {"../../$_"} @include_directories);
|
my $include_directories = join(';', map {"../../$_"} @include_directories);
|
||||||
@ -69,7 +69,7 @@ my $library_include_directories =
|
|||||||
@include_directories));
|
@include_directories));
|
||||||
|
|
||||||
my @excluded_files = qw(
|
my @excluded_files = qw(
|
||||||
3rdparty/everest/library/Hacl_Curve25519.c
|
tf-psa-crypto/drivers/everest/library/Hacl_Curve25519.c
|
||||||
);
|
);
|
||||||
my %excluded_files = ();
|
my %excluded_files = ();
|
||||||
foreach (@excluded_files) { $excluded_files{$_} = 1 }
|
foreach (@excluded_files) { $excluded_files{$_} = 1 }
|
||||||
|
@ -1 +1,3 @@
|
|||||||
add_subdirectory(builtin)
|
add_subdirectory(builtin)
|
||||||
|
add_subdirectory(everest)
|
||||||
|
add_subdirectory(p256-m)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user