1# Copyright (c) 2020 Linumiz
2# Copyright (c) 2022 Cypress Semiconductor Corporation.
3# SPDX-License-Identifier: Apache-2.0
4
5if(CONFIG_HAS_XMCLIB OR CONFIG_SOC_FAMILY_PSOC6 OR CONFIG_SOC_FAMILY_INFINEON_CAT1)
6  zephyr_library_named(modules_hal_infineon)
7  zephyr_library_compile_options(-Wno-array-bounds)
8endif()
9
10## Add PDL sources for XMC devices
11if (CONFIG_HAS_XMCLIB)
12  add_subdirectory(${ZEPHYR_HAL_INFINEON_MODULE_DIR}/XMCLib XMCLib)
13endif()
14
15if (CONFIG_SOC_FAMILY_INFINEON_CAT1A OR CONFIG_SOC_FAMILY_PSOC6)
16  ## Add core-lib sources for CAT1 devices
17  add_subdirectory(core-lib)
18
19  ## Add mtb-pdl-cat1 sources for CAT1 devices
20  add_subdirectory(mtb-pdl-cat1)
21endif()
22
23if (CONFIG_SOC_FAMILY_INFINEON_CAT1A)
24  ## Add mtb-hal-cat1 sources for CAT1 devices
25  add_subdirectory(mtb-hal-cat1)
26
27  ## Add catcm0p sleep images for CM0 Devices
28  if(CONFIG_SOC_PSOC6_CM0P_IMAGE_SLEEP)
29    add_subdirectory(cat1cm0p)
30  endif()
31
32  ## Add abstraction-rtos sources
33  add_subdirectory(abstraction-rtos)
34endif()
35
36## Add btstack-integration for CYW43xx BT devices
37if (CONFIG_BT_CYW43XXX)
38  add_subdirectory(btstack-integration)
39endif()
40
41if (CONFIG_BT_PSOC6_BLESS)
42add_subdirectory(bless)
43endif()
44