2 # Copyright (c) 2020, The OpenThread Authors.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are met:
7 # 1. Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 # 2. Redistributions in binary form must reproduce the above copyright
10 # notice, this list of conditions and the following disclaimer in the
11 # documentation and/or other materials provided with the distribution.
12 # 3. Neither the name of the copyright holder nor the
13 # names of its contributors may be used to endorse or promote products
14 # derived from this software without specific prior written permission.
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 # POSSIBILITY OF SUCH DAMAGE.
29 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
31 lib_LIBRARIES = libopenthread-efr32mg13.a
33 # Do not enable -Wconversion for rail
34 override CFLAGS := $(filter-out -Wconversion,$(CFLAGS))
35 override CXXFLAGS := $(filter-out -Wconversion,$(CXXFLAGS))
37 # Do not enable -pedantic-errors for rail
38 override CFLAGS := $(filter-out -pedantic-errors,$(CFLAGS))
39 override CXXFLAGS := $(filter-out -pedantic-errors,$(CXXFLAGS))
41 # Do not enable -Wundef for rail
42 override CFLAGS := $(filter-out -Wundef,$(CFLAGS))
43 override CXXFLAGS := $(filter-out -Wundef,$(CXXFLAGS))
45 EFR32_BOARD_DIR = $(shell echo $(BOARD) | tr A-Z a-z)
47 SDK_SRC_DIR = $(top_srcdir)/third_party/silabs/gecko_sdk_suite/v2.7
49 libopenthread_efr32mg13_a_CPPFLAGS = \
50 -DPLATFORM_HEADER=\"platform/base/hal/micro/cortexm3/compiler/gcc.h\" \
51 -DNVIC_CONFIG=\"platform/base/hal/micro/cortexm3/efm32/nvic-config.h\" \
54 -DPHY=EMBER_PHY_RAIL \
55 -DMICRO=EMBER_MICRO_CORTEXM3_EFR32 \
56 -DCORTEXM3_EFM32_MICRO \
57 -DPLAT=EMBER_PLATFORM_CORTEXM3 \
58 -I$(top_srcdir)/examples/platforms \
59 -I$(top_srcdir)/examples/platforms/efr32mg13/$(EFR32_BOARD_DIR) \
60 -I$(top_srcdir)/include \
61 -I$(top_srcdir)/src/core \
62 -I$(top_srcdir)/third_party/silabs/rail_config \
64 -I$(SDK_SRC_DIR)/hardware/kit/common/bsp \
65 -I$(SDK_SRC_DIR)/hardware/kit/common/drivers \
66 -I$(SDK_SRC_DIR)/hardware/kit/EFR32MG13_$(BOARD)/config \
67 -I$(SDK_SRC_DIR)/platform/base/hal/micro/cortexm3/efm32 \
68 -I$(SDK_SRC_DIR)/platform/base/hal/micro/cortexm3/efm32/config \
69 -I$(SDK_SRC_DIR)/platform/common/inc \
70 -I$(SDK_SRC_DIR)/platform/CMSIS/Include \
71 -I$(SDK_SRC_DIR)/platform/Device/SiliconLabs/EFR32MG13P/Include \
72 -I$(SDK_SRC_DIR)/platform/emdrv/common/inc \
73 -I$(SDK_SRC_DIR)/platform/emdrv/gpiointerrupt/inc \
74 -I$(SDK_SRC_DIR)/platform/emdrv/uartdrv/inc \
75 -I$(SDK_SRC_DIR)/platform/emdrv/uartdrv/config \
76 -I$(SDK_SRC_DIR)/platform/emdrv/ustimer/inc \
77 -I$(SDK_SRC_DIR)/platform/emdrv/dmadrv/inc \
78 -I$(SDK_SRC_DIR)/platform/emdrv/dmadrv/config \
79 -I$(SDK_SRC_DIR)/platform/emdrv/nvm3/inc \
80 -I$(SDK_SRC_DIR)/platform/emdrv/nvm3/config \
81 -I$(SDK_SRC_DIR)/platform/emlib/inc \
82 -I$(SDK_SRC_DIR)/platform/halconfig/inc/hal-config \
83 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/chip/efr32 \
84 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/chip/efr32/efr32xg1x \
85 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/chip/efr32/rf/common/cortex \
86 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/common \
87 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/hal \
88 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/hal/efr32 \
89 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/protocol/ieee802154 \
90 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/plugin/pa-conversions \
91 -I$(SDK_SRC_DIR)/platform/service/mpu/inc \
92 -I$(SDK_SRC_DIR)/platform/service/sleeptimer/config \
93 -I$(SDK_SRC_DIR)/platform/service/sleeptimer/inc \
94 -I$(SDK_SRC_DIR)/util/plugin/plugin-common/fem-control \
95 -I$(SDK_SRC_DIR)/util/third_party/mbedtls/sl_crypto/include \
96 -Wno-unused-parameter \
97 -Wno-missing-field-initializers \
108 openthread-core-efr32-config.h \
109 openthread-core-efr32-config-check.h \
124 libopenthread_efr32mg13_a_SOURCES = \
125 $(PLATFORM_SOURCES) \
129 libopenthread_efr32mg13_a_LIBADD = \
130 $(shell find $(top_builddir)/examples/platforms/utils $(Dash)type f $(Dash)name "*.o") \
131 $(shell find $(top_builddir)/third_party/jlink/SEGGER_RTT_V640/RTT $(Dash)type f $(Dash)name "*.o")
141 include $(abs_top_nlbuild_autotools_dir)/automake/post.am