From 9627fafb4222bb84e4c4eccc3807e3ff51f1f072 Mon Sep 17 00:00:00 2001 From: Tommi Kangas Date: Fri, 2 Feb 2024 13:06:17 +0200 Subject: [PATCH] samples: cellular: modem_shell: Cleanup include directories Cleaned up include directories in CMakeLists.txt. Signed-off-by: Tommi Kangas --- samples/cellular/modem_shell/CMakeLists.txt | 8 +------- samples/cellular/modem_shell/src/at/at_cmd_ping.c | 2 +- .../modem_shell/src/drivers/nrf91_non_offloaded_dev.c | 4 ++-- samples/cellular/modem_shell/src/link/link.c | 2 +- samples/cellular/modem_shell/src/link/link_api.c | 2 +- samples/cellular/modem_shell/src/main.c | 4 ++-- samples/cellular/modem_shell/src/ping/icmp_ping.c | 2 +- samples/cellular/modem_shell/src/shell.c | 2 +- samples/cellular/modem_shell/src/sock/sock_shell.c | 2 +- samples/cellular/modem_shell/src/th/CMakeLists.txt | 2 +- samples/cellular/modem_shell/src/th/th_ctrl.c | 2 +- samples/cellular/modem_shell/src/th/th_shell.c | 2 +- 12 files changed, 14 insertions(+), 20 deletions(-) diff --git a/samples/cellular/modem_shell/CMakeLists.txt b/samples/cellular/modem_shell/CMakeLists.txt index 7dcbe39a86d..61e020827e0 100644 --- a/samples/cellular/modem_shell/CMakeLists.txt +++ b/samples/cellular/modem_shell/CMakeLists.txt @@ -8,11 +8,7 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(MOSH) -target_include_directories(app PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/src - ${CMAKE_CURRENT_SOURCE_DIR}/iperf - ${CMAKE_CURRENT_SOURCE_DIR}/ping - ${CMAKE_CURRENT_SOURCE_DIR}/utils) +target_include_directories(app PRIVATE src) target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/shell.c) @@ -37,8 +33,6 @@ add_subdirectory_ifdef(CONFIG_MOSH_GPIO_COUNT src/gpio_count) add_subdirectory_ifdef(CONFIG_NRF_MODEM_LIB_TRACE src/modem_trace) add_subdirectory(src/cloud) -zephyr_include_directories_ifdef(CONFIG_MEMFAULT config) - if(NOT ENV{PROJECT_NAME}) zephyr_compile_definitions( PROJECT_NAME=${CMAKE_PROJECT_NAME} diff --git a/samples/cellular/modem_shell/src/at/at_cmd_ping.c b/samples/cellular/modem_shell/src/at/at_cmd_ping.c index 1bdd829735e..b04ff42f280 100644 --- a/samples/cellular/modem_shell/src/at/at_cmd_ping.c +++ b/samples/cellular/modem_shell/src/at/at_cmd_ping.c @@ -17,7 +17,7 @@ #include "mosh_print.h" #if defined(CONFIG_MOSH_PING) -#include "../ping/icmp_ping.h" +#include "icmp_ping.h" #endif #include "at_cmd_ping.h" diff --git a/samples/cellular/modem_shell/src/drivers/nrf91_non_offloaded_dev.c b/samples/cellular/modem_shell/src/drivers/nrf91_non_offloaded_dev.c index 969bddb3700..c52ea167b74 100644 --- a/samples/cellular/modem_shell/src/drivers/nrf91_non_offloaded_dev.c +++ b/samples/cellular/modem_shell/src/drivers/nrf91_non_offloaded_dev.c @@ -26,8 +26,8 @@ #include #include -#include "link/link_shell_pdn.h" -#include "utils/net_utils.h" +#include "link_shell_pdn.h" +#include "net_utils.h" #include "mosh_print.h" #define NO_MDM_SCKT -1 diff --git a/samples/cellular/modem_shell/src/link/link.c b/samples/cellular/modem_shell/src/link/link.c index c5e5bc2478f..ddea9e226e1 100644 --- a/samples/cellular/modem_shell/src/link/link.c +++ b/samples/cellular/modem_shell/src/link/link.c @@ -29,7 +29,7 @@ #include "link_api.h" #include "link.h" -#include "uart/uart_shell.h" +#include "uart_shell.h" #include "mosh_print.h" #include "mosh_defines.h" diff --git a/samples/cellular/modem_shell/src/link/link_api.c b/samples/cellular/modem_shell/src/link/link_api.c index 689a6dee2b1..4dd7f17cc8a 100644 --- a/samples/cellular/modem_shell/src/link/link_api.c +++ b/samples/cellular/modem_shell/src/link/link_api.c @@ -18,7 +18,7 @@ #include #include -#include "utils/net_utils.h" +#include "net_utils.h" #include "mosh_print.h" #include "link_shell.h" diff --git a/samples/cellular/modem_shell/src/main.c b/samples/cellular/modem_shell/src/main.c index 212ffe3b2ad..8a5c0c55291 100644 --- a/samples/cellular/modem_shell/src/main.c +++ b/samples/cellular/modem_shell/src/main.c @@ -32,7 +32,7 @@ #include #include -#include "uart/uart_shell.h" +#include "uart_shell.h" #if defined(CONFIG_MOSH_PPP) #include "ppp_ctrl.h" @@ -50,7 +50,7 @@ #include "fota.h" #endif #if defined(CONFIG_MOSH_WORKER_THREADS) -#include "th/th_ctrl.h" +#include "th_ctrl.h" #endif #include "mosh_defines.h" #include "mosh_print.h" diff --git a/samples/cellular/modem_shell/src/ping/icmp_ping.c b/samples/cellular/modem_shell/src/ping/icmp_ping.c index 8d3dda881f5..313069db9d8 100644 --- a/samples/cellular/modem_shell/src/ping/icmp_ping.c +++ b/samples/cellular/modem_shell/src/ping/icmp_ping.c @@ -23,7 +23,7 @@ #include -#include "utils/net_utils.h" +#include "net_utils.h" #include "link_api.h" #include "mosh_defines.h" diff --git a/samples/cellular/modem_shell/src/shell.c b/samples/cellular/modem_shell/src/shell.c index 2fb8a6c61cf..86b64c6a2e1 100644 --- a/samples/cellular/modem_shell/src/shell.c +++ b/samples/cellular/modem_shell/src/shell.c @@ -33,7 +33,7 @@ #if defined(CONFIG_MOSH_CURL) #include #endif -#include "uart/uart_shell.h" +#include "uart_shell.h" #include "mosh_print.h" extern struct k_poll_signal mosh_signal; diff --git a/samples/cellular/modem_shell/src/sock/sock_shell.c b/samples/cellular/modem_shell/src/sock/sock_shell.c index bb10355d819..f0f89d13469 100644 --- a/samples/cellular/modem_shell/src/sock/sock_shell.c +++ b/samples/cellular/modem_shell/src/sock/sock_shell.c @@ -22,7 +22,7 @@ #include "mosh_defines.h" #include "mosh_print.h" #include "link_api.h" -#include "utils/net_utils.h" +#include "net_utils.h" /* Maximum length of the address */ #define SOCK_MAX_ADDR_LEN 100 diff --git a/samples/cellular/modem_shell/src/th/CMakeLists.txt b/samples/cellular/modem_shell/src/th/CMakeLists.txt index b1ffb28f0c8..145b03a9d3a 100644 --- a/samples/cellular/modem_shell/src/th/CMakeLists.txt +++ b/samples/cellular/modem_shell/src/th/CMakeLists.txt @@ -4,7 +4,7 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -zephyr_include_directories(.) +target_include_directories(app PRIVATE .) target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/th_ctrl.c) target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/th_shell.c) diff --git a/samples/cellular/modem_shell/src/th/th_ctrl.c b/samples/cellular/modem_shell/src/th/th_ctrl.c index e6fcb0a2d00..2ed92bc0008 100644 --- a/samples/cellular/modem_shell/src/th/th_ctrl.c +++ b/samples/cellular/modem_shell/src/th/th_ctrl.c @@ -9,7 +9,7 @@ #include #include #include -#include "utils/str_utils.h" +#include "str_utils.h" #include "mosh_print.h" #if defined(CONFIG_MOSH_IPERF3) diff --git a/samples/cellular/modem_shell/src/th/th_shell.c b/samples/cellular/modem_shell/src/th/th_shell.c index 46a0261d95c..2558cebff51 100644 --- a/samples/cellular/modem_shell/src/th/th_shell.c +++ b/samples/cellular/modem_shell/src/th/th_shell.c @@ -8,7 +8,7 @@ #include -#include "th/th_ctrl.h" +#include "th_ctrl.h" #include "mosh_print.h" static int cmd_th_startbg(const struct shell *shell, size_t argc, char **argv)