py/py.mk: Add support for building modussl_mbedtls.

This commit is contained in:
Paul Sokolovsky 2016-09-23 14:30:26 +03:00
parent 6d310a5552
commit 9cc8ec843e
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,11 @@ CFLAGS_MOD += -DMICROPY_PY_USSL=1
ifeq ($(MICROPY_SSL_AXTLS),1)
CFLAGS_MOD += -DMICROPY_SSL_AXTLS=1 -I../lib/axtls/ssl -I../lib/axtls/crypto -I../lib/axtls/config
LDFLAGS_MOD += -Lbuild -laxtls
else ifeq ($(MICROPY_SSL_MBEDTLS),1)
# Can be overriden by ports which have "builtin" mbedTLS
MICROPY_SSL_MBEDTLS_INCLUDE ?= ../lib/mbedtls/include
CFLAGS_MOD += -DMICROPY_SSL_MBEDTLS=1 -I$(MICROPY_SSL_MBEDTLS_INCLUDE)
LDFLAGS_MOD += -L../lib/mbedtls/library -lmbedx509 -lmbedtls -lmbedcrypto
endif
endif
@ -212,6 +217,7 @@ PY_O_BASENAME = \
../extmod/machine_i2c.o \
../extmod/machine_spi.o \
../extmod/modussl_axtls.o \
../extmod/modussl_mbedtls.o \
../extmod/modurandom.o \
../extmod/modwebsocket.o \
../extmod/modwebrepl.o \

View File

@ -29,6 +29,7 @@ MICROPY_PY_FFI = 1
# ussl module requires axtls
MICROPY_PY_USSL = 1
MICROPY_SSL_AXTLS = 1
MICROPY_SSL_MBEDTLS = 0
# jni module requires JVM/JNI
MICROPY_PY_JNI = 0