Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # This is a project Makefile. It is assumed the directory this Makefile resides in is a
  3. # project subdirectory.
  4. #
  5. ifeq ("$(MAKELEVEL)","0")
  6. $(error Bootloader makefile expects to be run as part of 'make bootloader' from a top-level project.)
  7. endif
  8. PROJECT_NAME := bootloader
  9. COMPONENTS := esp_hw_support esptool_py bootloader_support log spi_flash micro-ecc soc main efuse esp_rom hal xtensa
  10. # Clear C and CXX from top level project
  11. CFLAGS =
  12. CXXFLAGS =
  13. #We cannot include the idf_target, esp_common component directly but we need their includes.
  14. CFLAGS += -I $(IDF_PATH)/components/$(IDF_TARGET)/include
  15. CFLAGS += -I $(IDF_PATH)/components/esp_common/include
  16. CFLAGS += -I $(IDF_PATH)/components/xtensa/include -I $(IDF_PATH)/components/xtensa/$(IDF_TARGET)/include
  17. # The bootloader pseudo-component is also included in this build, for its Kconfig.projbuild to be included.
  18. #
  19. # IS_BOOTLOADER_BUILD tells the component Makefile.projbuild to be a no-op
  20. IS_BOOTLOADER_BUILD := 1
  21. export IS_BOOTLOADER_BUILD
  22. # BOOTLOADER_BUILD macro is the same, for source file changes
  23. CFLAGS += -D BOOTLOADER_BUILD=1
  24. # include the top-level "project" include directory, for sdkconfig.h
  25. CFLAGS += -I$(BUILD_DIR_BASE)/../include
  26. include $(IDF_PATH)/make/project.mk