2016-08-17 11:08:22 -04:00
|
|
|
#
|
|
|
|
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
|
|
|
|
# project subdirectory.
|
|
|
|
#
|
2017-06-23 00:08:01 -04:00
|
|
|
ifeq ("$(MAKELEVEL)","0")
|
|
|
|
$(error Bootloader makefile expects to be run as part of 'make bootloader' from a top-level project.)
|
|
|
|
endif
|
2016-08-17 11:08:22 -04:00
|
|
|
|
|
|
|
PROJECT_NAME := bootloader
|
2016-11-08 22:26:50 -05:00
|
|
|
|
2021-04-08 00:16:17 -04:00
|
|
|
COMPONENTS := esp_hw_support esptool_py bootloader_support log spi_flash micro-ecc soc main efuse esp_rom hal xtensa
|
2017-06-23 00:08:01 -04:00
|
|
|
|
2017-11-15 03:09:54 -05:00
|
|
|
# Clear C and CXX from top level project
|
|
|
|
CFLAGS =
|
|
|
|
CXXFLAGS =
|
|
|
|
|
2021-05-21 02:45:50 -04:00
|
|
|
#We cannot include the some components like idf_target, esp_common directly but we need their includes.
|
2019-04-04 03:20:24 -04:00
|
|
|
CFLAGS += -I $(IDF_PATH)/components/$(IDF_TARGET)/include
|
2019-03-15 05:44:27 -04:00
|
|
|
CFLAGS += -I $(IDF_PATH)/components/esp_common/include
|
2021-05-21 02:45:50 -04:00
|
|
|
CFLAGS += -I $(IDF_PATH)/components/newlib/platform_include
|
2019-04-04 03:20:24 -04:00
|
|
|
CFLAGS += -I $(IDF_PATH)/components/xtensa/include -I $(IDF_PATH)/components/xtensa/$(IDF_TARGET)/include
|
2016-09-12 23:46:51 -04:00
|
|
|
|
|
|
|
# The bootloader pseudo-component is also included in this build, for its Kconfig.projbuild to be included.
|
|
|
|
#
|
|
|
|
# IS_BOOTLOADER_BUILD tells the component Makefile.projbuild to be a no-op
|
|
|
|
IS_BOOTLOADER_BUILD := 1
|
2016-10-21 02:44:34 -04:00
|
|
|
export IS_BOOTLOADER_BUILD
|
2016-08-17 11:08:22 -04:00
|
|
|
|
2017-06-23 00:08:01 -04:00
|
|
|
# BOOTLOADER_BUILD macro is the same, for source file changes
|
|
|
|
CFLAGS += -D BOOTLOADER_BUILD=1
|
|
|
|
|
2016-11-08 22:26:50 -05:00
|
|
|
# include the top-level "project" include directory, for sdkconfig.h
|
|
|
|
CFLAGS += -I$(BUILD_DIR_BASE)/../include
|
2016-08-17 11:08:22 -04:00
|
|
|
|
2016-08-19 02:32:35 -04:00
|
|
|
include $(IDF_PATH)/make/project.mk
|