BuildSystem: Cleanup userspace directory layout
userspace programs are now in userspace/programs userspace tests are now in userspace/tests This makes listing userspace projects much cleaner. Libraries were already separated to their own directory, so other programs should also.
This commit is contained in:
parent
5dc441c4af
commit
8ddab05ed3
|
@ -1,62 +1,6 @@
|
||||||
set(USERSPACE_PROJECTS
|
|
||||||
cat
|
|
||||||
cat-mmap
|
|
||||||
chmod
|
|
||||||
cp
|
|
||||||
dd
|
|
||||||
dhcp-client
|
|
||||||
echo
|
|
||||||
getopt
|
|
||||||
http-server
|
|
||||||
id
|
|
||||||
image
|
|
||||||
init
|
|
||||||
loadfont
|
|
||||||
loadkeys
|
|
||||||
ls
|
|
||||||
meminfo
|
|
||||||
mkdir
|
|
||||||
nslookup
|
|
||||||
poweroff
|
|
||||||
resolver
|
|
||||||
rm
|
|
||||||
Shell
|
|
||||||
sleep
|
|
||||||
snake
|
|
||||||
stat
|
|
||||||
sudo
|
|
||||||
sync
|
|
||||||
tee
|
|
||||||
Terminal
|
|
||||||
test
|
|
||||||
test-framebuffer
|
|
||||||
test-globals
|
|
||||||
test-mmap-shared
|
|
||||||
test-mouse
|
|
||||||
test-popen
|
|
||||||
test-sort
|
|
||||||
test-tcp
|
|
||||||
test-udp
|
|
||||||
test-unix-socket
|
|
||||||
test-window
|
|
||||||
touch
|
|
||||||
u8sum
|
|
||||||
whoami
|
|
||||||
WindowServer
|
|
||||||
yes
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(libraries)
|
|
||||||
|
|
||||||
add_custom_target(userspace)
|
add_custom_target(userspace)
|
||||||
|
|
||||||
#add_subdirectory(aoc2023)
|
#add_subdirectory(aoc2023)
|
||||||
|
add_subdirectory(libraries)
|
||||||
foreach(project ${USERSPACE_PROJECTS})
|
add_subdirectory(programs)
|
||||||
add_subdirectory(${project})
|
add_subdirectory(tests)
|
||||||
add_dependencies(userspace ${project})
|
|
||||||
# This is to allow cmake to link when libc updates
|
|
||||||
target_link_options(${project} PRIVATE -nolibc)
|
|
||||||
# Default compile options
|
|
||||||
target_compile_options(${project} PRIVATE -g -O2)
|
|
||||||
endforeach()
|
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
set(USERSPACE_PROGRAMS
|
||||||
|
cat
|
||||||
|
cat-mmap
|
||||||
|
chmod
|
||||||
|
cp
|
||||||
|
dd
|
||||||
|
dhcp-client
|
||||||
|
echo
|
||||||
|
getopt
|
||||||
|
http-server
|
||||||
|
id
|
||||||
|
image
|
||||||
|
init
|
||||||
|
loadfont
|
||||||
|
loadkeys
|
||||||
|
ls
|
||||||
|
meminfo
|
||||||
|
mkdir
|
||||||
|
nslookup
|
||||||
|
poweroff
|
||||||
|
resolver
|
||||||
|
rm
|
||||||
|
Shell
|
||||||
|
sleep
|
||||||
|
snake
|
||||||
|
stat
|
||||||
|
sudo
|
||||||
|
sync
|
||||||
|
tee
|
||||||
|
Terminal
|
||||||
|
touch
|
||||||
|
u8sum
|
||||||
|
whoami
|
||||||
|
WindowServer
|
||||||
|
yes
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(project ${USERSPACE_PROGRAMS})
|
||||||
|
add_subdirectory(${project})
|
||||||
|
add_dependencies(userspace ${project})
|
||||||
|
# This is to allow cmake to link when libc updates
|
||||||
|
target_link_options(${project} PRIVATE -nolibc)
|
||||||
|
# Default compile options
|
||||||
|
target_compile_options(${project} PRIVATE -g -O2)
|
||||||
|
endforeach()
|
|
@ -1,8 +0,0 @@
|
||||||
set(TEST_SOURCES
|
|
||||||
test.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(test ${TEST_SOURCES})
|
|
||||||
banan_link_library(test libc)
|
|
||||||
|
|
||||||
install(TARGETS test OPTIONAL)
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
set(USERSPACE_TESTS
|
||||||
|
test-fork
|
||||||
|
test-framebuffer
|
||||||
|
test-globals
|
||||||
|
test-mmap-shared
|
||||||
|
test-mouse
|
||||||
|
test-popen
|
||||||
|
test-sort
|
||||||
|
test-tcp
|
||||||
|
test-udp
|
||||||
|
test-unix-socket
|
||||||
|
test-window
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(project ${USERSPACE_TESTS})
|
||||||
|
add_subdirectory(${project})
|
||||||
|
add_dependencies(userspace ${project})
|
||||||
|
# This is to allow cmake to link when libc updates
|
||||||
|
target_link_options(${project} PRIVATE -nolibc)
|
||||||
|
# Default compile options
|
||||||
|
target_compile_options(${project} PRIVATE -g -O2)
|
||||||
|
endforeach()
|
|
@ -0,0 +1,8 @@
|
||||||
|
set(SOURCES
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(test-fork ${SOURCES})
|
||||||
|
banan_link_library(test-fork libc)
|
||||||
|
|
||||||
|
install(TARGETS test-fork OPTIONAL)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue