ECDH: Include Everest Curve25519 in build scripts
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index c82784e..d1cf26f 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -66,6 +66,16 @@
     xtea.c
 )
 
+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 af472ad..a757752 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -18,6 +18,9 @@
 # To compile on Plan9:
 # CFLAGS += -D_BSD_EXTENSION
 
+# Include directories for Everest code
+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
@@ -70,6 +73,13 @@
 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_uint128.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
@@ -153,11 +163,12 @@
 
 .c.o:
 	echo "  CC    $<"
-	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c $<
+	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $<
 
 clean:
 ifndef WINDOWS
-	rm -f *.o libmbed*
+	rm -f *.o libmbed* $(OBJS_CRYPTO)
 else
-	del /Q /F *.o libmbed*
+	del /Q /F *.o libmbed* $(OBJS_CRYPTO)
 endif
+