Add comments explaining include paths
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index c551ee5..8fd959c 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -192,6 +192,11 @@
endif(USE_SHARED_MBEDTLS_LIBRARY)
foreach(target IN LISTS target_libraries)
+ # Include public header files from /include and other directories
+ # declared by /3rdparty/**/CMakeLists.txt. Include private header files
+ # from /library and others declared by /3rdparty/**/CMakeLists.txt.
+ # /library needs to be listed explicitly when building .c files outside
+ # of /library (which currently means: under /3rdparty).
target_include_directories(${target}
PUBLIC ${MBEDTLS_DIR}/include/
PUBLIC ${thirdparty_inc_public}
diff --git a/library/Makefile b/library/Makefile
index 801304b..20a5984 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -5,6 +5,10 @@
WARNING_CFLAGS ?= -Wall -Wextra
LDFLAGS ?=
+# Include ../include for public headers and . for private headers.
+# Note that . needs to be included explicitly for the sake of library
+# files that are not in the /library directory (which currently means
+# under /3rdparty).
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I. -I../include -D_FILE_OFFSET_BITS=64
LOCAL_LDFLAGS =