esp-idf-bootloader: build apeos C sources as part of the esp-idf-v3 based bootloader...
[apeos.git] / components / bootloader / subproject / main / component.mk
blob14759781a480514a02d870cec1e9ae3226f65f97
1 # Copyright 2016-2017 Espressif Systems (Shanghai) PTE LTD
2 # Copyright 2018 apeos contributors
4 # Main bootloader Makefile.
6 # This is basically the same as a component makefile, but in the case of the bootloader
7 # we pull in bootloader-specific linker arguments.
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
13 # http://www.apache.org/licenses/LICENSE-2.0
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
21 LINKER_SCRIPTS := \
22 esp32.bootloader.ld \
23 $(IDF_PATH)/components/esp32/ld/esp32.rom.ld \
24 $(IDF_PATH)/components/esp32/ld/esp32.rom.spiram_incompatible_fns.ld \
25 $(IDF_PATH)/components/esp32/ld/esp32.peripherals.ld \
26 esp32.bootloader.rom.ld
28 ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
29 LINKER_SCRIPTS += $(IDF_PATH)/components/esp32/ld/esp32.rom.spiflash.ld
30 endif
32 COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH) $(addprefix -T ,$(LINKER_SCRIPTS))
34 COMPONENT_ADD_LINKER_DEPS := $(LINKER_SCRIPTS)
36 COMPONENT_SRCDIRS += apeos