Enable tests in Mbed OS environment
Update Makefiles and config.pl to adapt to directory structure used
in Mbed OS.
diff --git a/library/Makefile b/library/Makefile
index 341888a..ce9c1eb 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -5,7 +5,20 @@
WARNING_CFLAGS ?= -Wall -W -Wdeclaration-after-statement
LDFLAGS ?=
-LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64
+DIR_FOR_MBED_TLS_ENV=../library
+ifneq "$(wildcard $(DIR_FOR_MBED_TLS_ENV) )" ""
+ # Set include dirs for Mbed TLS test environment
+ INCLUDE_DIRS=-I../include
+else
+ # Set include dirs for Mbed OS test environment
+ INCLUDE_DIRS=-I.. -I../inc
+endif
+
+LOCAL_CFLAGS = $(WARNING_CFLAGS) $(INCLUDE_DIRS) -D_FILE_OFFSET_BITS=64
+ifdef MBEDTLS_CONFIG_FILE
+LOCAL_CFLAGS += "-DMBEDTLS_CONFIG_FILE=\"${MBEDTLS_CONFIG_FILE}\""
+endif
+
LOCAL_LDFLAGS =
ifdef DEBUG