helping USE_SMART_BUILD

This commit is contained in:
rusefi 2020-04-25 12:33:16 -04:00
parent 31f9e08184
commit b21ef96f2c
1 changed files with 17 additions and 12 deletions

View File

@ -80,6 +80,18 @@ ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
endif
# If enabled, this option makes the build process faster by not compiling
# modules not used in the current configuration.
# without USE_SMART_BUILD all ChibiOS (including all drivers) are builded. And all drivers includes get included.
ifeq ($(USE_SMART_BUILD),)
USE_SMART_BUILD = yes
endif
# for this to work it has to be defined before hal.mk
ifeq ($(CONFDIR),)
CONFDIR = config/stm32f4ems
endif
ifeq ($(USE_BOOTLOADER),)
USE_BOOTLOADER = no
endif
@ -123,6 +135,11 @@ MAKEFLAGS += ${NUMJOBS}
# Architecture or project specific options
##############################################################################
BOARDS_DIR = $(PROJECT_DIR)/config/boards
# we want this above hal.mk since we often define CONFDIR inside board.mk
include $(PROJECT_DIR)/config/boards/$(PROJECT_BOARD)/board.mk
##############################################################################
# Project, sources and paths
#
@ -147,9 +164,6 @@ ifeq ($(USE_FATFS),yes)
include $(PROJECT_DIR)/ext/fatfs.mk
endif
BOARDS_DIR = $(PROJECT_DIR)/config/boards
include $(PROJECT_DIR)/config/boards/$(PROJECT_BOARD)/board.mk
include $(PROJECT_DIR)/config/engines/engines.mk
include $(PROJECT_DIR)/console/console.mk
include $(PROJECT_DIR)/controllers/controllers.mk
@ -166,15 +180,6 @@ ifeq ($(BOOTLOADERINC),)
BOOTLOADERINC= $(PROJECT_DIR)/bootloader/
endif
# If enabled, this option makes the build process faster by not compiling
# modules not used in the current configuration.
# without USE_SMART_BUILD all ChibiOS (including all drivers) are builded. And all drivers includes get included.
ifeq ($(USE_SMART_BUILD),)
USE_SMART_BUILD = yes
endif
ifeq ($(CONFDIR),)
CONFDIR = config/stm32f4ems
endif
ifeq ($(USE_BOOTLOADER),yes)
include $(PROJECT_DIR)/bootloader/bootloader.mk