1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Build from submodule by default (make, cmake)

Adapt tests in all.sh:
- tests with submodule enabled (default) no longer need to enable it
  explicitly, and no longer need runtime tests, as those are now handled by
all other test cases in this script
- tests with submodule disabled (old default) now need to disable it
  explicitly, and execute some runtime tests, as those are no longer tested
anywhere else in this script

Adapt documentation in Readme: remove the section "building with submodule"
and replace it with a new section before the other building sections.
Purposefully don't document how to build not from the submodule, as that
option is going away soon.
This commit is contained in:
Manuel Pégourié-Gonnard
2019-02-01 11:12:52 +01:00
committed by Andrzej Kurek
parent 31d1432233
commit d8167e85d6
7 changed files with 77 additions and 70 deletions

View File

@ -1,6 +1,9 @@
# Also see "include/mbedtls/config.h"
# build crypto form submodule unless explicitly disabled
USE_CRYPTO_SUBMODULE ?= 1
CFLAGS ?= -O2
WARNING_CFLAGS ?= -Wall -W -Wdeclaration-after-statement
LDFLAGS ?=
@ -64,7 +67,7 @@ endif
endif
ifdef USE_CRYPTO_SUBMODULE
ifneq ($(USE_CRYPTO_SUBMODULE), 0)
# Look in crypto for libmbedcrypto.
LOCAL_LDFLAGS += -L../crypto/library
LOCAL_CFLAGS += -I../crypto/include
@ -174,7 +177,7 @@ libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_X509) -lws2_32 -lwinmm -lgdi32 -L. -lmbedcrypto -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
# crypto
ifdef USE_CRYPTO_SUBMODULE
ifneq ($(USE_CRYPTO_SUBMODULE), 0)
libmbedcrypto.%:
$(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C ../crypto/library $@
else