build system: Fix undefined variables

make/project.mk:315: warning: undefined variable `CC'
    make/project.mk:316: warning: undefined variable `LD'
    make/project.mk:317: warning: undefined variable `AR'
    make/project.mk:62: warning: undefined variable `MAKECMDGOALS'
    components/partition_table/Makefile.projbuild:24: warning: undefined variable `quote'
    components/bootloader/Makefile.projbuild:123: warning: undefined variable 'BOOTLOADER_DIGEST_BIN'
    components/bootloader/Makefile.projbuild:123: warning: undefined variable 'SECURE_BOOTLOADER_KEY'
This commit is contained in:
Anton Maklakov 2017-10-20 12:14:41 +08:00 committed by He Yin Ling
parent 3c6bce1d81
commit 93c18bb2b4
3 changed files with 12 additions and 10 deletions

View File

@ -121,4 +121,6 @@ endif
bootloader-clean: $(SDKCONFIG_MAKEFILE)
$(BOOTLOADER_MAKE) app-clean
ifdef CONFIG_SECURE_BOOTLOADER_REFLASHABLE
rm -f $(SECURE_BOOTLOADER_KEY) $(BOOTLOADER_DIGEST_BIN)
endif

View File

@ -21,8 +21,7 @@ ifndef PARTITION_TABLE_CSV_PATH
# Path to partition CSV file is relative to project path for custom
# partition CSV files, but relative to component dir otherwise.
PARTITION_TABLE_ROOT := $(call dequote,$(if $(CONFIG_PARTITION_TABLE_CUSTOM),$(PROJECT_PATH),$(COMPONENT_PATH)))
quote := "
PARTITION_TABLE_CSV_PATH := $(call dequote,$(abspath $(PARTITION_TABLE_ROOT)/$(subst $(quote),,$(CONFIG_PARTITION_TABLE_FILENAME))))
PARTITION_TABLE_CSV_PATH := $(call dequote,$(abspath $(PARTITION_TABLE_ROOT)/$(call dequote,$(CONFIG_PARTITION_TABLE_FILENAME))))
endif
PARTITION_TABLE_CSV_NAME := $(notdir $(PARTITION_TABLE_CSV_PATH))

View File

@ -11,6 +11,8 @@
#
.PHONY: build-components menuconfig defconfig all build clean all_binaries check-submodules size size-components size-files list-components
MAKECMDGOALS ?= all
all: all_binaries
# see below for recipe of 'all' target
#
@ -326,20 +328,19 @@ endif
export CFLAGS CPPFLAGS CXXFLAGS
# Set default values that were not previously defined
CC ?= gcc
LD ?= ld
AR ?= ar
OBJCOPY ?= objcopy
SIZE ?= size
# Set host compiler and binutils
HOSTCC := $(CC)
HOSTLD := $(LD)
HOSTAR := $(AR)
ifdef OBJCOPY
HOSTOBJCOPY := $(OBJCOPY)
else
HOSTOBJCOPY := objcopy
endif
ifdef SIZE
HOSTSIZE := $(SIZE)
else
HOSTSIZE := size
endif
export HOSTCC HOSTLD HOSTAR HOSTOBJCOPY SIZE
# Set target compiler. Defaults to whatever the user has