summaryrefslogtreecommitdiff
path: root/cmd/srv9p/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-13 18:49:15 -0500
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-13 18:49:15 -0500
commitc578a300c7d0d46662fcd0bdce69af95a821bc18 (patch)
treea99de333f2812d7c018820f39d78b8c4e744f705 /cmd/srv9p/CMakeLists.txt
parent6a719c63ecb83a850c317ea94b8932aa0c857770 (diff)
parent57cc0523f600575feda09bd9fae13f685ce85b0f (diff)
Merge commit '57cc0523f600575feda09bd9fae13f685ce85b0f'
Diffstat (limited to 'cmd/srv9p/CMakeLists.txt')
-rw-r--r--cmd/srv9p/CMakeLists.txt35
1 files changed, 26 insertions, 9 deletions
diff --git a/cmd/srv9p/CMakeLists.txt b/cmd/srv9p/CMakeLists.txt
index b747882..0d8e320 100644
--- a/cmd/srv9p/CMakeLists.txt
+++ b/cmd/srv9p/CMakeLists.txt
@@ -5,21 +5,38 @@
if (PICO_PLATFORM STREQUAL "host")
-add_executable(srv9p
+# Compile ######################################################################
+
+add_library(srv9p_objs OBJECT
main.c
- static9p.c
-)
-target_embed_sources(srv9p static.h
- static/README.md
- static/Documentation/x
)
-target_include_directories(srv9p PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-target_include_directories(srv9p PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/config)
-target_link_libraries(srv9p
+target_include_directories(srv9p_objs PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/config)
+target_include_directories(srv9p_objs PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+target_link_libraries(srv9p_objs
libcr
libcr_ipc
libmisc
lib9p
+ lib9p_util
+)
+
+# Analyze the stack ############################################################
+
+add_stack_analysis(srv9p_stack.c srv9p_objs)
+
+# Link #########################################################################
+
+add_executable(srv9p)
+target_sources(srv9p PRIVATE
+ srv9p_stack.c
+ "$<TARGET_OBJECTS:srv9p_objs>"
+)
+
+# Embed ########################################################################
+
+target_embed_sources(srv9p_objs srv9p static.h
+ static/README.md
+ static/Documentation/x
)
endif()