Augment /components/bootloader/subproject/Makefile with notice (apache-2.0)
[apeos.git] / components / bootloader / subproject / Makefile
blob23f3d8b5ad10b87ad6713b4c8bfc3f6ab46b2e9a
1 # Copyright 2016-2017 Espressif Systems (Shanghai) PTE LTD
3 # This is a project Makefile. It is assumed the directory this Makefile resides in is a
4 # project subdirectory.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 ifeq ("$(MAKELEVEL)","0")
18 $(error Bootloader makefile expects to be run as part of 'make bootloader' from a top-level project.)
19 endif
21 PROJECT_NAME := bootloader
23 COMPONENTS := esptool_py bootloader_support log spi_flash micro-ecc soc main
25 # Clear C and CXX from top level project
26 CFLAGS =
27 CXXFLAGS =
29 #We cannot include the esp32 component directly but we need its includes.
30 CFLAGS += -I $(IDF_PATH)/components/esp32/include
32 # The bootloader pseudo-component is also included in this build, for its Kconfig.projbuild to be included.
34 # IS_BOOTLOADER_BUILD tells the component Makefile.projbuild to be a no-op
35 IS_BOOTLOADER_BUILD := 1
36 export IS_BOOTLOADER_BUILD
38 # BOOTLOADER_BUILD macro is the same, for source file changes
39 CFLAGS += -D BOOTLOADER_BUILD=1
41 # include the top-level "project" include directory, for sdkconfig.h
42 CFLAGS += -I$(BUILD_DIR_BASE)/../include
44 include $(IDF_PATH)/make/project.mk