Skip to content

Commit 6aa7c80

Browse files
committed
esp8266: Cache Xtensa-built libaxtls.a in local build dir.
Allows to build the library variant for other archs in parallel.
1 parent bcd0e9a commit 6aa7c80

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

esp8266/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ SRC_QSTR += $(SRC_C) $(STM_SRC_C) $(EXTMOD_SRC_C) $(DRIVERS_SRC_C)
154154
# Append any auto-generated sources that are needed by sources listed in SRC_QSTR
155155
SRC_QSTR_AUTO_DEPS +=
156156

157-
all: $(BUILD)/firmware-combined.bin
157+
all: $(BUILD)/libaxtls.a $(BUILD)/firmware-combined.bin
158158

159159
CONFVARS_FILE = $(BUILD)/confvars
160160

@@ -230,8 +230,11 @@ $(BUILD)/firmware.elf: $(OBJ)
230230

231231
include ../py/mkrules.mk
232232

233-
axtls:
233+
axtls: $(BUILD)/libaxtls.a
234+
235+
$(BUILD)/libaxtls.a:
234236
cd ../lib/axtls; cp config/upyconfig config/.config
235237
cd ../lib/axtls; make oldconfig -B
236238
cd ../lib/axtls; make clean
237239
cd ../lib/axtls; make all CC="$(CC)" LD="$(LD)" AR="$(AR)" CFLAGS_EXTRA="$(CFLAGS_XTENSA) -Dabort=abort_ -DRT_MAX_PLAIN_LENGTH=1024 -DRT_EXTRA=3072"
240+
cp ../lib/axtls/_stage/libaxtls.a $@

py/py.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ifeq ($(MICROPY_PY_USSL),1)
2323
CFLAGS_MOD += -DMICROPY_PY_USSL=1
2424
ifeq ($(MICROPY_SSL_AXTLS),1)
2525
CFLAGS_MOD += -DMICROPY_SSL_AXTLS=1 -I../lib/axtls/ssl -I../lib/axtls/crypto -I../lib/axtls/config
26-
LDFLAGS_MOD += -L../lib/axtls/_stage -laxtls
26+
LDFLAGS_MOD += -Lbuild -laxtls
2727
endif
2828
endif
2929

0 commit comments

Comments
 (0)