Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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 := esptool_py bootloader_support log spi_flash micro-ecc soc main efuse
  10. # Clear C and CXX from top level project
  11. CFLAGS =
  12. CXXFLAGS =
  13. #We cannot include the idf_target, esp_rom, 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_rom/include
  16. CFLAGS += -I $(IDF_PATH)/components/esp_common/include
  17. CFLAGS += -I $(IDF_PATH)/components/xtensa/include -I $(IDF_PATH)/components/xtensa/$(IDF_TARGET)/include
  18. # The bootloader pseudo-component is also included in this build, for its Kconfig.projbuild to be included.
  19. #
  20. # IS_BOOTLOADER_BUILD tells the component Makefile.projbuild to be a no-op
  21. IS_BOOTLOADER_BUILD := 1
  22. export IS_BOOTLOADER_BUILD
  23. # BOOTLOADER_BUILD macro is the same, for source file changes
  24. CFLAGS += -D BOOTLOADER_BUILD=1
  25. # include the top-level "project" include directory, for sdkconfig.h
  26. CFLAGS += -I$(BUILD_DIR_BASE)/../include
  27. include $(IDF_PATH)/make/project.mk