Message ID | 20240507175132.1456512-12-raymond.mao@linaro.org |
---|---|
State | RFC |
Delegated to: | Tom Rini |
Headers | show |
Series | Integrate MbedTLS v3.6 LTS with U-Boot | expand |
On Tue, 7 May 2024 at 20:56, Raymond Mao <raymond.mao@linaro.org> wrote: > > Add the mbedtls include directories into the build system. > > Signed-off-by: Raymond Mao <raymond.mao@linaro.org> > --- > Changes in v2 > - None. > > Makefile | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/Makefile b/Makefile > index 7321fe1499e..80db1dfd8ec 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 cpp_flags already includes UBOOTINCLUDE. /Ilias > +endif > + > # FIX ME > cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ > $(NOSTDINC_FLAGS) > -- > 2.25.1 >
diff --git a/Makefile b/Makefile index 7321fe1499e..80db1dfd8ec 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)
Add the mbedtls include directories into the build system. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> --- Changes in v2 - None. Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+)