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