diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ab1f3f9c..b9d2d8147 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,6 +191,7 @@ if(ENABLE_ZLIB_SUPPORT) endif(ZLIB_FOUND) endif(ENABLE_ZLIB_SUPPORT) +add_subdirectory(3rdparty) add_subdirectory(library) add_subdirectory(include) add_subdirectory(crypto/library) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index d1cf26fef..afabdf7d5 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -64,18 +64,9 @@ set(src_crypto version.c version_features.c xtea.c + ${src_thirdparty} ) -set(src_everest - ../3rdparty/everest/library/everest.c - ../3rdparty/everest/library/Hacl_Curve25519.c - ../3rdparty/everest/library/x25519.c - ../3rdparty/everest/library/kremlib/fstar_uint128.c - ../3rdparty/everest/library/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c -) - -set(src_crypto ${src_crypto} ${src_everest}) - set(src_x509 certs.c pkcs11.c diff --git a/library/Makefile b/library/Makefile index 72091b06d..4a2479c36 100644 --- a/library/Makefile +++ b/library/Makefile @@ -18,9 +18,6 @@ endif # To compile on Plan9: # CFLAGS += -D_BSD_EXTENSION -# Include directories for Everest code -LOCAL_CFLAGS+=-I../3rdparty/everest/include -I../3rdparty/everest/include/everest -I../3rdparty/everest/include/everest/kremlib - # if were running on Windows build for Windows ifdef WINDOWS WINDOWS_BUILD=1 @@ -73,12 +70,6 @@ LOCAL_LDFLAGS += -L../crypto/library LOCAL_CFLAGS += -I../crypto/include CRYPTO := ../crypto/library/ -OBJS_CRYPTO+= \ - ../3rdparty/everest/library/everest.o \ - ../3rdparty/everest/library/Hacl_Curve25519.o \ - ../3rdparty/everest/library/x25519.o \ - ../3rdparty/everest/library/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.o - OBJS_X509= certs.o pkcs11.o x509.o \ x509_create.o x509_crl.o x509_crt.o \ x509_csr.o x509write_crt.o x509write_csr.o @@ -89,6 +80,10 @@ OBJS_TLS= debug.o net_sockets.o \ ssl_srv.o ssl_ticket.o \ ssl_tls.o +include ../3rdparty/Makefile.inc +LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES) +OBJS_CRYPTO+=$(THIRDPARTY_OBJECTS) + .SILENT: .PHONY: all static shared clean @@ -170,4 +165,3 @@ ifndef WINDOWS else del /Q /F *.o libmbed* $(OBJS_CRYPTO) endif -