File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
zephyr_library_named (zperf )
4
4
5
- zephyr_library_sources (
6
- zperf_common.c
7
- zperf_udp_uploader.c
8
- zperf_tcp_uploader.c
9
- )
5
+ zephyr_library_sources (zperf_common.c )
6
+ zephyr_library_sources_ifdef (CONFIG_NET_UDP zperf_udp_uploader.c )
7
+ zephyr_library_sources_ifdef (CONFIG_NET_TCP zperf_tcp_uploader.c )
10
8
11
9
if (CONFIG_NET_ZPERF_SERVER )
12
10
zephyr_library_sources (zperf_session.c )
13
- zephyr_library_sources ( zperf_udp_receiver.c )
14
- zephyr_library_sources ( zperf_tcp_receiver.c )
11
+ zephyr_library_sources_ifdef ( CONFIG_NET_UDP zperf_udp_receiver.c )
12
+ zephyr_library_sources_ifdef ( CONFIG_NET_TCP zperf_tcp_receiver.c )
15
13
endif ()
16
14
17
15
zephyr_library_sources_ifdef (CONFIG_NET_SHELL
Original file line number Diff line number Diff line change @@ -234,8 +234,12 @@ static int zperf_init(void)
234
234
NULL );
235
235
k_thread_name_set (& zperf_work_q .thread , "zperf_work_q" );
236
236
237
- zperf_udp_uploader_init ();
238
- zperf_tcp_uploader_init ();
237
+ if (IS_ENABLED (CONFIG_NET_UDP )) {
238
+ zperf_udp_uploader_init ();
239
+ }
240
+ if (IS_ENABLED (CONFIG_NET_TCP )) {
241
+ zperf_tcp_uploader_init ();
242
+ }
239
243
240
244
if (IS_ENABLED (CONFIG_NET_ZPERF_SERVER )) {
241
245
zperf_session_init ();
You can’t perform that action at this time.
0 commit comments