mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
py/py.mk: Build axtls library directly from its source files.
This removes the need for a separate axtls build stage, and builds all axtls object files along with other code. This simplifies and cleans up the build process, automatically builds axtls when needed, and puts the axtls object files in the correct $(BUILD) location. The MicroPython axtls configuration file is provided in extmod/axtls-include/config.h
This commit is contained in:
20
py/py.mk
20
py/py.mk
@@ -25,8 +25,24 @@ CFLAGS_MOD += -DFFCONF_H=\"lib/oofatfs/ffconf.h\"
|
||||
ifeq ($(MICROPY_PY_USSL),1)
|
||||
CFLAGS_MOD += -DMICROPY_PY_USSL=1
|
||||
ifeq ($(MICROPY_SSL_AXTLS),1)
|
||||
CFLAGS_MOD += -DMICROPY_SSL_AXTLS=1 -I$(TOP)/lib/axtls/ssl -I$(TOP)/lib/axtls/crypto -I$(TOP)/lib/axtls/config
|
||||
LDFLAGS_MOD += -L$(BUILD) -laxtls
|
||||
CFLAGS_MOD += -DMICROPY_SSL_AXTLS=1 -I$(TOP)/lib/axtls/ssl -I$(TOP)/lib/axtls/crypto -I$(TOP)/extmod/axtls-include
|
||||
AXTLS_DIR = lib/axtls
|
||||
$(BUILD)/$(AXTLS_DIR)/%.o: CFLAGS += -Wno-unused-parameter -Wno-unused-variable -Wno-unused-const-variable -Wno-unused-but-set-variable -Wno-array-bounds -Wno-uninitialized -Wno-sign-compare -Wno-old-style-definition $(AXTLS_DEFS_EXTRA)
|
||||
SRC_MOD += $(addprefix $(AXTLS_DIR)/,\
|
||||
ssl/asn1.c \
|
||||
ssl/loader.c \
|
||||
ssl/tls1.c \
|
||||
ssl/tls1_svr.c \
|
||||
ssl/tls1_clnt.c \
|
||||
ssl/x509.c \
|
||||
crypto/aes.c \
|
||||
crypto/bigint.c \
|
||||
crypto/crypto_misc.c \
|
||||
crypto/hmac.c \
|
||||
crypto/md5.c \
|
||||
crypto/rsa.c \
|
||||
crypto/sha1.c \
|
||||
)
|
||||
else ifeq ($(MICROPY_SSL_MBEDTLS),1)
|
||||
# Can be overridden by ports which have "builtin" mbedTLS
|
||||
MICROPY_SSL_MBEDTLS_INCLUDE ?= $(TOP)/lib/mbedtls/include
|
||||
|
||||
Reference in New Issue
Block a user