Makefile: Read user_config by path
Disclosing the true path allows for relative includes in user_config.
This commit is contained in:
parent
606f91664b
commit
c2292ca36b
|
@ -20,14 +20,14 @@ SPIFFSFILES ?= $(patsubst $(FSSOURCE)/%,%,$(shell find $(FSSOURCE)/ -name '*' '!
|
||||||
# Get the filesize of /bin/0x10000.bin and SPIFFS sizing
|
# Get the filesize of /bin/0x10000.bin and SPIFFS sizing
|
||||||
#
|
#
|
||||||
|
|
||||||
FLASH_FS_SIZE := $(shell $(CC) -E -dM - <$(APP_DIR)/include/user_config.h | grep SPIFFS_MAX_FILESYSTEM_SIZE| cut -d ' ' -f 3)
|
FLASH_FS_SIZE := $(shell $(CC) -E -dM $(APP_DIR)/include/user_config.h | grep SPIFFS_MAX_FILESYSTEM_SIZE| cut -d ' ' -f 3)
|
||||||
|
|
||||||
ifneq ($(strip $(FLASH_FS_SIZE)),)
|
ifneq ($(strip $(FLASH_FS_SIZE)),)
|
||||||
FLASHSIZE = $(shell printf "0x%x" $(FLASH_FS_SIZE))
|
FLASHSIZE = $(shell printf "0x%x" $(FLASH_FS_SIZE))
|
||||||
FLASH_SW = -c
|
FLASH_SW = -c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
FLASH_FS_LOC := $(shell $(CC) -E -dM - <$(APP_DIR)/include/user_config.h | grep SPIFFS_FIXED_LOCATION| cut -d ' ' -f 3)
|
FLASH_FS_LOC := $(shell $(CC) -E -dM $(APP_DIR)/include/user_config.h | grep SPIFFS_FIXED_LOCATION| cut -d ' ' -f 3)
|
||||||
ifeq ($(strip $(FLASH_FS_LOC)),)
|
ifeq ($(strip $(FLASH_FS_LOC)),)
|
||||||
FLASH_FS_LOC := $(shell printf "0x%x" $$((0x$(shell $(OBJDUMP) -t $(APP_DIR)/.output/eagle/debug/image/eagle.app.v6.out |grep " _flash_used_end" |cut -f1 -d" ") - 0x40200000)))
|
FLASH_FS_LOC := $(shell printf "0x%x" $$((0x$(shell $(OBJDUMP) -t $(APP_DIR)/.output/eagle/debug/image/eagle.app.v6.out |grep " _flash_used_end" |cut -f1 -d" ") - 0x40200000)))
|
||||||
else
|
else
|
||||||
|
@ -36,7 +36,7 @@ endif
|
||||||
|
|
||||||
LFSSOURCES := $(wildcard $(LUASOURCE)/*.lua)
|
LFSSOURCES := $(wildcard $(LUASOURCE)/*.lua)
|
||||||
|
|
||||||
BUILD_TYPE := $(shell $(CC) $(EXTRA_CCFLAGS) -E -dM - <$(APP_DIR)/include/user_config.h | grep LUA_NUMBER_INTEGRAL | wc -l)
|
BUILD_TYPE := $(shell $(CC) $(EXTRA_CCFLAGS) -E -dM $(APP_DIR)/include/user_config.h | grep LUA_NUMBER_INTEGRAL | wc -l)
|
||||||
ifeq ($(BUILD_TYPE),0)
|
ifeq ($(BUILD_TYPE),0)
|
||||||
LUAC_CROSS := ../luac.cross
|
LUAC_CROSS := ../luac.cross
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue