• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2#  Copyright (c) 2019, 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
29set(COMMON_INCLUDES
30    ${PROJECT_SOURCE_DIR}/src/core
31)
32
33set(COMMON_SOURCES
34    api/backbone_router_api.cpp
35    api/backbone_router_ftd_api.cpp
36    api/border_agent_api.cpp
37    api/border_router_api.cpp
38    api/border_routing_api.cpp
39    api/channel_manager_api.cpp
40    api/channel_monitor_api.cpp
41    api/child_supervision_api.cpp
42    api/coap_api.cpp
43    api/coap_secure_api.cpp
44    api/commissioner_api.cpp
45    api/crypto_api.cpp
46    api/dataset_api.cpp
47    api/dataset_ftd_api.cpp
48    api/dataset_updater_api.cpp
49    api/diags_api.cpp
50    api/dns_api.cpp
51    api/dns_server_api.cpp
52    api/error_api.cpp
53    api/heap_api.cpp
54    api/history_tracker_api.cpp
55    api/icmp6_api.cpp
56    api/instance_api.cpp
57    api/ip6_api.cpp
58    api/jam_detection_api.cpp
59    api/joiner_api.cpp
60    api/link_api.cpp
61    api/link_metrics_api.cpp
62    api/link_raw_api.cpp
63    api/logging_api.cpp
64    api/message_api.cpp
65    api/multi_radio_api.cpp
66    api/netdata_api.cpp
67    api/netdata_publisher_api.cpp
68    api/netdiag_api.cpp
69    api/network_time_api.cpp
70    api/ping_sender_api.cpp
71    api/random_crypto_api.cpp
72    api/random_noncrypto_api.cpp
73    api/server_api.cpp
74    api/sntp_api.cpp
75    api/srp_client_api.cpp
76    api/srp_client_buffers_api.cpp
77    api/srp_server_api.cpp
78    api/tasklet_api.cpp
79    api/tcp_api.cpp
80    api/thread_api.cpp
81    api/thread_ftd_api.cpp
82    api/trel_api.cpp
83    api/udp_api.cpp
84    backbone_router/backbone_tmf.cpp
85    backbone_router/bbr_leader.cpp
86    backbone_router/bbr_local.cpp
87    backbone_router/bbr_manager.cpp
88    backbone_router/multicast_listeners_table.cpp
89    backbone_router/ndproxy_table.cpp
90    border_router/infra_if.cpp
91    border_router/routing_manager.cpp
92    coap/coap.cpp
93    coap/coap_message.cpp
94    coap/coap_secure.cpp
95    common/appender.cpp
96    common/binary_search.cpp
97    common/crc16.cpp
98    common/data.cpp
99    common/error.cpp
100    common/frame_builder.cpp
101    common/frame_data.cpp
102    common/heap.cpp
103    common/heap_data.cpp
104    common/heap_string.cpp
105    common/instance.cpp
106    common/log.cpp
107    common/message.cpp
108    common/notifier.cpp
109    common/random.cpp
110    common/settings.cpp
111    common/string.cpp
112    common/tasklet.cpp
113    common/time_ticker.cpp
114    common/timer.cpp
115    common/tlvs.cpp
116    common/trickle_timer.cpp
117    common/uptime.cpp
118    crypto/aes_ccm.cpp
119    crypto/aes_ecb.cpp
120    crypto/crypto_platform.cpp
121    crypto/ecdsa.cpp
122    crypto/ecdsa_tinycrypt.cpp
123    crypto/hkdf_sha256.cpp
124    crypto/hmac_sha256.cpp
125    crypto/mbedtls.cpp
126    crypto/pbkdf2_cmac.cpp
127    crypto/sha256.cpp
128    crypto/storage.cpp
129    diags/factory_diags.cpp
130    mac/channel_mask.cpp
131    mac/data_poll_handler.cpp
132    mac/data_poll_sender.cpp
133    mac/link_raw.cpp
134    mac/mac.cpp
135    mac/mac_filter.cpp
136    mac/mac_frame.cpp
137    mac/mac_links.cpp
138    mac/mac_types.cpp
139    mac/sub_mac.cpp
140    mac/sub_mac_callbacks.cpp
141    meshcop/announce_begin_client.cpp
142    meshcop/border_agent.cpp
143    meshcop/commissioner.cpp
144    meshcop/dataset.cpp
145    meshcop/dataset_local.cpp
146    meshcop/dataset_manager.cpp
147    meshcop/dataset_manager_ftd.cpp
148    meshcop/dataset_updater.cpp
149    meshcop/dtls.cpp
150    meshcop/energy_scan_client.cpp
151    meshcop/extended_panid.cpp
152    meshcop/joiner.cpp
153    meshcop/joiner_router.cpp
154    meshcop/meshcop.cpp
155    meshcop/meshcop_leader.cpp
156    meshcop/meshcop_tlvs.cpp
157    meshcop/network_name.cpp
158    meshcop/panid_query_client.cpp
159    meshcop/timestamp.cpp
160    net/checksum.cpp
161    net/dhcp6_client.cpp
162    net/dhcp6_server.cpp
163    net/dns_client.cpp
164    net/dns_dso.cpp
165    net/dns_types.cpp
166    net/dnssd_server.cpp
167    net/icmp6.cpp
168    net/ip4_types.cpp
169    net/ip6.cpp
170    net/ip6_address.cpp
171    net/ip6_filter.cpp
172    net/ip6_headers.cpp
173    net/ip6_mpl.cpp
174    net/nd6.cpp
175    net/nd_agent.cpp
176    net/netif.cpp
177    net/sntp_client.cpp
178    net/socket.cpp
179    net/srp_client.cpp
180    net/srp_server.cpp
181    net/tcp6.cpp
182    net/udp6.cpp
183    radio/radio.cpp
184    radio/radio_callbacks.cpp
185    radio/radio_platform.cpp
186    radio/trel_interface.cpp
187    radio/trel_link.cpp
188    radio/trel_packet.cpp
189    thread/address_resolver.cpp
190    thread/announce_begin_server.cpp
191    thread/announce_sender.cpp
192    thread/anycast_locator.cpp
193    thread/child_table.cpp
194    thread/csl_tx_scheduler.cpp
195    thread/discover_scanner.cpp
196    thread/dua_manager.cpp
197    thread/energy_scan_server.cpp
198    thread/indirect_sender.cpp
199    thread/key_manager.cpp
200    thread/link_metrics.cpp
201    thread/link_quality.cpp
202    thread/lowpan.cpp
203    thread/mesh_forwarder.cpp
204    thread/mesh_forwarder_ftd.cpp
205    thread/mesh_forwarder_mtd.cpp
206    thread/mle.cpp
207    thread/mle_router.cpp
208    thread/mle_types.cpp
209    thread/mlr_manager.cpp
210    thread/neighbor_table.cpp
211    thread/network_data.cpp
212    thread/network_data_leader.cpp
213    thread/network_data_leader_ftd.cpp
214    thread/network_data_local.cpp
215    thread/network_data_notifier.cpp
216    thread/network_data_publisher.cpp
217    thread/network_data_service.cpp
218    thread/network_data_tlvs.cpp
219    thread/network_data_types.cpp
220    thread/network_diagnostic.cpp
221    thread/panid_query_server.cpp
222    thread/radio_selector.cpp
223    thread/router_table.cpp
224    thread/src_match_controller.cpp
225    thread/thread_netif.cpp
226    thread/time_sync_service.cpp
227    thread/tmf.cpp
228    thread/topology.cpp
229    thread/uri_paths.cpp
230    utils/channel_manager.cpp
231    utils/channel_monitor.cpp
232    utils/child_supervision.cpp
233    utils/flash.cpp
234    utils/heap.cpp
235    utils/history_tracker.cpp
236    utils/jam_detector.cpp
237    utils/otns.cpp
238    utils/parse_cmdline.cpp
239    utils/ping_sender.cpp
240    utils/slaac_address.cpp
241    utils/srp_client_buffers.cpp
242)
243
244set(RADIO_COMMON_SOURCES
245    api/diags_api.cpp
246    api/error_api.cpp
247    api/instance_api.cpp
248    api/link_raw_api.cpp
249    api/logging_api.cpp
250    api/random_noncrypto_api.cpp
251    api/tasklet_api.cpp
252    common/binary_search.cpp
253    common/error.cpp
254    common/instance.cpp
255    common/log.cpp
256    common/random.cpp
257    common/string.cpp
258    common/tasklet.cpp
259    common/timer.cpp
260    common/uptime.cpp
261    crypto/aes_ccm.cpp
262    crypto/aes_ecb.cpp
263    crypto/crypto_platform.cpp
264    crypto/storage.cpp
265    diags/factory_diags.cpp
266    mac/link_raw.cpp
267    mac/mac_frame.cpp
268    mac/mac_types.cpp
269    mac/sub_mac.cpp
270    mac/sub_mac_callbacks.cpp
271    radio/radio.cpp
272    radio/radio_callbacks.cpp
273    radio/radio_platform.cpp
274    thread/link_quality.cpp
275    utils/parse_cmdline.cpp
276)
277
278set(OT_VENDOR_EXTENSION "" CACHE STRING "specify a C++ source file built as part of OpenThread core library")
279if(OT_VENDOR_EXTENSION)
280  target_compile_definitions(ot-config INTERFACE "OPENTHREAD_ENABLE_VENDOR_EXTENSION=1")
281  list(APPEND COMMON_SOURCES ${OT_VENDOR_EXTENSION})
282endif()
283
284if(OT_FTD)
285    include(ftd.cmake)
286endif()
287
288if(OT_MTD)
289    include(mtd.cmake)
290endif()
291
292if(OT_RCP)
293    include(radio.cmake)
294    if (OT_APP_CLI)
295        include(radio_cli.cmake)
296    endif()
297endif()
298
299set_property(SOURCE api/instance_api.cpp
300    APPEND PROPERTY COMPILE_DEFINITIONS "PACKAGE_VERSION=\"${OT_PACKAGE_VERSION}\""
301)
302