all: Make use of $(TOP) variable in Makefiles, instead of "..".

$(TOP) is defined in py/mkenv.mk and should be used to refer to the top
level of this repository.
This commit is contained in:
Damien George
2017-08-11 12:22:19 +10:00
parent f9dfd8aa3b
commit 7d4a2f773c
15 changed files with 87 additions and 87 deletions

View File

@@ -12,7 +12,7 @@ FROZEN_DIR ?= scripts
FROZEN_MPY_DIR ?= modules
# include py core make definitions
include ../py/py.mk
include $(TOP)/py/py.mk
FWBIN = $(BUILD)/firmware-combined.bin
PORT ?= /dev/ttyACM0
@@ -23,7 +23,7 @@ CROSS_COMPILE = xtensa-lx106-elf-
ESP_SDK = $(shell $(CC) -print-sysroot)/usr
INC += -I.
INC += -I..
INC += -I$(TOP)
INC += -I$(BUILD)
INC += -I$(ESP_SDK)/include
@@ -220,16 +220,16 @@ ota:
#$(BUILD)/pins_$(BOARD).o: $(BUILD)/pins_$(BOARD).c
# $(call compile_c)
include ../py/mkrules.mk
include $(TOP)/py/mkrules.mk
axtls: $(BUILD)/libaxtls.a
$(BUILD)/libaxtls.a:
cd ../lib/axtls; cp config/upyconfig config/.config
cd ../lib/axtls; $(MAKE) oldconfig -B
cd ../lib/axtls; $(MAKE) clean
cd ../lib/axtls; $(MAKE) all CC="$(CC)" LD="$(LD)" AR="$(AR)" CFLAGS_EXTRA="$(CFLAGS_XTENSA) -Dabort=abort_ -DRT_MAX_PLAIN_LENGTH=1024 -DRT_EXTRA=4096"
cp ../lib/axtls/_stage/libaxtls.a $@
cd $(TOP)/lib/axtls; cp config/upyconfig config/.config
cd $(TOP)/lib/axtls; $(MAKE) oldconfig -B
cd $(TOP)/lib/axtls; $(MAKE) clean
cd $(TOP)/lib/axtls; $(MAKE) all CC="$(CC)" LD="$(LD)" AR="$(AR)" CFLAGS_EXTRA="$(CFLAGS_XTENSA) -Dabort=abort_ -DRT_MAX_PLAIN_LENGTH=1024 -DRT_EXTRA=4096"
cp $(TOP)/lib/axtls/_stage/libaxtls.a $@
clean-modules:
git clean -f -d modules