Remove lingering build code referencing the crypto submodule
Remove code guarded by `USE_CRYPTO_SUBMODULE`. It's dead now that
crypto can no longer be a submodule.
In `library/Makefile`:
* Replace `$(CRYPTO_INCLUDE)` with the single include directory
`-I../include`.
* Remove references to `$(OBJS_CRYPTO)` when it's in addition to the
local objects (`*.o`) since `$(OBJS_CRYPTO)` is now a subset of the
local objects.
* Merge modules that were duplicated between the mbedtls and the
mbed-crypto repositories back into the single list for `OBJS_CRYPTO`.
diff --git a/library/Makefile b/library/Makefile
index 07247f1..e4f92e5 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -5,8 +5,7 @@
WARNING_CFLAGS ?= -Wall -Wextra
LDFLAGS ?=
-CRYPTO_INCLUDES ?= -I../include
-LOCAL_CFLAGS = $(WARNING_CFLAGS) $(CRYPTO_INCLUDES) -D_FILE_OFFSET_BITS=64
+LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64
LOCAL_LDFLAGS =
ifdef DEBUG
@@ -73,7 +72,7 @@
dhm.o ecdh.o ecdsa.o \
ecjpake.o ecp.o \
ecp_curves.o entropy.o entropy_poll.o \
- gcm.o havege.o \
+ error.o gcm.o havege.o \
hkdf.o \
hmac_drbg.o md.o md2.o \
md4.o md5.o \
@@ -89,20 +88,9 @@
ripemd160.o rsa_internal.o rsa.o \
sha1.o sha256.o sha512.o \
threading.o timing.o \
+ version.o version_features.o \
xtea.o
-# For files generated by the parent project (Mbed TLS) when building Mbed
-# Crypto as a submodule, ensure that the parent project instance is used.
-ifeq ($(USE_CRYPTO_SUBMODULE), 1)
-OBJS_CRYPTO += $(patsubst %.c,%.o, $(realpath ../../library/error.c))
-OBJS_CRYPTO += $(patsubst %.c,%.o, $(realpath ../../library/version.c))
-OBJS_CRYPTO += $(patsubst %.c,%.o, $(realpath ../../library/version_features.c))
-else
-OBJS_CRYPTO += error.o
-OBJS_CRYPTO += version.o
-OBJS_CRYPTO += version_features.o
-endif
-
include ../3rdparty/Makefile.inc
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
OBJS_CRYPTO+=$(THIRDPARTY_CRYPTO_OBJECTS)
@@ -221,9 +209,8 @@
clean:
ifndef WINDOWS
- rm -f *.o libmbed* $(OBJS_CRYPTO)
+ rm -f *.o libmbed*
else
if exist *.o del /Q /F *.o
if exist libmbed* del /Q /F libmbed*
- if exist $(OBJS_CRYPTO) del /Q /F $(OBJS_CRYPTO)
endif