2a54b242c95e272c9e9e3b031dfd2302f1eabce1
[platform/upstream/connectedhomeip.git] / third_party / openthread / repo / examples / platforms / efr32mg13 / Makefile.am
1 #
2 #  Copyright (c) 2020, The OpenThread Authors.
3 #  All rights reserved.
4 #
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.
15 #
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.
27 #
28
29 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
30
31 lib_LIBRARIES = libopenthread-efr32mg13.a
32
33 # Do not enable -Wconversion for rail
34 override CFLAGS   := $(filter-out -Wconversion,$(CFLAGS))
35 override CXXFLAGS := $(filter-out -Wconversion,$(CXXFLAGS))
36
37 # Do not enable -pedantic-errors for rail
38 override CFLAGS   := $(filter-out -pedantic-errors,$(CFLAGS))
39 override CXXFLAGS := $(filter-out -pedantic-errors,$(CXXFLAGS))
40
41 # Do not enable -Wundef for rail
42 override CFLAGS   := $(filter-out -Wundef,$(CFLAGS))
43 override CXXFLAGS := $(filter-out -Wundef,$(CXXFLAGS))
44
45 EFR32_BOARD_DIR = $(shell echo $(BOARD) | tr A-Z a-z)
46
47 SDK_SRC_DIR = $(top_srcdir)/third_party/silabs/gecko_sdk_suite/v2.7
48
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\"      \
52     -Wno-sign-compare                                                           \
53     -DCORTEXM3                                                                  \
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                              \
63     -I$(SDK_SRC_DIR)                                                            \
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                                             \
98     $(NULL)
99
100 PLATFORM_SOURCES                                                              = \
101     alarm.c                                                                     \
102     diag.c                                                                      \
103     entropy.c                                                                   \
104     fem-control.c                                                               \
105     flash.c                                                                     \
106     logging.c                                                                   \
107     misc.c                                                                      \
108     openthread-core-efr32-config.h                                              \
109     openthread-core-efr32-config-check.h                                        \
110     platform-efr32.h                                                            \
111     platform-band.h                                                             \
112     radio.c                                                                     \
113     rail_config.h                                                               \
114     startup-gcc.c                                                               \
115     system.c                                                                    \
116     uart.c                                                                      \
117     $(NULL)
118
119 noinst_HEADERS                                                                = \
120     platform-efr32.h                                                            \
121     platform-band.h                                                             \
122     $(NULL)
123
124 libopenthread_efr32mg13_a_SOURCES                                             = \
125     $(PLATFORM_SOURCES)                                                         \
126     $(NULL)
127
128 Dash = -
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")
132
133 DIST_SUBDIRS                                                                  = \
134     sleepy-demo                                                                 \
135     $(NULL)
136
137 SUBDIRS                                                                       = \
138     sleepy-demo                                                                 \
139     $(NULL)
140
141 include $(abs_top_nlbuild_autotools_dir)/automake/post.am