build: Move .config check to the top Makefile

remove the workaround to handle the inexistence of .config/Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-05-19 03:42:11 +08:00 committed by Abdelatif Guettouche
parent 3c622db780
commit 1a95cce1a3
279 changed files with 305 additions and 342 deletions

View file

@ -41,9 +41,18 @@
# make -f tools/Makefile.win
#
-include .config
ifeq ($(wildcard .config),)
.DEFAULT:
@echo "Nuttx has not been configured:"
@echo " tools/configure.sh <target>"
clean distclean:
@:
else
include .config
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
include tools/Makefile.win
else
include tools/Makefile.unix
endif
endif

View file

@ -34,8 +34,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip$(DELIM)Make.defs
include $(TOPDIR)/Make.defs
include chip$(DELIM)Make.defs
ifeq ($(CONFIG_ARCH_ARMV7A),y) # ARMv7-A
ARCH_SUBDIR = armv7-a

View file

@ -196,4 +196,4 @@ CHIP_CSRCS += lpc43_usb0dev.c
endif
endif
-include chip/spifi/src/Make.defs
include chip/spifi/src/Make.defs

View file

@ -33,8 +33,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
ifeq ($(CONFIG_ARCH_FAMILY_AVR32),y)
ARCH_SUBDIR = avr32

View file

@ -33,8 +33,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
ifeq ($(CONFIG_ARCH_HC12),y)
ARCH_SUBDIR = hc12

View file

@ -33,8 +33,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
ifeq ($(CONFIG_ARCH_MIPS),y)
ARCH_SUBDIR = mips32

View file

@ -33,8 +33,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
ifeq ($(CONFIG_ARCH_CHIP_LM32),y)
ARCH_SUBDIR = lm32

View file

@ -33,8 +33,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip$(DELIM)Make.defs
include $(TOPDIR)/Make.defs
include chip$(DELIM)Make.defs
ifeq ($(CONFIG_ARCH_MOR1KX),y) # OpenRISC mor1kx
ARCH_SUBDIR = mor1kx

View file

@ -33,8 +33,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
CPPFLAGS += $(EXTRAFLAGS)
CFLAGS += $(EXTRAFLAGS)

View file

@ -34,7 +34,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
CPPFLAGS += -I$(ARCH_SRCDIR)/chip -I$(TOPDIR)/sched $(EXTRAFLAGS)

View file

@ -33,8 +33,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
ifeq ($(CONFIG_ARCH_I486),y)
ARCH_SUBDIR = i486

View file

@ -18,8 +18,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
ifeq ($(CONFIG_ARCH_INTEL64),y)
ARCH_SUBDIR = intel64

View file

@ -33,8 +33,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
ifeq ($(CONFIG_ARCH_FAMILY_LX6),y)
ARCH_SUBDIR = lx6

View file

@ -18,8 +18,8 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
COMPILER = ${shell basename "$(CC)"}
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src

View file

@ -35,9 +35,9 @@
# Makefile fragments
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
-include board/Make.defs
include $(TOPDIR)/Make.defs
include chip/Make.defs
include board/Make.defs
# Compiler-Dependent Make: SDCC or ZiLOG ZDS-II

View file

@ -34,7 +34,7 @@
#
############################################################################
-include $(TOPDIR)\Make.defs
include $(TOPDIR)\Make.defs
############################################################################
# Tools

View file

@ -34,7 +34,7 @@
#
############################################################################
-include $(TOPDIR)\Make.defs
include $(TOPDIR)\Make.defs
# Tools

View file

@ -33,8 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
DELIM ?= $(strip /)
include $(TOPDIR)/Make.defs
DEPPATH = --dep-path .
ASRCS =

View file

@ -34,8 +34,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
DELIM ?= $(strip /)
include $(TOPDIR)/Make.defs
# Basic BINFMT source files

View file

@ -35,7 +35,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ifneq ($(RCSRCS)$(RCRAWS),)
ETCDIR := etctmp

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# Determine if there is a Kconfig file for any custom board configuration

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = a1x_boot.c a1x_bringup.c a1x_leds.c

View file

@ -35,7 +35,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = am335x_boot.c am335x_bringup.c am335x_leds.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = c5471_leds.c

View file

@ -32,7 +32,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
include board$(DELIM)Make.defs
include src$(DELIM)Make.defs

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = dm320_leds.c dm320_network.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = efm32_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = efm32_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = efm32_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = imx_boardinit.c imx_bringup.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = imxrt_flexspi_nor_flash.c imxrt_boot.c imxrt_flexspi_nor_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = k28_boot.c k28_bringup.c k28_spi.c k28_i2c.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = k64_boot.c k64_spi.c

View file

@ -34,7 +34,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = k66_boot.c k66_spi.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = k40_boot.c k40_lcd.c k40_spi.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = k20_boot.c k20_spi.c k20_i2c.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = k60_boot.c k60_spi.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
#CSRCS = k64_boot.c k64_spi.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = kl_boardinitialize.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = kl_boardinitialize.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = kl_boardinitialize.c

View file

@ -35,7 +35,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lc823450_boot.c lc823450_mux.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boot.c lpc17_40_leds.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boardinitialize.c lpc17_40_bringup.c lpc17_40_ssp.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boardinitialize.c lpc17_40_bringup.c lpc17_40_ssp.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_dac.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boardinitialize.c lpc17_40_bringup.c lpc17_40_ssp.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boot.c lpc17_40_leds.c lpc17_40_dac.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_dac.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_ssp.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boardinitialize.c lpc17_40_bringup.c lpc17_40_ssp.c

View file

@ -38,7 +38,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -33,7 +33,7 @@
#
##############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boot.c lpc17_40_bringup.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_dac.c

View file

@ -38,7 +38,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_buttons.c lpc17_40_lcd.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc2148_spi1.c lpc2148_leds.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS =

View file

@ -38,7 +38,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc2378_leds.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# Board-specific directory, board library, and application library

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc31_boot.c lpc31_clkinit.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc31_boot.c lpc31_clkinit.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc31_boot.c lpc31_clkinit.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -34,7 +34,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc43_boot.c lpc43_ssp.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc43_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc43_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc43_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc43_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc54_boot.c lpc54_bringup.c lpc54_userleds.c lpc54_lcd.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = max326_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = moxart_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = nrf52_boot.c nrf52_bringup.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = nrf52_boot.c nrf52_bringup.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = nrf52_boot.c nrf52_bringup.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = nrf52_boot.c nrf52_bringup.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = nuc_boardinitialize.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = s32k1xx_boot.c s32k1xx_bringup.c s32k1xx_clockconfig.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = s32k1xx_boot.c s32k1xx_bringup.c s32k1xx_clockconfig.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = s32k1xx_boot.c s32k1xx_bringup.c s32k1xx_clockconfig.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = s32k1xx_boot.c s32k1xx_bringup.c s32k1xx_clockconfig.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = s32k1xx_boot.c s32k1xx_bringup.c s32k1xx_clockconfig.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = s32k1xx_boot.c s32k1xx_bringup.c s32k1xx_clockconfig.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c sam_bringup.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c sam_bringup.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
# This is the directory for the board-specific header files

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c sam_leds.c sam_buttons.c sam_spi.c sam_usbdev.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c sam_leds.c sam_buttons.c sam_udp.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c

View file

@ -33,7 +33,7 @@
#
############################################################################
-include $(TOPDIR)/Make.defs
include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = sam_boot.c

Some files were not shown because too many files have changed in this diff Show more