aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Mao <raymond.mao@linaro.org>2024-04-16 12:00:06 -0700
committerTom Rini <trini@konsulko.com>2024-04-16 13:10:05 -0600
commit2a082728fb47778d7c43bb174a7659094224e127 (patch)
treea49dc1d0bceee8b4225313a2400b00f544420c07
parent26c18f65333f10a82c37e37d186b1bffe3618589 (diff)
downloadu-boot-2a082728fb47778d7c43bb174a7659094224e127.zip
u-boot-2a082728fb47778d7c43bb174a7659094224e127.tar.gz
u-boot-2a082728fb47778d7c43bb174a7659094224e127.tar.bz2
makefile: add mbedtls include directories
Add the mbedtls include directories into the build system. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7321fe1..80db1df 100644
--- a/Makefile
+++ b/Makefile
@@ -829,6 +829,12 @@ KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g)
UBOOTINCLUDE := \
-Iinclude \
$(if $(KBUILD_SRC), -I$(srctree)/include) \
+ $(if $(KBUILD_SRC), \
+ $(if $(CONFIG_MBEDTLS_LIB), \
+ "-DMBEDTLS_CONFIG_FILE=\"mbedtls_def_config.h\"" \
+ -I$(srctree)/lib/mbedtls \
+ -I$(srctree)/lib/mbedtls/port \
+ -I$(srctree)/lib/mbedtls/external/mbedtls/include)) \
$(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \
$(if $(CONFIG_HAS_THUMB2), \
$(if $(CONFIG_CPU_V7M), \
@@ -840,6 +846,13 @@ UBOOTINCLUDE := \
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
+ifeq ($(CONFIG_MBEDTLS_LIB),y)
+PLATFORM_CPPFLAGS += "-DMBEDTLS_CONFIG_FILE=\"mbedtls_def_config.h\"" \
+ -I$(srctree)/lib/mbedtls \
+ -I$(srctree)/lib/mbedtls/port \
+ -I$(srctree)/lib/mbedtls/external/mbedtls/include
+endif
+
# FIX ME
cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \
$(NOSTDINC_FLAGS)