aboutsummaryrefslogtreecommitdiff
path: root/py/py.mk
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-09-05 14:06:00 +1000
committerDamien George <damien.p.george@gmail.com>2018-09-08 00:07:23 +1000
commit0be2ea50e98f9d742b9611d0289853a11d9e7f53 (patch)
treee58f857d8fd5058e9788d98743ce927c3a36b416 /py/py.mk
parente814db592dfa574a4f41717a1bc1734919a780c4 (diff)
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
Diffstat (limited to 'py/py.mk')
-rw-r--r--py/py.mk20
1 files changed, 18 insertions, 2 deletions
diff --git a/py/py.mk b/py/py.mk
index d6392e997..f55ee5051 100644
--- a/py/py.mk
+++ b/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