Build system: Fix CONFIG_BUILD_KERNEL logic directories that have ubin and kbin subdirectories. Conditional logic was fine for CONFIG_BUILD_FLAT and CONFIG_BUILD_PROTECTED but generated useless dependencies if CONFIG_BUILD_KERNEL.
This commit is contained in:
parent
fa4722a5ac
commit
ef89207c8d
3 changed files with 14 additions and 22 deletions
|
@ -37,20 +37,12 @@
|
|||
|
||||
# CFLAGS
|
||||
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
ifneq ($(CONFIG_BUILD_FLAT),y)
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
|
||||
else
|
||||
KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
|
||||
endif
|
||||
else
|
||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
|
||||
else
|
||||
KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Sources and paths
|
||||
|
@ -154,11 +146,11 @@ endif
|
|||
# Dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
ifeq ($(CONFIG_BUILD_FLAT),y)
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
||||
else
|
||||
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
|
||||
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >Make_kbin.dep
|
||||
else
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
||||
endif
|
||||
ifeq ($(CONFIG_LIB_ZONEINFO_ROMFS),y)
|
||||
$(Q) $(MAKE) -C zoneinfo depend TOPDIR=$(TOPDIR) BIN=$(BIN)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
############################################################################
|
||||
# libnx/Makefile
|
||||
#
|
||||
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
# CFLAGS
|
||||
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
ifneq ($(CONFIG_BUILD_FLAT),y)
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
|
||||
else
|
||||
|
@ -261,11 +261,11 @@ endif
|
|||
# Dependencies
|
||||
|
||||
.depend: Makefile gensources $(SRCS)
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
ifeq ($(CONFIG_BUILD_FLAT),y)
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
||||
else
|
||||
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
|
||||
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >Make_kbin.dep
|
||||
else
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
||||
endif
|
||||
$(Q) touch $@
|
||||
|
||||
|
|
10
mm/Makefile
10
mm/Makefile
|
@ -1,7 +1,7 @@
|
|||
############################################################################
|
||||
# mm/Makefile
|
||||
#
|
||||
# Copyright (C) 2007, 2012, 2013-2014 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2012, 2013-2014, 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -40,7 +40,7 @@ DELIM := $(strip /)
|
|||
|
||||
# CFLAGS
|
||||
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
ifneq ($(CONFIG_BUILD_FLAT),y)
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
|
||||
else
|
||||
|
@ -108,11 +108,11 @@ endif
|
|||
# Dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
ifeq ($(CONFIG_BUILD_FLAT),y)
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
||||
else
|
||||
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
|
||||
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >Make_kbin.dep
|
||||
else
|
||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
||||
endif
|
||||
$(Q) touch $@
|
||||
|
||||
|
|
Loading…
Reference in a new issue