mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-12 10:55:32 +00:00
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`.
This commit is contained in:
parent
f8c2965d11
commit
55d5353b3a
|
@ -171,11 +171,6 @@ if(USE_STATIC_MBEDTLS_LIBRARY)
|
||||||
target_include_directories(${mbedcrypto_static_target}
|
target_include_directories(${mbedcrypto_static_target}
|
||||||
PUBLIC ${MBEDTLS_DIR}/include/)
|
PUBLIC ${MBEDTLS_DIR}/include/)
|
||||||
|
|
||||||
if(USE_CRYPTO_SUBMODULE)
|
|
||||||
install(TARGETS ${mbedcrypto_static_target}
|
|
||||||
DESTINATION ${LIB_INSTALL_DIR}
|
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
|
||||||
else()
|
|
||||||
add_library(${mbedx509_static_target} STATIC ${src_x509})
|
add_library(${mbedx509_static_target} STATIC ${src_x509})
|
||||||
set_target_properties(${mbedx509_static_target} PROPERTIES OUTPUT_NAME mbedx509)
|
set_target_properties(${mbedx509_static_target} PROPERTIES OUTPUT_NAME mbedx509)
|
||||||
target_link_libraries(${mbedx509_static_target} ${libs} ${mbedcrypto_static_target})
|
target_link_libraries(${mbedx509_static_target} ${libs} ${mbedcrypto_static_target})
|
||||||
|
@ -187,7 +182,6 @@ if(USE_STATIC_MBEDTLS_LIBRARY)
|
||||||
install(TARGETS ${mbedtls_static_target} ${mbedx509_static_target} ${mbedcrypto_static_target}
|
install(TARGETS ${mbedtls_static_target} ${mbedx509_static_target} ${mbedcrypto_static_target}
|
||||||
DESTINATION ${LIB_INSTALL_DIR}
|
DESTINATION ${LIB_INSTALL_DIR}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||||
endif()
|
|
||||||
endif(USE_STATIC_MBEDTLS_LIBRARY)
|
endif(USE_STATIC_MBEDTLS_LIBRARY)
|
||||||
|
|
||||||
if(USE_SHARED_MBEDTLS_LIBRARY)
|
if(USE_SHARED_MBEDTLS_LIBRARY)
|
||||||
|
@ -210,11 +204,6 @@ if(USE_SHARED_MBEDTLS_LIBRARY)
|
||||||
target_include_directories(mbedtls
|
target_include_directories(mbedtls
|
||||||
PUBLIC ${MBEDTLS_DIR}/include/)
|
PUBLIC ${MBEDTLS_DIR}/include/)
|
||||||
|
|
||||||
if(USE_CRYPTO_SUBMODULE)
|
|
||||||
install(TARGETS mbedcrypto
|
|
||||||
DESTINATION ${LIB_INSTALL_DIR}
|
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
|
||||||
else()
|
|
||||||
add_library(mbedx509 SHARED ${src_x509})
|
add_library(mbedx509 SHARED ${src_x509})
|
||||||
set_target_properties(mbedx509 PROPERTIES VERSION 2.16.0 SOVERSION 0)
|
set_target_properties(mbedx509 PROPERTIES VERSION 2.16.0 SOVERSION 0)
|
||||||
target_link_libraries(mbedx509 ${libs} mbedcrypto)
|
target_link_libraries(mbedx509 ${libs} mbedcrypto)
|
||||||
|
@ -226,17 +215,9 @@ if(USE_SHARED_MBEDTLS_LIBRARY)
|
||||||
install(TARGETS mbedtls mbedx509 mbedcrypto
|
install(TARGETS mbedtls mbedx509 mbedcrypto
|
||||||
DESTINATION ${LIB_INSTALL_DIR}
|
DESTINATION ${LIB_INSTALL_DIR}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||||
endif()
|
|
||||||
endif(USE_SHARED_MBEDTLS_LIBRARY)
|
endif(USE_SHARED_MBEDTLS_LIBRARY)
|
||||||
|
|
||||||
if(USE_CRYPTO_SUBMODULE)
|
add_custom_target(lib DEPENDS mbedcrypto mbedx509 mbedtls)
|
||||||
add_custom_target(crypto_lib DEPENDS mbedcrypto)
|
if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY)
|
||||||
if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY)
|
|
||||||
add_dependencies(crypto_lib mbedcrypto_static)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
add_custom_target(lib DEPENDS mbedcrypto mbedx509 mbedtls)
|
|
||||||
if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY)
|
|
||||||
add_dependencies(lib mbedcrypto_static mbedx509_static mbedtls_static)
|
add_dependencies(lib mbedcrypto_static mbedx509_static mbedtls_static)
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -5,8 +5,7 @@ CFLAGS ?= -O2
|
||||||
WARNING_CFLAGS ?= -Wall -Wextra
|
WARNING_CFLAGS ?= -Wall -Wextra
|
||||||
LDFLAGS ?=
|
LDFLAGS ?=
|
||||||
|
|
||||||
CRYPTO_INCLUDES ?= -I../include
|
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64
|
||||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) $(CRYPTO_INCLUDES) -D_FILE_OFFSET_BITS=64
|
|
||||||
LOCAL_LDFLAGS =
|
LOCAL_LDFLAGS =
|
||||||
|
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
|
@ -73,7 +72,7 @@ OBJS_CRYPTO= aes.o aesni.o arc4.o \
|
||||||
dhm.o ecdh.o ecdsa.o \
|
dhm.o ecdh.o ecdsa.o \
|
||||||
ecjpake.o ecp.o \
|
ecjpake.o ecp.o \
|
||||||
ecp_curves.o entropy.o entropy_poll.o \
|
ecp_curves.o entropy.o entropy_poll.o \
|
||||||
gcm.o havege.o \
|
error.o gcm.o havege.o \
|
||||||
hkdf.o \
|
hkdf.o \
|
||||||
hmac_drbg.o md.o md2.o \
|
hmac_drbg.o md.o md2.o \
|
||||||
md4.o md5.o \
|
md4.o md5.o \
|
||||||
|
@ -89,20 +88,9 @@ OBJS_CRYPTO= aes.o aesni.o arc4.o \
|
||||||
ripemd160.o rsa_internal.o rsa.o \
|
ripemd160.o rsa_internal.o rsa.o \
|
||||||
sha1.o sha256.o sha512.o \
|
sha1.o sha256.o sha512.o \
|
||||||
threading.o timing.o \
|
threading.o timing.o \
|
||||||
|
version.o version_features.o \
|
||||||
xtea.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
|
include ../3rdparty/Makefile.inc
|
||||||
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
||||||
OBJS_CRYPTO+=$(THIRDPARTY_CRYPTO_OBJECTS)
|
OBJS_CRYPTO+=$(THIRDPARTY_CRYPTO_OBJECTS)
|
||||||
|
@ -221,9 +209,8 @@ libmbedcrypto.$(DLEXT): | libmbedcrypto.a
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
ifndef WINDOWS
|
ifndef WINDOWS
|
||||||
rm -f *.o libmbed* $(OBJS_CRYPTO)
|
rm -f *.o libmbed*
|
||||||
else
|
else
|
||||||
if exist *.o del /Q /F *.o
|
if exist *.o del /Q /F *.o
|
||||||
if exist libmbed* del /Q /F libmbed*
|
if exist libmbed* del /Q /F libmbed*
|
||||||
if exist $(OBJS_CRYPTO) del /Q /F $(OBJS_CRYPTO)
|
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue