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
30 include $(top_srcdir)/examples/platforms/Makefile.platform.am
32 override CFLAGS := $(filter-out -Wconversion,$(CFLAGS))
33 override CXXFLAGS := $(filter-out -Wconversion,$(CXXFLAGS))
35 EFR32_BOARD_DIR = $(shell echo $(BOARD) | tr A-Z a-z)
37 SDK_SRC_DIR = $(top_srcdir)/third_party/silabs/gecko_sdk_suite/v2.7
39 $(top_builddir)/examples/platforms/efr32mg13/libopenthread-efr32mg13.a:
40 (cd $(top_builddir)/examples/platforms/efr32mg13/ && $(MAKE) $(AM_MAKEFLAGS) libopenthread-efr32mg13.a )
46 -DPLATFORM_HEADER=\"platform/base/hal/micro/cortexm3/compiler/gcc.h\" \
47 -DNVIC_CONFIG=\"platform/base/hal/micro/cortexm3/efm32/nvic-config.h\" \
50 -DPHY=EMBER_PHY_RAIL \
51 -DMICRO=EMBER_MICRO_CORTEXM3_EFR32 \
52 -DCORTEXM3_EFM32_MICRO \
53 -DPLAT=EMBER_PLATFORM_CORTEXM3 \
54 -I$(top_srcdir)/examples/platforms \
55 -I$(top_srcdir)/examples/platforms/efr32mg13/$(EFR32_BOARD_DIR) \
56 -I$(top_srcdir)/include \
57 -I$(top_srcdir)/src/core \
58 -I$(top_srcdir)/third_party/silabs/rail_config \
59 -I$(SDK_SRC_DIR)/hardware/kit/common/bsp \
60 -I$(SDK_SRC_DIR)/hardware/kit/common/drivers \
61 -I$(SDK_SRC_DIR)/hardware/kit/EFR32MG13_$(BOARD)/config \
62 -I$(SDK_SRC_DIR)/platform/base/hal/micro/cortexm3/efm32 \
63 -I$(SDK_SRC_DIR)/platform/base/hal/micro/cortexm3/efm32/config \
64 -I$(SDK_SRC_DIR)/platform/common/inc \
65 -I$(SDK_SRC_DIR)/platform/CMSIS/Include \
66 -I$(SDK_SRC_DIR)/platform/Device/SiliconLabs/EFR32MG13P/Include \
67 -I$(SDK_SRC_DIR)/platform/emdrv/common/inc \
68 -I$(SDK_SRC_DIR)/platform/emdrv/gpiointerrupt/inc \
69 -I$(SDK_SRC_DIR)/platform/emdrv/uartdrv/inc \
70 -I$(SDK_SRC_DIR)/platform/emdrv/uartdrv/config \
71 -I$(SDK_SRC_DIR)/platform/emdrv/ustimer/inc \
72 -I$(SDK_SRC_DIR)/platform/emdrv/dmadrv/inc \
73 -I$(SDK_SRC_DIR)/platform/emdrv/dmadrv/config \
74 -I$(SDK_SRC_DIR)/platform/emlib/inc \
75 -I$(SDK_SRC_DIR)/platform/halconfig/inc/hal-config \
76 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/chip/efr32 \
77 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/chip/efr32/efr32xg1x \
78 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/chip/efr32/rf/common/cortex \
79 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/common \
80 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/hal \
81 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/hal/efr32 \
82 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/protocol/ieee802154 \
83 -I$(SDK_SRC_DIR)/platform/radio/rail_lib/plugin/pa-conversions \
84 -I$(SDK_SRC_DIR)/platform/service/mpu/inc \
85 -I$(SDK_SRC_DIR)/platform/service/sleeptimer/config \
86 -I$(SDK_SRC_DIR)/platform/service/sleeptimer/inc \
87 -I$(SDK_SRC_DIR)/util/plugin/plugin-common/fem-control \
88 -I$(SDK_SRC_DIR)/util/third_party/mbedtls/sl_crypto/include \
89 -Wno-unused-parameter \
90 -Wno-missing-field-initializers \
99 LIBTOOLFLAGS_COMMON += \
106 if OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
108 $(top_builddir)/third_party/mbedtls/libmbedcrypto.a \
110 endif # OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
112 if OPENTHREAD_ENABLE_EXECUTABLE
118 sleepy_demo_mtd_CPPFLAGS = \
122 sleepy_demo_mtd_LDADD = \
123 $(top_builddir)/src/cli/libopenthread-cli-mtd.a \
124 $(top_builddir)/src/core/libopenthread-mtd.a \
126 $(top_builddir)/src/core/libopenthread-mtd.a \
130 sleepy_demo_mtd_LDFLAGS = \
134 sleepy_demo_mtd_LIBTOOLFLAGS = \
135 $(LIBTOOLFLAGS_COMMON) \
138 sleepy_demo_mtd_SOURCES = \
142 if OPENTHREAD_ENABLE_LINKER_MAP
143 sleepy_demo_mtd_LDFLAGS += -Wl,-Map=sleepy-demo-mtd.map
146 if OPENTHREAD_BUILD_COVERAGE
148 -DOPENTHREAD_ENABLE_COVERAGE \
151 CLEANFILES = $(wildcard *.gcda *.gcno)
152 endif # OPENTHREAD_BUILD_COVERAGE
154 include $(abs_top_nlbuild_autotools_dir)/automake/post.am