Import bootloader from esp-idf v3
[apeos.git] / components / bootloader / subproject / Makefile
blobe01dc3c8a212fd17f01e4a7973946077ab9ef745
2 # This is a project Makefile. It is assumed the directory this Makefile resides in is a
3 # project subdirectory.
5 ifeq ("$(MAKELEVEL)","0")
6 $(error Bootloader makefile expects to be run as part of 'make bootloader' from a top-level project.)
7 endif
9 PROJECT_NAME := bootloader
11 COMPONENTS := esptool_py bootloader_support log spi_flash micro-ecc soc main
13 # Clear C and CXX from top level project
14 CFLAGS =
15 CXXFLAGS =
17 #We cannot include the esp32 component directly but we need its includes.
18 CFLAGS += -I $(IDF_PATH)/components/esp32/include
20 # The bootloader pseudo-component is also included in this build, for its Kconfig.projbuild to be included.
22 # IS_BOOTLOADER_BUILD tells the component Makefile.projbuild to be a no-op
23 IS_BOOTLOADER_BUILD := 1
24 export IS_BOOTLOADER_BUILD
26 # BOOTLOADER_BUILD macro is the same, for source file changes
27 CFLAGS += -D BOOTLOADER_BUILD=1
29 # include the top-level "project" include directory, for sdkconfig.h
30 CFLAGS += -I$(BUILD_DIR_BASE)/../include
32 include $(IDF_PATH)/make/project.mk