forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f247c9
commit 3e199dd
Showing
1 changed file
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,43 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_library(mbed-802.15.4-rf STATIC EXCLUDE_FROM_ALL) | ||
# The 'mbed-802.15.4-rf' target is lazily created because there might not be any subdirectories needing it at all. | ||
macro(create_802_15_4_target) | ||
if(NOT TARGET create_802_15_4_target) | ||
add_library(mbed-802.15.4-rf STATIC EXCLUDE_FROM_ALL) | ||
|
||
# Nanostack drivers always require Mbed RTOS | ||
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags mbed-rtos-flags) | ||
|
||
target_link_libraries(mbed-nanostack | ||
INTERFACE | ||
mbed-802.15.4-rf | ||
) | ||
endif() | ||
endmacro() | ||
|
||
# Nanostack drivers always require Mbed RTOS | ||
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags mbed-rtos-flags) | ||
|
||
if("Freescale" IN_LIST MBED_TARGET_LABELS) | ||
create_802_15_4_target() | ||
add_subdirectory(TARGET_Freescale) | ||
add_subdirectory(mcr20a-rf-driver) | ||
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS) | ||
create_802_15_4_target() | ||
add_subdirectory(TARGET_Silicon_Labs) | ||
elseif("STM" IN_LIST MBED_TARGET_LABELS) | ||
add_subdirectory(stm-s2lp-rf-driver) | ||
endif() | ||
|
||
add_subdirectory(atmel-rf-driver) | ||
if("COMPONENT_MICROCHIP_AT86RF=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
create_802_15_4_target() | ||
add_subdirectory(COMPONENT_MICROCHIP_AT86RF) | ||
endif() | ||
|
||
if("COMPONENT_NXP_MCR20A=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
create_802_15_4_target() | ||
add_subdirectory(COMPONENT_NXP_MCR20A) | ||
endif() | ||
|
||
if("COMPONENT_STM_S2_LP=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
create_802_15_4_target() | ||
add_subdirectory(COMPONENT_STM_S2_LP) | ||
endif() | ||
|
||
|
||
target_link_libraries(mbed-nanostack | ||
INTERFACE | ||
mbed-802.15.4-rf | ||
) |