This is an automated email from the ASF dual-hosted git repository. gnutt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit a2f657e4cb1d0aa895dfc5bac134a74a384e610e Author: Xiang Xiao <[email protected]> AuthorDate: Sat May 2 04:29:47 2020 +0800 build: Move KDEFINE to a common place(tools/Config.mk) Signed-off-by: Xiang Xiao <[email protected]> --- libs/libc/Makefile | 6 ------ libs/libnx/Makefile | 6 ------ mm/Makefile | 6 ------ tools/Config.mk | 5 +++++ tools/Makefile.unix | 5 ----- tools/Makefile.win | 5 ----- 6 files changed, 5 insertions(+), 28 deletions(-) diff --git a/libs/libc/Makefile b/libs/libc/Makefile index 2068f66..56a677b 100644 --- a/libs/libc/Makefile +++ b/libs/libc/Makefile @@ -35,12 +35,6 @@ -include $(TOPDIR)/Make.defs -# CFLAGS - -ifneq ($(CONFIG_BUILD_FLAT),y) - KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__} -endif - # Sources and paths ASRCS = diff --git a/libs/libnx/Makefile b/libs/libnx/Makefile index ac7268f..d9948fa 100644 --- a/libs/libnx/Makefile +++ b/libs/libnx/Makefile @@ -35,12 +35,6 @@ -include $(TOPDIR)/Make.defs -# CFLAGS - -ifneq ($(CONFIG_BUILD_FLAT),y) - KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__} -endif - # Sources and paths ASRCS = diff --git a/mm/Makefile b/mm/Makefile index 32fd3f4..e5865b0 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -38,12 +38,6 @@ # REVISIT: Backslash causes problems in $(COBJS) target DELIM := $(strip /) -# CFLAGS - -ifneq ($(CONFIG_BUILD_FLAT),y) - KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__} -endif - # Sources and paths ASRCS = diff --git a/tools/Config.mk b/tools/Config.mk index 764e2ba..f96c40e 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -60,6 +60,11 @@ CONFIG_ARCH_BOARD := $(patsubst "%",%,$(strip $(CONFIG_ARCH_BOARD))) OBJEXT ?= .o LIBEXT ?= .a +# This define is passed as EXTRAFLAGS for kernel-mode builds. It is also passed +# during PASS1 (but not PASS2) context and depend targets. + +KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__} + # DELIM - Path segment delimiter character # # Depends on this settings defined in board-specific defconfig file installed diff --git a/tools/Makefile.unix b/tools/Makefile.unix index e332a4c..e99c4cf 100644 --- a/tools/Makefile.unix +++ b/tools/Makefile.unix @@ -81,11 +81,6 @@ DIRLINK = $(TOPDIR)/tools/link.sh DIRUNLINK = $(TOPDIR)/tools/unlink.sh endif -# This define is passed as EXTRAFLAGS for kernel-mode builds. It is also passed -# during PASS1 (but not PASS2) context and depend targets. - -KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__} - # Process architecture and board-specific directories ARCH_DIR = arch/$(CONFIG_ARCH) diff --git a/tools/Makefile.win b/tools/Makefile.win index 5950f69..8c30247 100644 --- a/tools/Makefile.win +++ b/tools/Makefile.win @@ -63,11 +63,6 @@ else export Q := @ endif -# This define is passed as EXTRAFLAGS for kernel-mode builds. It is also passed -# during PASS1 (but not PASS2) context and depend targets. - -KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__} - # Process architecture and board-specific directories ARCH_DIR = arch\$(CONFIG_ARCH)
