Makefile: Read user_config by path

Disclosing the true path allows for relative includes in user_config.
This commit is contained in:
mk-pmb 2020-08-29 19:02:02 +02:00
parent 606f91664b
commit c2292ca36b
1 changed files with 3 additions and 3 deletions

View File

@ -20,14 +20,14 @@ SPIFFSFILES ?= $(patsubst $(FSSOURCE)/%,%,$(shell find $(FSSOURCE)/ -name '*' '!
# 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)),)
FLASHSIZE = $(shell printf "0x%x" $(FLASH_FS_SIZE))
FLASH_SW = -c
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)),)
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
@ -36,7 +36,7 @@ endif
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)
LUAC_CROSS := ../luac.cross
else