build: set platform name without quotes and reuse everywhere
Avoid having to remove quotes wherever the platform name is used by exporting the variable only once. Change-Id: I4cb51901e4ac19d70d0310fe6bbacd157f586661 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
c4ad67dd9c
commit
1e3dca51bb
12 changed files with 17 additions and 20 deletions
4
Makefile
4
Makefile
|
@ -746,12 +746,14 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
|
|||
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
|
||||
libs-y := $(libs-y1) $(libs-y2)
|
||||
|
||||
PLATFORM_NAME = $(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
export PLATFORM_NAME
|
||||
# Externally visible symbols (used by link-zephyr.sh)
|
||||
export KBUILD_ZEPHYR_MAIN := $(drivers-y) $(core-y) $(libs-y) $(app-y)
|
||||
ifdef CONFIG_HAVE_CUSTOM_LINKER_SCRIPT
|
||||
export KBUILD_LDS := $(subst $(DQUOTE),,$(CONFIG_CUSTOM_LINKER_SCRIPT))
|
||||
else
|
||||
export KBUILD_LDS := $(srctree)/arch/$(SRCARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))/linker.cmd
|
||||
export KBUILD_LDS := $(srctree)/arch/$(SRCARCH)/platforms/$(PLATFORM_NAME)/linker.cmd
|
||||
endif
|
||||
export LDFLAGS_zephyr
|
||||
# used by scripts/pacmage/Makefile
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
subdir-ccflags-y +=-I$(srctree)/arch/arc/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
subdir-ccflags-y +=-I$(srctree)/arch/arc/platforms/$(PLATFORM_NAME)
|
||||
subdir-ccflags-y +=-I$(srctree)/include/drivers
|
||||
subdir-ccflags-y +=-I$(srctree)/drivers
|
||||
subdir-asflags-y += $(subdir-ccflags-y)
|
||||
|
||||
obj-y = core/
|
||||
obj-y += platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))/
|
||||
obj-y += platforms/$(PLATFORM_NAME)/
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
ccflags-y +=-I$(srctree)/arch/arc/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
ccflags-y +=-I$(srctree)/arch/arc/platforms/$(PLATFORM_NAME)
|
||||
ccflags-y +=-I$(srctree)/arch/x86/platforms/
|
||||
ccflags-y +=-I$(srctree)/include
|
||||
ccflags-y +=-I$(srctree)/include/drivers
|
||||
ccflags-y +=-I$(srctree)/drivers
|
||||
asflags-y +=-I$(srctree)/arch/arc/platforms/$(PLATFORM_NAME)
|
||||
ccflags-$(CONFIG_ADC) +=-I$(srctree)/drivers/adc
|
||||
asflags-y +=-I$(srctree)/arch/arc/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
|
||||
asflags-y := ${ccflags-y}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
subdir-ccflags-y +=-I$(srctree)/include/drivers
|
||||
subdir-ccflags-y +=-I$(srctree)/drivers
|
||||
subdir-ccflags-y +=-I$(srctree)/arch/arm/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
subdir-ccflags-y +=-I$(srctree)/arch/arm/platforms/$(PLATFORM_NAME)
|
||||
subdir-asflags-y := ${subdir-ccflags-y}
|
||||
|
||||
obj-y += core/
|
||||
obj-y += platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))/
|
||||
obj-y += platforms/$(PLATFORM_NAME)/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
ccflags-y +=-I$(srctree)/include/drivers
|
||||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME)
|
||||
|
||||
asflags-y = $(ccflags-y)
|
||||
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
DQUOTE = "
|
||||
# This comment line is to fix the highlighting of some editors due the quote effect."
|
||||
obj-y += core/
|
||||
obj-y += platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))/
|
||||
obj-y += platforms/$(PLATFORM_NAME)/
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
ccflags-y +=-I$(srctree)/arch/x86
|
||||
ccflags-y +=-I$(srctree)/arch/x86/platforms/$(PLATFORM_NAME)/
|
||||
ccflags-y +=-I$(srctree)/include/drivers
|
||||
ccflags-y +=-I$(srctree)/drivers
|
||||
asflags-y := ${ccflags-y}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
subdir-ccflags-y += -I$(srctree)/include/drivers
|
||||
subdir-ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
subdir-asflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
subdir-ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME)
|
||||
subdir-asflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME)
|
||||
|
||||
obj-y = console/
|
||||
obj-y += random/
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
ccflags-y +=-I$(srctree)/arch/$(ARCH)
|
||||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
asflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
|
||||
obj-$(CONFIG_AIO_DW_COMPARATOR) += aio_dw_comparator.o aio_static_irq_stubs.o
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME)
|
||||
|
||||
obj-y = main.o
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
ccflags-y += ${PROJECTINCLUDE} -I${srctree}/samples/include
|
||||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME)
|
||||
|
||||
obj-y = atomic.o
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
ccflags-y += ${PROJECTINCLUDE} -I${srctree}/samples/include
|
||||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(subst $(DQUOTE),,$(CONFIG_PLATFORM))
|
||||
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME)
|
||||
ccflags-$(CONFIG_PLATFORM_QUARK_D2000) += -DFIBER_STACKSIZE=256
|
||||
|
||||
obj-y = context.o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue