forked from SiliconLabs/wisun-br-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
533 lines (516 loc) · 24.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
cmake_minimum_required(VERSION 3.16.3)
project(wsbrd)
set(COMPILE_SIMULATION_TOOLS OFF CACHE BOOL "Keep unset if you don't consider to develop new features")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(GNUInstallDirs)
include(CheckCCompilerFlag)
check_c_compiler_flag(-Wall CC_HAVE_WALL)
check_c_compiler_flag(-Wno-stringop-overread CC_HAVE_WNO_STRINGOP_OVERREAD)
check_c_compiler_flag(-Wno-stringop-overflow CC_HAVE_WNO_STRINGOP_OVERFLOW)
check_c_compiler_flag(-funwind-tables CC_HAVE_UNWIND_TABLES)
check_c_compiler_flag(-rdynamic CC_HAVE_RDYNAMIC)
include(CheckIncludeFile)
check_include_file(backtrace.h BACKTRACE_FOUND)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
# Syntax "MbedTLS 2.18...<4" does not work :(
find_package(MbedTLS REQUIRED)
mark_as_advanced(MbedTLS_DIR)
find_package(PkgConfig REQUIRED)
# Note that old libpcap releases didn't provide pkg-config file and are not
# detected by the line below. The user have to compile without support for
# libpcap or manually defines the flags.
pkg_check_modules(LIBPCAP IMPORTED_TARGET libpcap)
pkg_check_modules(LIBSYSTEMD IMPORTED_TARGET libsystemd)
pkg_check_modules(LIBNL_ROUTE REQUIRED IMPORTED_TARGET libnl-route-3.0)
include(CheckSymbolExists)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
check_symbol_exists(dladdr dlfcn.h LIBDL_FOUND)
# Greatly improve warning messages. There is no reason to not enable that.
if(CC_HAVE_WALL)
add_compile_options(-Wall)
endif()
# ... but it generate two irrelevant warnings
if(CC_HAVE_WNO_STRINGOP_OVERREAD)
add_compile_options(-Wno-stringop-overread)
endif()
if(CC_HAVE_WNO_STRINGOP_OVERFLOW)
add_compile_options(-Wno-stringop-overflow)
endif()
# In come case, backtraces are not available without that flags. Increase size
# of the binary file, but can be stripped.
if(CC_HAVE_UNWIND_TABLES)
add_compile_options(-funwind-tables)
endif()
# -rdynamic improves backtraces when debugs symbols are not available. Slightly
# increase size of the binary file (can be stripped?).
if(CC_HAVE_RDYNAMIC AND LIBDL_FOUND)
add_link_options(-rdynamic)
endif()
add_custom_target(check_git
ALL
BYPRODUCTS version.c
COMMENT "Checking the git repository for changes..."
COMMAND ${CMAKE_SOURCE_DIR}/version.sh ${CMAKE_SOURCE_DIR} version.c)
add_executable(wsbrd
version.c
app_wsbrd/wsbr.c
app_wsbrd/wsbr_mac.c
app_wsbrd/wsbr_fhss_mac.c
app_wsbrd/wsbr_fhss_net.c
app_wsbrd/tun.c
app_wsbrd/named_values.c
app_wsbrd/commandline.c
app_wsbrd/os_whiteboard.c
app_wsbrd/mbedtls_config_check.c
common/bus_uart.c
common/hal_interrupt.c
common/os_timer.c
common/os_scheduler.c
common/log.c
common/rand.c
common/slist.c
common/spinel_buffer.c
nanostack/source/6lowpan/adaptation_interface.c
nanostack/source/6lowpan/bootstraps/network_lib.c
nanostack/source/6lowpan/bootstraps/protocol_6lowpan.c
nanostack/source/6lowpan/bootstraps/protocol_6lowpan_bootstrap.c
nanostack/source/6lowpan/bootstraps/protocol_6lowpan_interface.c
nanostack/source/6lowpan/fragmentation/cipv6_fragmenter.c
nanostack/source/6lowpan/iphc_decode/6lowpan_iphc.c
nanostack/source/6lowpan/iphc_decode/iphc_compress.c
nanostack/source/6lowpan/iphc_decode/iphc_decompress.c
nanostack/source/6lowpan/iphc_decode/lowpan_context.c
nanostack/source/6lowpan/mac/mac_helper.c
nanostack/source/6lowpan/mac/mac_ie_lib.c
nanostack/source/6lowpan/mac/mac_response_handler.c
# Excluded nanostack/source/6lowpan/Mesh
nanostack/source/6lowpan/nd/nd_router_object.c
# Excluded nanostack/source/6lowpan/Thread
nanostack/source/6lowpan/ws/ws_bbr_api.c
nanostack/source/6lowpan/ws/ws_bootstrap.c
nanostack/source/6lowpan/ws/ws_bootstrap_6lbr.c
nanostack/source/6lowpan/ws/ws_bootstrap_ffn.c
nanostack/source/6lowpan/ws/ws_bootstrap_lfn.c
nanostack/source/6lowpan/ws/ws_cfg_settings.c
nanostack/source/6lowpan/ws/ws_common.c
nanostack/source/6lowpan/ws/ws_eapol_auth_relay.c
nanostack/source/6lowpan/ws/ws_eapol_pdu.c
nanostack/source/6lowpan/ws/ws_eapol_relay.c
nanostack/source/6lowpan/ws/ws_eapol_relay_lib.c
nanostack/source/6lowpan/ws/ws_ie_lib.c
nanostack/source/6lowpan/ws/ws_llc_data_service.c
nanostack/source/6lowpan/ws/ws_management_api.c
nanostack/source/6lowpan/ws/ws_mpx_header.c
nanostack/source/6lowpan/ws/ws_neighbor_class.c
nanostack/source/6lowpan/ws/ws_pae_auth.c
nanostack/source/6lowpan/ws/ws_pae_controller.c
nanostack/source/6lowpan/ws/ws_pae_key_storage.c
nanostack/source/6lowpan/ws/ws_pae_lib.c
nanostack/source/6lowpan/ws/ws_pae_nvm_store.c
nanostack/source/6lowpan/ws/ws_pae_nvm_data.c
nanostack/source/6lowpan/ws/ws_pae_supp.c
nanostack/source/6lowpan/ws/ws_pae_time.c
nanostack/source/6lowpan/ws/ws_pae_timers.c
nanostack/source/6lowpan/ws/ws_phy.c
nanostack/source/6lowpan/ws/ws_regulation_arib.c
nanostack/source/6lowpan/ws/ws_regulation_none.c
nanostack/source/6lowpan/ws/ws_regulation.c
nanostack/source/6lowpan/ws/ws_stats.c
nanostack/source/6lowpan/ws/ws_test_api.c
nanostack/source/common_protocols/icmpv6.c
nanostack/source/common_protocols/icmpv6_prefix.c
nanostack/source/common_protocols/icmpv6_radv.c
nanostack/source/common_protocols/ipv6.c
nanostack/source/common_protocols/ipv6_flow.c
nanostack/source/common_protocols/ipv6_fragmentation.c
nanostack/source/common_protocols/ipv6_resolution.c
nanostack/source/common_protocols/mld.c
nanostack/source/common_protocols/udp.c
nanostack/source/core/buffer_dyn.c
nanostack/source/core/ns_address_internal.c
nanostack/source/core/ns_socket.c
nanostack/source/core/sockbuf.c
nanostack/source/dhcpv6_client/dhcpv6_client_service.c
nanostack/source/dhcpv6_server/dhcpv6_server_service.c
nanostack/source/ipv6_stack/ipv6_routing_table.c
nanostack/source/ipv6_stack/protocol_ipv6.c
nanostack/source/libdhcpv6/dhcp_service_api.c
nanostack/source/libdhcpv6/libdhcpv6.c
nanostack/source/libdhcpv6/libdhcpv6_server.c
nanostack/source/libdhcpv6/libdhcpv6_vendordata.c
nanostack/source/net_lib/net_short_address_extension.c
nanostack/source/net_lib/net_dns.c
nanostack/source/net_lib/multicast_api.c
nanostack/source/net_lib/net_6lowpan_parameter_api.c
nanostack/source/net_lib/net_rpl.c
nanostack/source/net_lib/ns_net.c
nanostack/source/net_lib/socket_api.c
nanostack/source/net_lib/net_ipv6.c
nanostack/source/mac/rf_driver_storage.c
nanostack/source/mac/ethernet/ethernet_mac_api.c
# Excluded nanostack/source/mac/ieee802154
nanostack/source/mpl/mpl.c
nanostack/source/nwk_interface/protocol_core.c
nanostack/source/nwk_interface/protocol_stats.c
nanostack/source/nwk_interface/protocol_timer.c
nanostack/source/rpl/rpl_control.c
nanostack/source/rpl/rpl_mrhof.c
nanostack/source/rpl/rpl_downward.c
nanostack/source/rpl/rpl_data.c
nanostack/source/rpl/rpl_objective.c
nanostack/source/rpl/rpl_of0.c
nanostack/source/rpl/rpl_policy.c
nanostack/source/rpl/rpl_upward.c
nanostack/source/security/eapol/eapol_helper.c
nanostack/source/security/eapol/kde_helper.c
nanostack/source/security/kmp/kmp_addr.c
nanostack/source/security/kmp/kmp_api.c
nanostack/source/security/kmp/kmp_eapol_pdu_if.c
nanostack/source/security/kmp/kmp_socket_if.c
nanostack/source/security/pana/pana_eap_header.c
nanostack/source/security/protocols/eap_tls_sec_prot/auth_eap_tls_sec_prot.c
nanostack/source/security/protocols/eap_tls_sec_prot/eap_tls_sec_prot_lib.c
nanostack/source/security/protocols/eap_tls_sec_prot/radius_eap_tls_sec_prot.c
nanostack/source/security/protocols/eap_tls_sec_prot/supp_eap_tls_sec_prot.c
nanostack/source/security/protocols/fwh_sec_prot/auth_fwh_sec_prot.c
nanostack/source/security/protocols/fwh_sec_prot/supp_fwh_sec_prot.c
nanostack/source/security/protocols/gkh_sec_prot/auth_gkh_sec_prot.c
nanostack/source/security/protocols/gkh_sec_prot/supp_gkh_sec_prot.c
nanostack/source/security/protocols/key_sec_prot/key_sec_prot.c
nanostack/source/security/protocols/msg_sec_prot/msg_sec_prot.c
nanostack/source/security/protocols/radius_sec_prot/avp_helper.c
nanostack/source/security/protocols/radius_sec_prot/radius_client_sec_prot.c
nanostack/source/security/protocols/sec_prot_certs.c
nanostack/source/security/protocols/sec_prot_keys.c
nanostack/source/security/protocols/sec_prot_lib.c
nanostack/source/security/protocols/tls_sec_prot/tls_sec_prot.c
nanostack/source/security/protocols/tls_sec_prot/tls_sec_prot_lib.c
nanostack/source/service_libs/blacklist/blacklist.c
nanostack/source/service_libs/etx/etx.c
nanostack/source/service_libs/fnv_hash/fnv_hash.c
nanostack/source/service_libs/hmac/hmac_md.c
nanostack/source/service_libs/ieee_802_11/ieee_802_11.c
nanostack/source/service_libs/mac_neighbor_table/mac_neighbor_table.c
nanostack/source/service_libs/nd_proxy/nd_proxy.c
nanostack/source/service_libs/nist_aes_kw/nist_aes_kw.c
nanostack/source/service_libs/random_early_detection/random_early_detection.c
nanostack/source/service_libs/sha256/ns_sha256.c
nanostack/source/service_libs/sha256/shalib.c
nanostack/source/service_libs/trickle/trickle.c
nanostack/source/service_libs/utils/isqrt.c
nanostack/source/service_libs/utils/ns_file_system.c
nanostack/source/service_libs/utils/ns_time.c
# Excluded nanostack/source/service_libs/whiteboard/whiteboard.c
nanostack-event-loop/source/event.c
nanostack-event-loop/source/system_timer.c
mbed-client-libservice/source/libBits/common_functions.c
# Excluded mbed-client-libservice/source/libip4string
mbed-client-libservice/source/libip6string/ip6tos.c
mbed-client-libservice/source/libip6string/stoip6.c
mbed-client-libservice/source/libList/ns_list.c
mbed-client-libservice/source/libtrace/ns_trace.c
# Excluded mbed-client-libservice/source/nvmHelper
)
target_include_directories(wsbrd PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
nanostack/source/
mbed-trace/
mbed-client-libservice/
nanostack-event-loop/
nanostack/
)
target_compile_definitions(wsbrd PRIVATE NSCONFIG=ws_border_router)
# target_compile_definitions(wsbrd PRIVATE EXTRA_DEBUG_INFO)
target_link_libraries(wsbrd PRIVATE Threads::Threads)
target_link_libraries(wsbrd PRIVATE PkgConfig::LIBNL_ROUTE)
target_link_libraries(wsbrd PRIVATE MbedTLS::mbedtls MbedTLS::mbedcrypto MbedTLS::mbedx509)
if(LIBSYSTEMD_FOUND)
target_compile_definitions(wsbrd PRIVATE HAVE_LIBSYSTEMD)
target_sources(wsbrd PRIVATE app_wsbrd/dbus.c)
target_link_libraries(wsbrd PRIVATE PkgConfig::LIBSYSTEMD)
endif()
if(BACKTRACE_FOUND)
target_compile_definitions(wsbrd PRIVATE HAVE_BACKTRACE)
target_sources(wsbrd PRIVATE common/backtrace_show.c)
target_link_libraries(wsbrd PRIVATE backtrace)
endif()
if(LIBDL_FOUND)
target_compile_definitions(wsbrd PRIVATE HAVE_LIBDL)
target_link_libraries(wsbrd PRIVATE ${CMAKE_DL_LIBS})
endif()
install(TARGETS wsbrd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# FIXME: use ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/wsbrd and report this value in
# the code
install(DIRECTORY DESTINATION /var/lib/wsbrd)
install(FILES misc/com.silabs.Wisun.BorderRouter.service
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services)
install(FILES misc/wisun-borderouter.service
DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/system)
# We try to avoid PATH hardcoding, but dbus does not watch
# /usr/local/share/dbus-1/system.d
install(FILES misc/com.silabs.Wisun.BorderRouter.conf
DESTINATION /etc/dbus-1/system.d)
install(FILES CHANGES.md README.md
DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(FILES examples/wsbrd.conf examples/br_cert.pem examples/br_key.pem
examples/ca_cert.pem examples/node_cert.pem examples/node_key.pem
DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
if(COMPILE_SIMULATION_TOOLS)
add_executable(wsnode
version.c
app_wsbrd/wsrouter.c
app_wsbrd/wsbr_mac.c
app_wsbrd/wsbr_fhss_mac.c
app_wsbrd/wsbr_fhss_net.c
app_wsbrd/commandline.c
app_wsbrd/named_values.c
common/bus_uart.c
common/hal_interrupt.c
common/os_timer.c
common/os_scheduler.c
common/log.c
common/rand.c
common/slist.c
common/spinel_buffer.c
nanostack/source/6lowpan/adaptation_interface.c
nanostack/source/6lowpan/bootstraps/network_lib.c
nanostack/source/6lowpan/bootstraps/protocol_6lowpan.c
nanostack/source/6lowpan/bootstraps/protocol_6lowpan_bootstrap.c
nanostack/source/6lowpan/bootstraps/protocol_6lowpan_interface.c
nanostack/source/6lowpan/fragmentation/cipv6_fragmenter.c
nanostack/source/6lowpan/iphc_decode/6lowpan_iphc.c
nanostack/source/6lowpan/iphc_decode/iphc_compress.c
nanostack/source/6lowpan/iphc_decode/iphc_decompress.c
nanostack/source/6lowpan/iphc_decode/lowpan_context.c
nanostack/source/6lowpan/mac/mac_helper.c
nanostack/source/6lowpan/mac/mac_ie_lib.c
nanostack/source/6lowpan/mac/mac_response_handler.c
# Excluded nanostack/source/6lowpan/Mesh
nanostack/source/6lowpan/nd/nd_router_object.c
# Excluded nanostack/source/6lowpan/Thread
nanostack/source/6lowpan/ws/ws_bootstrap.c
nanostack/source/6lowpan/ws/ws_bootstrap_ffn.c
nanostack/source/6lowpan/ws/ws_bootstrap_lfn.c
nanostack/source/6lowpan/ws/ws_cfg_settings.c
nanostack/source/6lowpan/ws/ws_common.c
nanostack/source/6lowpan/ws/ws_eapol_auth_relay.c
nanostack/source/6lowpan/ws/ws_eapol_pdu.c
nanostack/source/6lowpan/ws/ws_eapol_relay.c
nanostack/source/6lowpan/ws/ws_eapol_relay_lib.c
nanostack/source/6lowpan/ws/ws_ie_lib.c
nanostack/source/6lowpan/ws/ws_llc_data_service.c
nanostack/source/6lowpan/ws/ws_management_api.c
nanostack/source/6lowpan/ws/ws_mpx_header.c
nanostack/source/6lowpan/ws/ws_neighbor_class.c
nanostack/source/6lowpan/ws/ws_pae_auth.c
nanostack/source/6lowpan/ws/ws_pae_controller.c
nanostack/source/6lowpan/ws/ws_pae_key_storage.c
nanostack/source/6lowpan/ws/ws_pae_lib.c
nanostack/source/6lowpan/ws/ws_pae_nvm_store.c
nanostack/source/6lowpan/ws/ws_pae_nvm_data.c
nanostack/source/6lowpan/ws/ws_pae_supp.c
nanostack/source/6lowpan/ws/ws_pae_time.c
nanostack/source/6lowpan/ws/ws_pae_timers.c
nanostack/source/6lowpan/ws/ws_phy.c
nanostack/source/6lowpan/ws/ws_regulation_arib.c
nanostack/source/6lowpan/ws/ws_regulation_none.c
nanostack/source/6lowpan/ws/ws_regulation.c
nanostack/source/6lowpan/ws/ws_stats.c
nanostack/source/6lowpan/ws/ws_test_api.c
nanostack/source/common_protocols/icmpv6.c
nanostack/source/common_protocols/icmpv6_prefix.c
nanostack/source/common_protocols/icmpv6_radv.c
nanostack/source/common_protocols/ipv6.c
nanostack/source/common_protocols/ipv6_flow.c
nanostack/source/common_protocols/ipv6_fragmentation.c
nanostack/source/common_protocols/ipv6_resolution.c
nanostack/source/common_protocols/mld.c
nanostack/source/common_protocols/udp.c
nanostack/source/core/buffer_dyn.c
nanostack/source/core/ns_address_internal.c
nanostack/source/core/ns_socket.c
nanostack/source/core/sockbuf.c
nanostack/source/dhcpv6_client/dhcpv6_client_service.c
nanostack/source/ipv6_stack/ipv6_routing_table.c
nanostack/source/ipv6_stack/protocol_ipv6.c
nanostack/source/libdhcpv6/dhcp_service_api.c
nanostack/source/libdhcpv6/libdhcpv6.c
nanostack/source/libdhcpv6/libdhcpv6_vendordata.c
nanostack/source/net_lib/net_short_address_extension.c
nanostack/source/net_lib/net_dns.c
nanostack/source/net_lib/multicast_api.c
nanostack/source/net_lib/net_6lowpan_parameter_api.c
nanostack/source/net_lib/net_rpl.c
nanostack/source/net_lib/ns_net.c
nanostack/source/net_lib/socket_api.c
nanostack/source/net_lib/net_ipv6.c
nanostack/source/mac/rf_driver_storage.c
nanostack/source/mac/ethernet/ethernet_mac_api.c
# Excluded nanostack/source/mac/ieee802154
nanostack/source/mpl/mpl.c
nanostack/source/nwk_interface/protocol_core.c
nanostack/source/nwk_interface/protocol_stats.c
nanostack/source/nwk_interface/protocol_timer.c
nanostack/source/rpl/rpl_control.c
nanostack/source/rpl/rpl_mrhof.c
nanostack/source/rpl/rpl_downward.c
nanostack/source/rpl/rpl_data.c
nanostack/source/rpl/rpl_objective.c
nanostack/source/rpl/rpl_of0.c
nanostack/source/rpl/rpl_policy.c
nanostack/source/rpl/rpl_upward.c
nanostack/source/security/eapol/eapol_helper.c
nanostack/source/security/eapol/kde_helper.c
nanostack/source/security/kmp/kmp_addr.c
nanostack/source/security/kmp/kmp_api.c
nanostack/source/security/kmp/kmp_eapol_pdu_if.c
nanostack/source/security/kmp/kmp_socket_if.c
nanostack/source/security/pana/pana_eap_header.c
nanostack/source/security/protocols/eap_tls_sec_prot/auth_eap_tls_sec_prot.c
nanostack/source/security/protocols/eap_tls_sec_prot/eap_tls_sec_prot_lib.c
nanostack/source/security/protocols/eap_tls_sec_prot/radius_eap_tls_sec_prot.c
nanostack/source/security/protocols/eap_tls_sec_prot/supp_eap_tls_sec_prot.c
nanostack/source/security/protocols/fwh_sec_prot/auth_fwh_sec_prot.c
nanostack/source/security/protocols/fwh_sec_prot/supp_fwh_sec_prot.c
nanostack/source/security/protocols/gkh_sec_prot/auth_gkh_sec_prot.c
nanostack/source/security/protocols/gkh_sec_prot/supp_gkh_sec_prot.c
nanostack/source/security/protocols/key_sec_prot/key_sec_prot.c
nanostack/source/security/protocols/msg_sec_prot/msg_sec_prot.c
nanostack/source/security/protocols/radius_sec_prot/avp_helper.c
nanostack/source/security/protocols/radius_sec_prot/radius_client_sec_prot.c
nanostack/source/security/protocols/sec_prot_certs.c
nanostack/source/security/protocols/sec_prot_keys.c
nanostack/source/security/protocols/sec_prot_lib.c
nanostack/source/security/protocols/tls_sec_prot/tls_sec_prot.c
nanostack/source/security/protocols/tls_sec_prot/tls_sec_prot_lib.c
nanostack/source/service_libs/blacklist/blacklist.c
nanostack/source/service_libs/etx/etx.c
nanostack/source/service_libs/fnv_hash/fnv_hash.c
nanostack/source/service_libs/hmac/hmac_md.c
nanostack/source/service_libs/ieee_802_11/ieee_802_11.c
nanostack/source/service_libs/mac_neighbor_table/mac_neighbor_table.c
nanostack/source/service_libs/nd_proxy/nd_proxy.c
nanostack/source/service_libs/nist_aes_kw/nist_aes_kw.c
nanostack/source/service_libs/random_early_detection/random_early_detection.c
nanostack/source/service_libs/sha256/ns_sha256.c
nanostack/source/service_libs/sha256/shalib.c
nanostack/source/service_libs/trickle/trickle.c
nanostack/source/service_libs/utils/isqrt.c
nanostack/source/service_libs/utils/ns_file_system.c
nanostack/source/service_libs/utils/ns_time.c
# Excluded nanostack/source/service_libs/whiteboard/whiteboard.c
nanostack-event-loop/source/event.c
nanostack-event-loop/source/system_timer.c
mbed-client-libservice/source/libBits/common_functions.c
# Excluded mbed-client-libservice/source/libip4string
mbed-client-libservice/source/libip6string/ip6tos.c
mbed-client-libservice/source/libip6string/stoip6.c
mbed-client-libservice/source/libList/ns_list.c
mbed-client-libservice/source/libtrace/ns_trace.c
# Excluded mbed-client-libservice/source/nvmHelper
)
target_include_directories(wsnode PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
nanostack/source/
mbed-trace/
mbed-client-libservice/
nanostack-event-loop/
nanostack/
)
target_compile_definitions(wsnode PRIVATE NSCONFIG=ws_router)
# target_compile_definitions(wsnode PRIVATE EXTRA_DEBUG_INFO)
target_link_libraries(wsnode PRIVATE Threads::Threads)
target_link_libraries(wsnode PRIVATE MbedTLS::mbedtls MbedTLS::mbedcrypto MbedTLS::mbedx509)
if(BACKTRACE_FOUND)
target_compile_definitions(wsnode PRIVATE HAVE_BACKTRACE)
target_sources(wsnode PRIVATE common/backtrace_show.c)
target_link_libraries(wsnode PRIVATE backtrace)
endif()
if(LIBDL_FOUND)
target_compile_definitions(wsnode PRIVATE HAVE_LIBDL)
target_link_libraries(wsnode PRIVATE ${CMAKE_DL_LIBS})
endif()
install(TARGETS wsnode RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
add_executable(wshwsim
version.c
common/bus_uart.c
common/hal_interrupt.c
common/os_scheduler.c
common/os_timer.c
common/log.c
common/rand.c
common/slist.c
common/spinel_buffer.c
mbed-client-libservice/source/libBits/common_functions.c
# Excluded mbed-client-libservice/source/libip4string
mbed-client-libservice/source/libip6string/ip6tos.c
mbed-client-libservice/source/libip6string/stoip6.c
mbed-client-libservice/source/libList/ns_list.c
mbed-client-libservice/source/libtrace/ns_trace.c
nanostack-event-loop/source/event.c
nanostack-event-loop/source/system_timer.c
app_wshwsim/sl_wsrcp.c
app_wshwsim/sl_wsrcp_mac.c
app_wshwsim/sl_rf_driver.c
app_wshwsim/hal_fhss_timer.c
app_wshwsim/mac/rf_driver_storage.c
app_wshwsim/mac/ieee802154/mac_cca_threshold.c
app_wshwsim/mac/ieee802154/mac_fhss_callbacks.c
app_wshwsim/mac/ieee802154/mac_filter.c
app_wshwsim/mac/ieee802154/mac_header_helper_functions.c
app_wshwsim/mac/ieee802154/mac_indirect_data.c
app_wshwsim/mac/ieee802154/mac_mcps_sap.c
app_wshwsim/mac/ieee802154/mac_mlme.c
app_wshwsim/mac/ieee802154/mac_mode_switch.c
app_wshwsim/mac/ieee802154/mac_pd_sap.c
app_wshwsim/mac/ieee802154/mac_security_mib.c
app_wshwsim/mac/ieee802154/mac_timer.c
app_wshwsim/mac/ieee802154/sw_mac.c
app_wshwsim/ccm/ccm_security.c
app_wshwsim/ccm/mbedOS/aes_mbedtls_adapter.c
app_wshwsim/fhss/channel_functions.c
app_wshwsim/fhss/channel_list.c
app_wshwsim/fhss/fhss_common.c
app_wshwsim/fhss/fhss_configuration_interface.c
app_wshwsim/fhss/fhss_statistics.c
app_wshwsim/fhss/fhss_ws.c
# Excluded app_wshwsim/fhss/fhss_test_api.c
)
target_include_directories(wshwsim PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
app_wshwsim/
mbed-trace/
mbed-client-libservice/
nanostack-event-loop/
nanostack/
)
# target_compile_definitions(wshwsim PRIVATE FHSS_CHANNEL_DEBUG)
# target_compile_definitions(wshwsim PRIVATE TIMING_TOOL_TRACES)
# target_compile_definitions(wshwsim PRIVATE EXTRA_DEBUG_INFO)
target_link_libraries(wshwsim PRIVATE Threads::Threads)
target_link_libraries(wshwsim PRIVATE MbedTLS::mbedtls)
target_link_libraries(wshwsim PRIVATE util)
if(LIBPCAP_FOUND)
target_compile_definitions(wshwsim PRIVATE HAVE_LIBPCAP)
target_link_libraries(wshwsim PRIVATE PkgConfig::LIBPCAP)
endif()
if(BACKTRACE_FOUND)
target_compile_definitions(wshwsim PRIVATE HAVE_BACKTRACE)
target_sources(wshwsim PRIVATE common/backtrace_show.c)
target_link_libraries(wshwsim PRIVATE backtrace)
endif()
if(LIBDL_FOUND)
target_compile_definitions(wshwsim PRIVATE HAVE_LIBDL)
target_link_libraries(wshwsim PRIVATE ${CMAKE_DL_LIBS})
endif()
install(TARGETS wshwsim RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
add_executable(wssimserver
common/log.c
app_wssimserver/wssimserver.c)
target_include_directories(wssimserver PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
install(TARGETS wssimserver RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()