Require framework directory to exist when building

The framework directory will be provided by a submodule.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5585c78..154c84a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -277,6 +277,8 @@
     set(CMAKE_INSTALL_LIBDIR "${LIB_INSTALL_DIR}")
 endif()
 
+add_subdirectory(framework)
+
 add_subdirectory(include)
 
 add_subdirectory(3rdparty)
diff --git a/Makefile b/Makefile
index 885948c..2e41aba 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@
 PREFIX=mbedtls_
 PERL ?= perl
 
+include framework/exported.make
+
 .SILENT:
 
 .PHONY: all no_test programs lib tests install uninstall clean test check lcov apidoc apidoc_clean
diff --git a/library/Makefile b/library/Makefile
index d11a98d..d5e4f64 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -1,3 +1,4 @@
+include ../framework/exported.make
 
 # Also see "include/mbedtls/mbedtls_config.h"
 
diff --git a/scripts/common.make b/scripts/common.make
index 2714bcd..2da58d0 100644
--- a/scripts/common.make
+++ b/scripts/common.make
@@ -4,6 +4,8 @@
 MBEDTLS_PATH := ..
 endif
 
+include $(MBEDTLS_PATH)/framework/exported.make
+
 CFLAGS	?= -O2
 WARNING_CFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral
 WARNING_CXXFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral