diff --git a/BAN/CMakeLists.txt b/BAN/CMakeLists.txt index 3f759c40ad..feb9f8ec58 100644 --- a/BAN/CMakeLists.txt +++ b/BAN/CMakeLists.txt @@ -9,4 +9,4 @@ add_library(ban ${BAN_SOURCES}) banan_link_library(ban libc) banan_install_headers(ban) -install(TARGETS ban) +install(TARGETS ban OPTIONAL) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d5f22d741..1e4389640a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ set(CMAKE_INSTALL_LIBDIR ${BANAN_LIB}) set(CMAKE_INSTALL_INCLUDEDIR ${BANAN_INCLUDE}) set(CMAKE_INSTALL_SYSCONF ${BANAN_ETC}) set(CMAKE_INSTALL_MESSAGE NEVER) +set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY True) # include headers of ${library} to ${target} function(banan_include_headers target library) @@ -38,12 +39,12 @@ endfunction() # add install step for all header files of target function(banan_install_headers target) - file(GLOB_RECURSE headers RELATIVE $/include "*.h") + file(GLOB_RECURSE headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/include *.h) foreach(header ${headers}) get_filename_component(subdirectory ${header} DIRECTORY) - install(FILES include/${header} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${subdirectory} OPTIONAL) + install(FILES include/${header} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${subdirectory}) endforeach() - target_include_directories(${target} PRIVATE $/include) + target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) endfunction() add_subdirectory(kernel) diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index 8fa5f09bb5..aa9d0f2a8c 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -212,7 +212,7 @@ banan_include_headers(kernel libinput) banan_install_headers(kernel) set_target_properties(kernel PROPERTIES OUTPUT_NAME banan-os.kernel) -install(TARGETS kernel DESTINATION ${BANAN_BOOT}) +install(TARGETS kernel DESTINATION ${BANAN_BOOT} OPTIONAL) if("${BANAN_ARCH}" STREQUAL "x86_64") set(ELF_FORMAT elf64-x86-64) diff --git a/script/build.sh b/script/build.sh index 22c7e2e245..0b29c373c1 100755 --- a/script/build.sh +++ b/script/build.sh @@ -46,7 +46,7 @@ build_toolchain () { } create_image () { - build_target bootloader + build_target all build_target install $BANAN_ROOT_DIR/ports/build.sh diff --git a/toolchain/build.sh b/toolchain/build.sh index 6fa384f28e..d4584659f6 100755 --- a/toolchain/build.sh +++ b/toolchain/build.sh @@ -239,7 +239,7 @@ find $BANAN_BUILD_DIR -mindepth 1 -maxdepth 1 ! -name toolchain -exec rm -r {} + # NOTE: we have to manually create initial sysroot with libc headers # since cmake cannot be invoked yet mkdir -p $BANAN_SYSROOT/usr -cp -r $BANAN_ROOT_DIR/libc/include $BANAN_SYSROOT/usr/include +cp -r $BANAN_ROOT_DIR/userspace/libraries/LibC/include $BANAN_SYSROOT/usr/include mkdir -p $BANAN_BUILD_DIR/toolchain @@ -262,7 +262,8 @@ fi if (($BUILD_LIBSTDCPP)); then # delete sysroot and install libc rm -r $BANAN_SYSROOT - $BANAN_SCRIPT_DIR/build.sh libc-install + $BANAN_SCRIPT_DIR/build.sh libc + $BANAN_SCRIPT_DIR/build.sh install build_libstdcpp fi diff --git a/userspace/Shell/CMakeLists.txt b/userspace/Shell/CMakeLists.txt index 206d043b97..3d243d848c 100644 --- a/userspace/Shell/CMakeLists.txt +++ b/userspace/Shell/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(Shell ${SOURCES}) banan_link_library(Shell ban) banan_link_library(Shell libc) -install(TARGETS Shell) +install(TARGETS Shell OPTIONAL) diff --git a/userspace/Terminal/CMakeLists.txt b/userspace/Terminal/CMakeLists.txt index 9c39342af1..4ba92d8261 100644 --- a/userspace/Terminal/CMakeLists.txt +++ b/userspace/Terminal/CMakeLists.txt @@ -10,4 +10,4 @@ banan_link_library(Terminal libfont) banan_link_library(Terminal libgui) banan_link_library(Terminal libinput) -install(TARGETS Terminal) +install(TARGETS Terminal OPTIONAL) diff --git a/userspace/WindowServer/CMakeLists.txt b/userspace/WindowServer/CMakeLists.txt index d7df2bde06..7bc7674eb4 100644 --- a/userspace/WindowServer/CMakeLists.txt +++ b/userspace/WindowServer/CMakeLists.txt @@ -13,4 +13,4 @@ banan_link_library(WindowServer libfont) banan_link_library(WindowServer libimage) banan_link_library(WindowServer libinput) -install(TARGETS WindowServer) +install(TARGETS WindowServer OPTIONAL) diff --git a/userspace/aoc2023/day-template/CMakeLists.txt b/userspace/aoc2023/day-template/CMakeLists.txt index fa588c3237..2512eba1b3 100644 --- a/userspace/aoc2023/day-template/CMakeLists.txt +++ b/userspace/aoc2023/day-template/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day-template ${SOURCES}) banan_include_headers(aoc2023_day-template ban) banan_link_library(aoc2023_day-template libc) -install(TARGETS aoc2023_day-template) +install(TARGETS aoc2023_day-template OPTIONAL) diff --git a/userspace/aoc2023/day1/CMakeLists.txt b/userspace/aoc2023/day1/CMakeLists.txt index d91a19e30d..8b49ab97d7 100644 --- a/userspace/aoc2023/day1/CMakeLists.txt +++ b/userspace/aoc2023/day1/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day1 ${SOURCES}) banan_include_headers(aoc2023_day1 ban) banan_link_library(aoc2023_day1 libc) -install(TARGETS aoc2023_day1) +install(TARGETS aoc2023_day1 OPTIONAL) diff --git a/userspace/aoc2023/day10/CMakeLists.txt b/userspace/aoc2023/day10/CMakeLists.txt index f9bfd51b13..7786435fe6 100644 --- a/userspace/aoc2023/day10/CMakeLists.txt +++ b/userspace/aoc2023/day10/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day10 ${SOURCES}) banan_include_headers(aoc2023_day10 ban) banan_link_library(aoc2023_day10 libc) -install(TARGETS aoc2023_day10) +install(TARGETS aoc2023_day10 OPTIONAL) diff --git a/userspace/aoc2023/day11/CMakeLists.txt b/userspace/aoc2023/day11/CMakeLists.txt index 2b0191e398..702b6c2046 100644 --- a/userspace/aoc2023/day11/CMakeLists.txt +++ b/userspace/aoc2023/day11/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day11 ${SOURCES}) banan_include_headers(aoc2023_day11 ban) banan_link_library(aoc2023_day11 libc) -install(TARGETS aoc2023_day11) +install(TARGETS aoc2023_day11 OPTIONAL) diff --git a/userspace/aoc2023/day12/CMakeLists.txt b/userspace/aoc2023/day12/CMakeLists.txt index 03ae6b997a..e72909a04f 100644 --- a/userspace/aoc2023/day12/CMakeLists.txt +++ b/userspace/aoc2023/day12/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day12 ${SOURCES}) banan_link_library(aoc2023_day12 ban) banan_link_library(aoc2023_day12 libc) -install(TARGETS aoc2023_day12) +install(TARGETS aoc2023_day12 OPTIONAL) diff --git a/userspace/aoc2023/day13/CMakeLists.txt b/userspace/aoc2023/day13/CMakeLists.txt index 4aafcac77e..f3b3388194 100644 --- a/userspace/aoc2023/day13/CMakeLists.txt +++ b/userspace/aoc2023/day13/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day13 ${SOURCES}) banan_include_headers(aoc2023_day13 ban) banan_link_library(aoc2023_day13 libc) -install(TARGETS aoc2023_day13) +install(TARGETS aoc2023_day13 OPTIONAL) diff --git a/userspace/aoc2023/day14/CMakeLists.txt b/userspace/aoc2023/day14/CMakeLists.txt index 0d6d273e0f..b44b3a182a 100644 --- a/userspace/aoc2023/day14/CMakeLists.txt +++ b/userspace/aoc2023/day14/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day14 ${SOURCES}) banan_include_headers(aoc2023_day14 ban) banan_link_library(aoc2023_day14 libc) -install(TARGETS aoc2023_day14) +install(TARGETS aoc2023_day14 OPTIONAL) diff --git a/userspace/aoc2023/day15/CMakeLists.txt b/userspace/aoc2023/day15/CMakeLists.txt index 4d845a7621..2579444921 100644 --- a/userspace/aoc2023/day15/CMakeLists.txt +++ b/userspace/aoc2023/day15/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day15 ${SOURCES}) banan_include_headers(aoc2023_day15 ban) banan_link_library(aoc2023_day15 libc) -install(TARGETS aoc2023_day15) +install(TARGETS aoc2023_day15 OPTIONAL) diff --git a/userspace/aoc2023/day16/CMakeLists.txt b/userspace/aoc2023/day16/CMakeLists.txt index dafa191334..7dc8f3002d 100644 --- a/userspace/aoc2023/day16/CMakeLists.txt +++ b/userspace/aoc2023/day16/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day16 ${SOURCES}) banan_include_headers(aoc2023_day16 ban) banan_link_library(aoc2023_day16 libc) -install(TARGETS aoc2023_day16) +install(TARGETS aoc2023_day16 OPTIONAL) diff --git a/userspace/aoc2023/day17/CMakeLists.txt b/userspace/aoc2023/day17/CMakeLists.txt index e3e8204d56..6d73efeb9b 100644 --- a/userspace/aoc2023/day17/CMakeLists.txt +++ b/userspace/aoc2023/day17/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day17 ${SOURCES}) banan_include_headers(aoc2023_day17 ban) banan_link_library(aoc2023_day17 libc) -install(TARGETS aoc2023_day17) +install(TARGETS aoc2023_day17 OPTIONAL) diff --git a/userspace/aoc2023/day18/CMakeLists.txt b/userspace/aoc2023/day18/CMakeLists.txt index 850c47bf8a..5186776e81 100644 --- a/userspace/aoc2023/day18/CMakeLists.txt +++ b/userspace/aoc2023/day18/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day18 ${SOURCES}) banan_include_headers(aoc2023_day18 ban) banan_link_library(aoc2023_day18 libc) -install(TARGETS aoc2023_day18) +install(TARGETS aoc2023_day18 OPTIONAL) diff --git a/userspace/aoc2023/day19/CMakeLists.txt b/userspace/aoc2023/day19/CMakeLists.txt index 6310da7146..573048cc7c 100644 --- a/userspace/aoc2023/day19/CMakeLists.txt +++ b/userspace/aoc2023/day19/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day19 ${SOURCES}) banan_include_headers(aoc2023_day19 ban) banan_link_library(aoc2023_day19 libc) -install(TARGETS aoc2023_day19) +install(TARGETS aoc2023_day19 OPTIONAL) diff --git a/userspace/aoc2023/day2/CMakeLists.txt b/userspace/aoc2023/day2/CMakeLists.txt index 2ac2f804b5..7cc36eeda1 100644 --- a/userspace/aoc2023/day2/CMakeLists.txt +++ b/userspace/aoc2023/day2/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day2 ${SOURCES}) banan_include_headers(aoc2023_day2 ban) banan_link_library(aoc2023_day2 libc) -install(TARGETS aoc2023_day2) +install(TARGETS aoc2023_day2 OPTIONAL) diff --git a/userspace/aoc2023/day20/CMakeLists.txt b/userspace/aoc2023/day20/CMakeLists.txt index e95d111a47..5d30a5211b 100644 --- a/userspace/aoc2023/day20/CMakeLists.txt +++ b/userspace/aoc2023/day20/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day20 ${SOURCES}) banan_link_library(aoc2023_day20 ban) banan_link_library(aoc2023_day20 libc) -install(TARGETS aoc2023_day20) +install(TARGETS aoc2023_day20 OPTIONAL) diff --git a/userspace/aoc2023/day21/CMakeLists.txt b/userspace/aoc2023/day21/CMakeLists.txt index d519a99918..2ca947b817 100644 --- a/userspace/aoc2023/day21/CMakeLists.txt +++ b/userspace/aoc2023/day21/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day21 ${SOURCES}) banan_include_headers(aoc2023_day21 ban) banan_link_library(aoc2023_day21 libc) -install(TARGETS aoc2023_day21) +install(TARGETS aoc2023_day21 OPTIONAL) diff --git a/userspace/aoc2023/day22/CMakeLists.txt b/userspace/aoc2023/day22/CMakeLists.txt index fb7efd8764..2614c3e70d 100644 --- a/userspace/aoc2023/day22/CMakeLists.txt +++ b/userspace/aoc2023/day22/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day22 ${SOURCES}) banan_include_headers(aoc2023_day22 ban) banan_link_library(aoc2023_day22 libc) -install(TARGETS aoc2023_day22) +install(TARGETS aoc2023_day22 OPTIONAL) diff --git a/userspace/aoc2023/day23/CMakeLists.txt b/userspace/aoc2023/day23/CMakeLists.txt index 83675ac214..e879218276 100644 --- a/userspace/aoc2023/day23/CMakeLists.txt +++ b/userspace/aoc2023/day23/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day23 ${SOURCES}) banan_include_headers(aoc2023_day23 ban) banan_link_library(aoc2023_day23 libc) -install(TARGETS aoc2023_day23) +install(TARGETS aoc2023_day23 OPTIONAL) diff --git a/userspace/aoc2023/day24/CMakeLists.txt b/userspace/aoc2023/day24/CMakeLists.txt index 166383847e..86c389e56e 100644 --- a/userspace/aoc2023/day24/CMakeLists.txt +++ b/userspace/aoc2023/day24/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day24 ${SOURCES}) banan_include_headers(aoc2023_day24 ban) banan_link_library(aoc2023_day24 libc) -install(TARGETS aoc2023_day24) +install(TARGETS aoc2023_day24 OPTIONAL) diff --git a/userspace/aoc2023/day25/CMakeLists.txt b/userspace/aoc2023/day25/CMakeLists.txt index f40143d051..2acbae95b4 100644 --- a/userspace/aoc2023/day25/CMakeLists.txt +++ b/userspace/aoc2023/day25/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day25 ${SOURCES}) banan_link_library(aoc2023_day25 ban) banan_link_library(aoc2023_day25 libc) -install(TARGETS aoc2023_day25) +install(TARGETS aoc2023_day25 OPTIONAL) diff --git a/userspace/aoc2023/day3/CMakeLists.txt b/userspace/aoc2023/day3/CMakeLists.txt index 1b0d615a4d..c8fed7ca02 100644 --- a/userspace/aoc2023/day3/CMakeLists.txt +++ b/userspace/aoc2023/day3/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day3 ${SOURCES}) banan_include_headers(aoc2023_day3 ban) banan_link_library(aoc2023_day3 libc) -install(TARGETS aoc2023_day3) +install(TARGETS aoc2023_day3 OPTIONAL) diff --git a/userspace/aoc2023/day4/CMakeLists.txt b/userspace/aoc2023/day4/CMakeLists.txt index d2802650e9..752d27fbb2 100644 --- a/userspace/aoc2023/day4/CMakeLists.txt +++ b/userspace/aoc2023/day4/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day4 ${SOURCES}) banan_link_library(aoc2023_day4 ban) banan_link_library(aoc2023_day4 libc) -install(TARGETS aoc2023_day4) +install(TARGETS aoc2023_day4 OPTIONAL) diff --git a/userspace/aoc2023/day5/CMakeLists.txt b/userspace/aoc2023/day5/CMakeLists.txt index fb2da9aec9..ff2200fd4d 100644 --- a/userspace/aoc2023/day5/CMakeLists.txt +++ b/userspace/aoc2023/day5/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day5 ${SOURCES}) banan_include_headers(aoc2023_day5 ban) banan_link_library(aoc2023_day5 libc) -install(TARGETS aoc2023_day5) +install(TARGETS aoc2023_day5 OPTIONAL) diff --git a/userspace/aoc2023/day6/CMakeLists.txt b/userspace/aoc2023/day6/CMakeLists.txt index b584e78eae..ab9c17cc9f 100644 --- a/userspace/aoc2023/day6/CMakeLists.txt +++ b/userspace/aoc2023/day6/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day6 ${SOURCES}) banan_include_headers(aoc2023_day6 ban) banan_link_library(aoc2023_day6 libc) -install(TARGETS aoc2023_day6) +install(TARGETS aoc2023_day6 OPTIONAL) diff --git a/userspace/aoc2023/day7/CMakeLists.txt b/userspace/aoc2023/day7/CMakeLists.txt index f88ce3e8c3..2f591c73ea 100644 --- a/userspace/aoc2023/day7/CMakeLists.txt +++ b/userspace/aoc2023/day7/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day7 ${SOURCES}) banan_include_headers(aoc2023_day7 ban) banan_link_library(aoc2023_day7 libc) -install(TARGETS aoc2023_day7) +install(TARGETS aoc2023_day7 OPTIONAL) diff --git a/userspace/aoc2023/day8/CMakeLists.txt b/userspace/aoc2023/day8/CMakeLists.txt index a738ad8c3b..14d356e0fc 100644 --- a/userspace/aoc2023/day8/CMakeLists.txt +++ b/userspace/aoc2023/day8/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day8 ${SOURCES}) banan_include_headers(aoc2023_day8 ban) banan_link_library(aoc2023_day8 libc) -install(TARGETS aoc2023_day8) +install(TARGETS aoc2023_day8 OPTIONAL) diff --git a/userspace/aoc2023/day9/CMakeLists.txt b/userspace/aoc2023/day9/CMakeLists.txt index 02836e411e..565930eded 100644 --- a/userspace/aoc2023/day9/CMakeLists.txt +++ b/userspace/aoc2023/day9/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_day9 ${SOURCES}) banan_include_headers(aoc2023_day9 ban) banan_link_library(aoc2023_day9 libc) -install(TARGETS aoc2023_day9) +install(TARGETS aoc2023_day9 OPTIONAL) diff --git a/userspace/aoc2023/full/CMakeLists.txt b/userspace/aoc2023/full/CMakeLists.txt index 0cc52df6c0..dc5aafe6e7 100644 --- a/userspace/aoc2023/full/CMakeLists.txt +++ b/userspace/aoc2023/full/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(aoc2023_full ${SOURCES}) banan_include_headers(aoc2023_full ban) banan_link_library(aoc2023_full libc) -install(TARGETS aoc2023_full) +install(TARGETS aoc2023_full OPTIONAL) diff --git a/userspace/cat-mmap/CMakeLists.txt b/userspace/cat-mmap/CMakeLists.txt index 8f0298af40..f637010397 100644 --- a/userspace/cat-mmap/CMakeLists.txt +++ b/userspace/cat-mmap/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(cat-mmap ${SOURCES}) banan_link_library(cat-mmap libc) -install(TARGETS cat-mmap) +install(TARGETS cat-mmap OPTIONAL) diff --git a/userspace/cat/CMakeLists.txt b/userspace/cat/CMakeLists.txt index a0e8ee9791..9d084dc278 100644 --- a/userspace/cat/CMakeLists.txt +++ b/userspace/cat/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(cat ${SOURCES}) banan_link_library(cat libc) -install(TARGETS cat) +install(TARGETS cat OPTIONAL) diff --git a/userspace/chmod/CMakeLists.txt b/userspace/chmod/CMakeLists.txt index 53b91dc858..d3cb1c5f5b 100644 --- a/userspace/chmod/CMakeLists.txt +++ b/userspace/chmod/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(chmod ${SOURCES}) banan_link_library(chmod libc) -install(TARGETS chmod) +install(TARGETS chmod OPTIONAL) diff --git a/userspace/cp/CMakeLists.txt b/userspace/cp/CMakeLists.txt index a4b4e03afe..25f24ca398 100644 --- a/userspace/cp/CMakeLists.txt +++ b/userspace/cp/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(cp ${SOURCES}) banan_include_headers(cp ban) banan_link_library(cp libc) -install(TARGETS cp) +install(TARGETS cp OPTIONAL) diff --git a/userspace/dd/CMakeLists.txt b/userspace/dd/CMakeLists.txt index 7c3da0c544..9d09cde147 100644 --- a/userspace/dd/CMakeLists.txt +++ b/userspace/dd/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(dd ${SOURCES}) banan_link_library(dd libc) -install(TARGETS dd) +install(TARGETS dd OPTIONAL) diff --git a/userspace/dhcp-client/CMakeLists.txt b/userspace/dhcp-client/CMakeLists.txt index b02731a049..c02b342624 100644 --- a/userspace/dhcp-client/CMakeLists.txt +++ b/userspace/dhcp-client/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(dhcp-client ${SOURCES}) banan_include_headers(dhcp-client ban) banan_link_library(dhcp-client libc) -install(TARGETS dhcp-client) +install(TARGETS dhcp-client OPTIONAL) diff --git a/userspace/echo/CMakeLists.txt b/userspace/echo/CMakeLists.txt index 638a3caad6..231cfe5de5 100644 --- a/userspace/echo/CMakeLists.txt +++ b/userspace/echo/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(echo ${SOURCES}) banan_link_library(echo libc) -install(TARGETS echo) +install(TARGETS echo OPTIONAL) diff --git a/userspace/getopt/CMakeLists.txt b/userspace/getopt/CMakeLists.txt index 08ad357e09..80d66e9475 100644 --- a/userspace/getopt/CMakeLists.txt +++ b/userspace/getopt/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(getopt ${SOURCES}) banan_include_headers(getopt ban) banan_link_library(getopt libc) -install(TARGETS getopt) +install(TARGETS getopt OPTIONAL) diff --git a/userspace/http-server/CMakeLists.txt b/userspace/http-server/CMakeLists.txt index 778ef7b03e..3c5928e13f 100644 --- a/userspace/http-server/CMakeLists.txt +++ b/userspace/http-server/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(http-server ${SOURCES}) banan_link_library(http-server ban) banan_link_library(http-server libc) -install(TARGETS http-server) +install(TARGETS http-server OPTIONAL) diff --git a/userspace/id/CMakeLists.txt b/userspace/id/CMakeLists.txt index d301ca59b2..142c5862eb 100644 --- a/userspace/id/CMakeLists.txt +++ b/userspace/id/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(id ${SOURCES}) banan_include_headers(id ban) banan_link_library(id libc) -install(TARGETS id) +install(TARGETS id OPTIONAL) diff --git a/userspace/image/CMakeLists.txt b/userspace/image/CMakeLists.txt index 84eafe0f2d..8ae616998f 100644 --- a/userspace/image/CMakeLists.txt +++ b/userspace/image/CMakeLists.txt @@ -7,4 +7,4 @@ banan_include_headers(image ban) banan_link_library(image libc) banan_link_library(image libimage) -install(TARGETS image) +install(TARGETS image OPTIONAL) diff --git a/userspace/init/CMakeLists.txt b/userspace/init/CMakeLists.txt index 09f0f913df..499e07a197 100644 --- a/userspace/init/CMakeLists.txt +++ b/userspace/init/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(init ${SOURCES}) banan_include_headers(init ban) banan_link_library(init libc) -install(TARGETS init) +install(TARGETS init OPTIONAL) diff --git a/userspace/libraries/LibC/CMakeLists.txt b/userspace/libraries/LibC/CMakeLists.txt index 99edf15993..163c394f77 100644 --- a/userspace/libraries/LibC/CMakeLists.txt +++ b/userspace/libraries/LibC/CMakeLists.txt @@ -32,7 +32,7 @@ set(LIBC_SOURCES ) add_library(libc ${LIBC_SOURCES}) -target_compile_options(libc PRIVATE -O2 -g -Wstack-usage=512 -fno-tree-loop-distribute-patterns) +target_compile_options(libc PRIVATE -O2 -g -Wstack-usage=512 -fno-tree-loop-distribute-patterns -nostdlib) target_compile_options(libc PUBLIC -Wall -Wextra -Werror -Wno-error=stack-usage=) add_library(crt0 OBJECT arch/${BANAN_ARCH}/crt0.S) @@ -49,6 +49,6 @@ banan_include_headers(libc ban) banan_include_headers(libc kernel) banan_install_headers(libc) -install(TARGETS libc) +install(TARGETS libc OPTIONAL) set(CMAKE_STATIC_LIBRARY_PREFIX "") diff --git a/userspace/libraries/LibELF/CMakeLists.txt b/userspace/libraries/LibELF/CMakeLists.txt index ffe8b45b7b..e478f41e82 100644 --- a/userspace/libraries/LibELF/CMakeLists.txt +++ b/userspace/libraries/LibELF/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_library(libelf ${SOURCES}) banan_install_headers(libelf) -install(TARGETS libelf) +install(TARGETS libelf OPTIONAL) diff --git a/userspace/libraries/LibFont/CMakeLists.txt b/userspace/libraries/LibFont/CMakeLists.txt index d433b36af6..d33a81223c 100644 --- a/userspace/libraries/LibFont/CMakeLists.txt +++ b/userspace/libraries/LibFont/CMakeLists.txt @@ -8,6 +8,6 @@ banan_link_library(libfont libc) banan_link_library(libfont ban) banan_install_headers(libfont) -install(TARGETS libfont) +install(TARGETS libfont OPTIONAL) set(CMAKE_STATIC_LIBRARY_PREFIX "") diff --git a/userspace/libraries/LibGUI/CMakeLists.txt b/userspace/libraries/LibGUI/CMakeLists.txt index 9a96c0f961..5cbfdf5e16 100644 --- a/userspace/libraries/LibGUI/CMakeLists.txt +++ b/userspace/libraries/LibGUI/CMakeLists.txt @@ -9,6 +9,6 @@ banan_include_headers(libgui libinput) banan_link_library(libgui libc) banan_install_headers(libgui) -install(TARGETS libgui) +install(TARGETS libgui OPTIONAL) set(CMAKE_STATIC_LIBRARY_PREFIX "") diff --git a/userspace/libraries/LibImage/CMakeLists.txt b/userspace/libraries/LibImage/CMakeLists.txt index 418581c18f..019549eaf8 100644 --- a/userspace/libraries/LibImage/CMakeLists.txt +++ b/userspace/libraries/LibImage/CMakeLists.txt @@ -10,6 +10,6 @@ banan_link_library(libimage libc) banan_link_library(libimage ban) banan_install_headers(libimage) -install(TARGETS libimage) +install(TARGETS libimage OPTIONAL) set(CMAKE_STATIC_LIBRARY_PREFIX "") diff --git a/userspace/libraries/LibInput/CMakeLists.txt b/userspace/libraries/LibInput/CMakeLists.txt index dd075eb07e..ed3d02a245 100644 --- a/userspace/libraries/LibInput/CMakeLists.txt +++ b/userspace/libraries/LibInput/CMakeLists.txt @@ -8,6 +8,6 @@ banan_include_headers(libinput ban) banan_link_library(libinput libc) banan_install_headers(libinput) -install(TARGETS libinput) +install(TARGETS libinput OPTIONAL) set(CMAKE_STATIC_LIBRARY_PREFIX "") diff --git a/userspace/loadkeys/CMakeLists.txt b/userspace/loadkeys/CMakeLists.txt index dd6d7a3472..7cd4fcdac0 100644 --- a/userspace/loadkeys/CMakeLists.txt +++ b/userspace/loadkeys/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(loadkeys ${SOURCES}) banan_link_library(loadkeys libc) -install(TARGETS loadkeys) +install(TARGETS loadkeys OPTIONAL) diff --git a/userspace/ls/CMakeLists.txt b/userspace/ls/CMakeLists.txt index d1fa310aa6..316ff7c86f 100644 --- a/userspace/ls/CMakeLists.txt +++ b/userspace/ls/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(ls ${SOURCES}) banan_link_library(ls ban) banan_link_library(ls libc) -install(TARGETS ls) +install(TARGETS ls OPTIONAL) diff --git a/userspace/meminfo/CMakeLists.txt b/userspace/meminfo/CMakeLists.txt index fd5339cf9b..d79e80d32f 100644 --- a/userspace/meminfo/CMakeLists.txt +++ b/userspace/meminfo/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(meminfo ${SOURCES}) banan_link_library(meminfo libc) -install(TARGETS meminfo) +install(TARGETS meminfo OPTIONAL) diff --git a/userspace/mkdir/CMakeLists.txt b/userspace/mkdir/CMakeLists.txt index 38fbda31e3..2d66513c98 100644 --- a/userspace/mkdir/CMakeLists.txt +++ b/userspace/mkdir/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(mkdir ${SOURCES}) banan_link_library(mkdir libc) -install(TARGETS mkdir) +install(TARGETS mkdir OPTIONAL) diff --git a/userspace/nslookup/CMakeLists.txt b/userspace/nslookup/CMakeLists.txt index c251bb2f78..19f64db2d8 100644 --- a/userspace/nslookup/CMakeLists.txt +++ b/userspace/nslookup/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(nslookup ${SOURCES}) banan_link_library(nslookup libc) -install(TARGETS nslookup) +install(TARGETS nslookup OPTIONAL) diff --git a/userspace/poweroff/CMakeLists.txt b/userspace/poweroff/CMakeLists.txt index 81c3f74c0c..891141e15c 100644 --- a/userspace/poweroff/CMakeLists.txt +++ b/userspace/poweroff/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(poweroff ${SOURCES}) banan_link_library(poweroff libc) -install(TARGETS poweroff) +install(TARGETS poweroff OPTIONAL) diff --git a/userspace/resolver/CMakeLists.txt b/userspace/resolver/CMakeLists.txt index 23a8cc1c7e..ca488ed9a6 100644 --- a/userspace/resolver/CMakeLists.txt +++ b/userspace/resolver/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(resolver ${SOURCES}) banan_link_library(resolver ban) banan_link_library(resolver libc) -install(TARGETS resolver) +install(TARGETS resolver OPTIONAL) diff --git a/userspace/rm/CMakeLists.txt b/userspace/rm/CMakeLists.txt index 9213a5510f..2c590c53b3 100644 --- a/userspace/rm/CMakeLists.txt +++ b/userspace/rm/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(rm ${SOURCES}) banan_include_headers(rm ban) banan_link_library(rm libc) -install(TARGETS rm) +install(TARGETS rm OPTIONAL) diff --git a/userspace/sleep/CMakeLists.txt b/userspace/sleep/CMakeLists.txt index 3efe450fb6..174c0227da 100644 --- a/userspace/sleep/CMakeLists.txt +++ b/userspace/sleep/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(sleep ${SOURCES}) banan_link_library(sleep libc) -install(TARGETS sleep) +install(TARGETS sleep OPTIONAL) diff --git a/userspace/snake/CMakeLists.txt b/userspace/snake/CMakeLists.txt index 66e4059eae..efb87de600 100644 --- a/userspace/snake/CMakeLists.txt +++ b/userspace/snake/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(snake ${SOURCES}) banan_include_headers(snake ban) banan_link_library(snake libc) -install(TARGETS snake) +install(TARGETS snake OPTIONAL) diff --git a/userspace/stat/CMakeLists.txt b/userspace/stat/CMakeLists.txt index 2b539b2121..70d5611924 100644 --- a/userspace/stat/CMakeLists.txt +++ b/userspace/stat/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(stat ${SOURCES}) banan_link_library(stat ban) banan_link_library(stat libc) -install(TARGETS stat) +install(TARGETS stat OPTIONAL) diff --git a/userspace/sudo/CMakeLists.txt b/userspace/sudo/CMakeLists.txt index f116692382..fd0277bac1 100644 --- a/userspace/sudo/CMakeLists.txt +++ b/userspace/sudo/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(sudo ${SOURCES}) banan_link_library(sudo libc) -install(TARGETS sudo) +install(TARGETS sudo OPTIONAL) diff --git a/userspace/sync/CMakeLists.txt b/userspace/sync/CMakeLists.txt index 307481f56e..628200b0e1 100644 --- a/userspace/sync/CMakeLists.txt +++ b/userspace/sync/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(sync ${SOURCES}) banan_link_library(sync libc) -install(TARGETS sync) +install(TARGETS sync OPTIONAL) diff --git a/userspace/tee/CMakeLists.txt b/userspace/tee/CMakeLists.txt index 7962c169b1..0288a76cb8 100644 --- a/userspace/tee/CMakeLists.txt +++ b/userspace/tee/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(tee ${SOURCES}) banan_link_library(tee libc) -install(TARGETS tee) +install(TARGETS tee OPTIONAL) diff --git a/userspace/test-framebuffer/CMakeLists.txt b/userspace/test-framebuffer/CMakeLists.txt index fa8c2f130f..a7f09aa247 100644 --- a/userspace/test-framebuffer/CMakeLists.txt +++ b/userspace/test-framebuffer/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(test-framebuffer ${SOURCES}) banan_link_library(test-framebuffer libc) -install(TARGETS test-framebuffer) +install(TARGETS test-framebuffer OPTIONAL) diff --git a/userspace/test-globals/CMakeLists.txt b/userspace/test-globals/CMakeLists.txt index ad9ab9460c..24caa441a1 100644 --- a/userspace/test-globals/CMakeLists.txt +++ b/userspace/test-globals/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(test-globals ${SOURCES}) banan_link_library(test-globals libc) -install(TARGETS test-globals) +install(TARGETS test-globals OPTIONAL) diff --git a/userspace/test-mmap-shared/CMakeLists.txt b/userspace/test-mmap-shared/CMakeLists.txt index 29d9e930e3..d97591d4e5 100644 --- a/userspace/test-mmap-shared/CMakeLists.txt +++ b/userspace/test-mmap-shared/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(test-mmap-shared ${SOURCES}) banan_link_library(test-mmap-shared libc) -install(TARGETS test-mmap-shared) +install(TARGETS test-mmap-shared OPTIONAL) diff --git a/userspace/test-mouse/CMakeLists.txt b/userspace/test-mouse/CMakeLists.txt index 2060258e98..fe117f2be3 100644 --- a/userspace/test-mouse/CMakeLists.txt +++ b/userspace/test-mouse/CMakeLists.txt @@ -7,4 +7,4 @@ banan_include_headers(test-mouse ban) banan_include_headers(test-mouse libinput) banan_link_library(test-mouse libc) -install(TARGETS test-mouse) +install(TARGETS test-mouse OPTIONAL) diff --git a/userspace/test-popen/CMakeLists.txt b/userspace/test-popen/CMakeLists.txt index c475c12ad4..3ae3d565d3 100644 --- a/userspace/test-popen/CMakeLists.txt +++ b/userspace/test-popen/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(test-popen ${SOURCES}) banan_link_library(test-popen libc) -install(TARGETS test-popen) +install(TARGETS test-popen OPTIONAL) diff --git a/userspace/test-sort/CMakeLists.txt b/userspace/test-sort/CMakeLists.txt index 96c48bcbe6..c6e9f8d228 100644 --- a/userspace/test-sort/CMakeLists.txt +++ b/userspace/test-sort/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(test-sort ${SOURCES}) banan_include_headers(test-sort ban) banan_link_library(test-sort libc) -install(TARGETS test-sort) +install(TARGETS test-sort OPTIONAL) diff --git a/userspace/test-tcp/CMakeLists.txt b/userspace/test-tcp/CMakeLists.txt index 519fb2d0d0..6836da0aed 100644 --- a/userspace/test-tcp/CMakeLists.txt +++ b/userspace/test-tcp/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(test-tcp ${SOURCES}) banan_link_library(test-tcp libc) -install(TARGETS test-tcp) +install(TARGETS test-tcp OPTIONAL) diff --git a/userspace/test-udp/CMakeLists.txt b/userspace/test-udp/CMakeLists.txt index 60d3f0246e..1165a49b70 100644 --- a/userspace/test-udp/CMakeLists.txt +++ b/userspace/test-udp/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(test-udp ${SOURCES}) banan_link_library(test-udp libc) -install(TARGETS test-udp) +install(TARGETS test-udp OPTIONAL) diff --git a/userspace/test-unix-socket/CMakeLists.txt b/userspace/test-unix-socket/CMakeLists.txt index 82cbc0382c..4720fa4abb 100644 --- a/userspace/test-unix-socket/CMakeLists.txt +++ b/userspace/test-unix-socket/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(test-unix-socket ${SOURCES}) banan_link_library(test-unix-socket libc) -install(TARGETS test-unix-socket) +install(TARGETS test-unix-socket OPTIONAL) diff --git a/userspace/test-window/CMakeLists.txt b/userspace/test-window/CMakeLists.txt index b0c0857fd0..94b5205efc 100644 --- a/userspace/test-window/CMakeLists.txt +++ b/userspace/test-window/CMakeLists.txt @@ -8,4 +8,4 @@ banan_include_headers(test-window libinput) banan_link_library(test-window libc) banan_link_library(test-window libgui) -install(TARGETS test-window) +install(TARGETS test-window OPTIONAL) diff --git a/userspace/test/CMakeLists.txt b/userspace/test/CMakeLists.txt index 093742dbcb..dac58209cb 100644 --- a/userspace/test/CMakeLists.txt +++ b/userspace/test/CMakeLists.txt @@ -5,4 +5,4 @@ set(TEST_SOURCES add_executable(test ${TEST_SOURCES}) banan_link_library(test libc) -install(TARGETS test) +install(TARGETS test OPTIONAL) diff --git a/userspace/touch/CMakeLists.txt b/userspace/touch/CMakeLists.txt index 2e93a18220..a0ba7c8378 100644 --- a/userspace/touch/CMakeLists.txt +++ b/userspace/touch/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(touch ${SOURCES}) banan_link_library(touch libc) -install(TARGETS touch) +install(TARGETS touch OPTIONAL) diff --git a/userspace/u8sum/CMakeLists.txt b/userspace/u8sum/CMakeLists.txt index 3233e3effb..836751311d 100644 --- a/userspace/u8sum/CMakeLists.txt +++ b/userspace/u8sum/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(u8sum ${SOURCES}) banan_link_library(u8sum libc) -install(TARGETS u8sum) +install(TARGETS u8sum OPTIONAL) diff --git a/userspace/whoami/CMakeLists.txt b/userspace/whoami/CMakeLists.txt index 106f9616de..fa4129427f 100644 --- a/userspace/whoami/CMakeLists.txt +++ b/userspace/whoami/CMakeLists.txt @@ -6,4 +6,4 @@ add_executable(whoami ${SOURCES}) banan_include_headers(whoami ban) banan_link_library(whoami libc) -install(TARGETS whoami) +install(TARGETS whoami OPTIONAL) diff --git a/userspace/yes/CMakeLists.txt b/userspace/yes/CMakeLists.txt index b6ef202cfc..6da530daeb 100644 --- a/userspace/yes/CMakeLists.txt +++ b/userspace/yes/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES add_executable(yes ${SOURCES}) banan_link_library(yes libc) -install(TARGETS yes) +install(TARGETS yes OPTIONAL)