Skip to content

Commit

Permalink
samples: cellular: modem_shell: Cleanup include directories
Browse files Browse the repository at this point in the history
Cleaned up include directories in CMakeLists.txt.

Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
  • Loading branch information
tokangas authored and rlubos committed Feb 8, 2024
1 parent 507074b commit 9627faf
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 20 deletions.
8 changes: 1 addition & 7 deletions samples/cellular/modem_shell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/at/at_cmd_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#include <modem/at_cmd_parser.h>
#include <modem/at_params.h>

#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
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/link/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/link/link_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <zephyr/posix/arpa/inet.h>
#include <zephyr/net/net_ip.h>

#include "utils/net_utils.h"
#include "net_utils.h"
#include "mosh_print.h"

#include "link_shell.h"
Expand Down
4 changes: 2 additions & 2 deletions samples/cellular/modem_shell/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <net/nrf_cloud_os.h>

#include <dk_buttons_and_leds.h>
#include "uart/uart_shell.h"
#include "uart_shell.h"

#if defined(CONFIG_MOSH_PPP)
#include "ppp_ctrl.h"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/ping/icmp_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <zephyr/posix/arpa/inet.h>

#include "utils/net_utils.h"
#include "net_utils.h"
#include "link_api.h"
#include "mosh_defines.h"

Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#if defined(CONFIG_MOSH_CURL)
#include <nrf_curl.h>
#endif
#include "uart/uart_shell.h"
#include "uart_shell.h"
#include "mosh_print.h"

extern struct k_poll_signal mosh_signal;
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/sock/sock_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/th/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/th/th_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <stdlib.h>
#include <assert.h>
#include <zephyr/shell/shell.h>
#include "utils/str_utils.h"
#include "str_utils.h"
#include "mosh_print.h"

#if defined(CONFIG_MOSH_IPERF3)
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/th/th_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <zephyr/shell/shell.h>

#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)
Expand Down

0 comments on commit 9627faf

Please sign in to comment.