Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # \file libs.mk |
| 3 | # \version 1.0 |
| 4 | # |
| 5 | # \brief |
| 6 | # Makefile to describe libraries needed for Cypress MCUBoot based applications. |
| 7 | # |
| 8 | ################################################################################ |
| 9 | # \copyright |
| 10 | # Copyright 2018-2019 Cypress Semiconductor Corporation |
| 11 | # SPDX-License-Identifier: Apache-2.0 |
| 12 | # |
| 13 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 14 | # you may not use this file except in compliance with the License. |
| 15 | # You may obtain a copy of the License at |
| 16 | # |
| 17 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 18 | # |
| 19 | # Unless required by applicable law or agreed to in writing, software |
| 20 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 21 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 22 | # See the License for the specific language governing permissions and |
| 23 | # limitations under the License. |
| 24 | ################################################################################ |
| 25 | |
| 26 | ################################################################################ |
| 27 | # PDL library |
| 28 | ################################################################################ |
| 29 | PDL_VERSION = 121 |
| 30 | # |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 31 | CUR_LIBS_PATH = $(PRJ_DIR)/libs |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 32 | |
| 33 | # Collect source files for Retarget-io |
| 34 | SOURCES_RETARGET_IO := $(wildcard $(CUR_LIBS_PATH)/retarget-io/*.c) |
Roman Okhrimenko | 0c7aebc | 2020-09-02 13:37:51 +0300 | [diff] [blame] | 35 | SOURCES_WATCHDOG := $(wildcard $(CUR_LIBS_PATH)/watchdog/*.c) |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 36 | |
| 37 | # Collect source files for HAL |
| 38 | SOURCES_HAL := $(wildcard $(CUR_LIBS_PATH)/psoc6hal/COMPONENT_PSOC6HAL/source/*.c) |
| 39 | SOURCES_HAL += $(wildcard $(CUR_LIBS_PATH)/psoc6hal/COMPONENT_PSOC6HAL/source/triggers/*.c) |
| 40 | SOURCES_HAL += $(wildcard $(CUR_LIBS_PATH)/psoc6hal/COMPONENT_PSOC6HAL/source/pin_packages/*.c) |
| 41 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 42 | # Retarget-io related include directories |
| 43 | INCLUDE_DIRS_RETARGET_IO := $(CUR_LIBS_PATH)/retarget-io |
Roman Okhrimenko | 0c7aebc | 2020-09-02 13:37:51 +0300 | [diff] [blame] | 44 | INCLUDE_DIRS_WATCHDOG := $(CUR_LIBS_PATH)/watchdog |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 45 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 46 | # Collect dirrectories containing headers for PSOC6 HAL |
| 47 | INCLUDE_DIRS_HAL := $(CUR_LIBS_PATH)/psoc6hal/include |
| 48 | INCLUDE_DIRS_HAL += $(CUR_LIBS_PATH)/psoc6hal/COMPONENT_PSOC6HAL/include |
| 49 | INCLUDE_DIRS_HAL += $(CUR_LIBS_PATH)/psoc6hal/COMPONENT_PSOC6HAL/include/pin_packages |
| 50 | INCLUDE_DIRS_HAL += $(CUR_LIBS_PATH)/psoc6hal/COMPONENT_PSOC6HAL/include/triggers |
| 51 | |
| 52 | # Collected source files for libraries |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 53 | SOURCES_LIBS += $(SOURCES_RETARGET_IO) |
Roman Okhrimenko | 0c7aebc | 2020-09-02 13:37:51 +0300 | [diff] [blame] | 54 | SOURCES_LIBS += $(SOURCES_WATCHDOG) |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 55 | SOURCES_LIBS += $(SOURCES_HAL) |
| 56 | |
| 57 | # Collected include directories for libraries |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 58 | INCLUDE_DIRS_LIBS += $(addprefix -I,$(INCLUDE_DIRS_RETARGET_IO)) |
Roman Okhrimenko | 0c7aebc | 2020-09-02 13:37:51 +0300 | [diff] [blame] | 59 | INCLUDE_DIRS_LIBS += $(addprefix -I,$(INCLUDE_DIRS_WATCHDOG)) |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 60 | INCLUDE_DIRS_LIBS += $(addprefix -I,$(INCLUDE_DIRS_HAL)) |