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:
parent
e814db592d
commit
0be2ea50e9
117
extmod/axtls-include/config.h
Normal file
117
extmod/axtls-include/config.h
Normal file
@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Automatically generated header file: don't edit
|
||||
*/
|
||||
|
||||
#define HAVE_DOT_CONFIG 1
|
||||
#define CONFIG_PLATFORM_LINUX 1
|
||||
#undef CONFIG_PLATFORM_CYGWIN
|
||||
#undef CONFIG_PLATFORM_WIN32
|
||||
|
||||
/*
|
||||
* General Configuration
|
||||
*/
|
||||
#define PREFIX "/usr/local"
|
||||
#undef CONFIG_DEBUG
|
||||
#undef CONFIG_STRIP_UNWANTED_SECTIONS
|
||||
#undef CONFIG_VISUAL_STUDIO_7_0
|
||||
#undef CONFIG_VISUAL_STUDIO_8_0
|
||||
#undef CONFIG_VISUAL_STUDIO_10_0
|
||||
#define CONFIG_VISUAL_STUDIO_7_0_BASE ""
|
||||
#define CONFIG_VISUAL_STUDIO_8_0_BASE ""
|
||||
#define CONFIG_VISUAL_STUDIO_10_0_BASE ""
|
||||
#define CONFIG_EXTRA_CFLAGS_OPTIONS ""
|
||||
#define CONFIG_EXTRA_LDFLAGS_OPTIONS ""
|
||||
|
||||
/*
|
||||
* SSL Library
|
||||
*/
|
||||
#undef CONFIG_SSL_SERVER_ONLY
|
||||
#undef CONFIG_SSL_CERT_VERIFICATION
|
||||
#undef CONFIG_SSL_FULL_MODE
|
||||
#define CONFIG_SSL_SKELETON_MODE 1
|
||||
#define CONFIG_SSL_ENABLE_SERVER 1
|
||||
#define CONFIG_SSL_ENABLE_CLIENT 1
|
||||
#undef CONFIG_SSL_DIAGNOSTICS
|
||||
#define CONFIG_SSL_PROT_LOW 1
|
||||
#undef CONFIG_SSL_PROT_MEDIUM
|
||||
#undef CONFIG_SSL_PROT_HIGH
|
||||
#define CONFIG_SSL_AES 1
|
||||
#define CONFIG_SSL_USE_DEFAULT_KEY 1
|
||||
#define CONFIG_SSL_PRIVATE_KEY_LOCATION ""
|
||||
#define CONFIG_SSL_PRIVATE_KEY_PASSWORD ""
|
||||
#define CONFIG_SSL_X509_CERT_LOCATION ""
|
||||
#undef CONFIG_SSL_GENERATE_X509_CERT
|
||||
#define CONFIG_SSL_X509_COMMON_NAME ""
|
||||
#define CONFIG_SSL_X509_ORGANIZATION_NAME ""
|
||||
#define CONFIG_SSL_X509_ORGANIZATION_UNIT_NAME ""
|
||||
#undef CONFIG_SSL_HAS_PEM
|
||||
#undef CONFIG_SSL_USE_PKCS12
|
||||
#define CONFIG_SSL_EXPIRY_TIME
|
||||
#define CONFIG_X509_MAX_CA_CERTS 0
|
||||
#define CONFIG_SSL_MAX_CERTS 3
|
||||
#undef CONFIG_SSL_CTX_MUTEXING
|
||||
#undef CONFIG_USE_DEV_URANDOM
|
||||
#undef CONFIG_WIN32_USE_CRYPTO_LIB
|
||||
#undef CONFIG_OPENSSL_COMPATIBLE
|
||||
#undef CONFIG_PERFORMANCE_TESTING
|
||||
#undef CONFIG_SSL_TEST
|
||||
#undef CONFIG_AXTLSWRAP
|
||||
#undef CONFIG_AXHTTPD
|
||||
#undef CONFIG_HTTP_STATIC_BUILD
|
||||
#define CONFIG_HTTP_PORT
|
||||
#define CONFIG_HTTP_HTTPS_PORT
|
||||
#define CONFIG_HTTP_SESSION_CACHE_SIZE
|
||||
#define CONFIG_HTTP_WEBROOT ""
|
||||
#define CONFIG_HTTP_TIMEOUT
|
||||
#undef CONFIG_HTTP_HAS_CGI
|
||||
#define CONFIG_HTTP_CGI_EXTENSIONS ""
|
||||
#undef CONFIG_HTTP_ENABLE_LUA
|
||||
#define CONFIG_HTTP_LUA_PREFIX ""
|
||||
#undef CONFIG_HTTP_BUILD_LUA
|
||||
#define CONFIG_HTTP_CGI_LAUNCHER ""
|
||||
#undef CONFIG_HTTP_DIRECTORIES
|
||||
#undef CONFIG_HTTP_HAS_AUTHORIZATION
|
||||
#undef CONFIG_HTTP_HAS_IPV6
|
||||
#undef CONFIG_HTTP_ENABLE_DIFFERENT_USER
|
||||
#define CONFIG_HTTP_USER ""
|
||||
#undef CONFIG_HTTP_VERBOSE
|
||||
#undef CONFIG_HTTP_IS_DAEMON
|
||||
|
||||
/*
|
||||
* Language Bindings
|
||||
*/
|
||||
#undef CONFIG_BINDINGS
|
||||
#undef CONFIG_CSHARP_BINDINGS
|
||||
#undef CONFIG_VBNET_BINDINGS
|
||||
#define CONFIG_DOT_NET_FRAMEWORK_BASE ""
|
||||
#undef CONFIG_JAVA_BINDINGS
|
||||
#define CONFIG_JAVA_HOME ""
|
||||
#undef CONFIG_PERL_BINDINGS
|
||||
#define CONFIG_PERL_CORE ""
|
||||
#define CONFIG_PERL_LIB ""
|
||||
#undef CONFIG_LUA_BINDINGS
|
||||
#define CONFIG_LUA_CORE ""
|
||||
|
||||
/*
|
||||
* Samples
|
||||
*/
|
||||
#undef CONFIG_SAMPLES
|
||||
#undef CONFIG_C_SAMPLES
|
||||
#undef CONFIG_CSHARP_SAMPLES
|
||||
#undef CONFIG_VBNET_SAMPLES
|
||||
#undef CONFIG_JAVA_SAMPLES
|
||||
#undef CONFIG_PERL_SAMPLES
|
||||
#undef CONFIG_LUA_SAMPLES
|
||||
#undef CONFIG_BIGINT_CLASSICAL
|
||||
#undef CONFIG_BIGINT_MONTGOMERY
|
||||
#undef CONFIG_BIGINT_BARRETT
|
||||
#undef CONFIG_BIGINT_CRT
|
||||
#undef CONFIG_BIGINT_KARATSUBA
|
||||
#define MUL_KARATSUBA_THRESH
|
||||
#define SQU_KARATSUBA_THRESH
|
||||
#undef CONFIG_BIGINT_SLIDING_WINDOW
|
||||
#undef CONFIG_BIGINT_SQUARE
|
||||
#undef CONFIG_BIGINT_CHECK_ON
|
||||
#undef CONFIG_INTEGER_32BIT
|
||||
#undef CONFIG_INTEGER_16BIT
|
||||
#undef CONFIG_INTEGER_8BIT
|
1
extmod/axtls-include/version.h
Normal file
1
extmod/axtls-include/version.h
Normal file
@ -0,0 +1 @@
|
||||
#define AXTLS_VERSION "(no version)"
|
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
|
||||
|
Loading…
Reference in New Issue
Block a user