diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-07-06 22:09:19 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-09-08 21:10:27 +0200 |
| commit | c8f9dbd494732c43d5b3626ba7010bf27d1f7664 (patch) | |
| tree | 3799e318528e04b1a614a8b921cdc0f48d69edbf /src/CMakeLists.txt | |
| parent | a0672be24d53ec78d1a2567cf60d9f774b0d158a (diff) | |
| download | wnix-c8f9dbd494732c43d5b3626ba7010bf27d1f7664.tar.gz | |
Move PS1-specific files to subdirectory
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 419f60e..7420122 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,13 +15,7 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. add_subdirectory(nanowasm) - -if(PS1_BUILD) - add_subdirectory(libc) - target_link_libraries(nanowasm PRIVATE c) - target_link_libraries(${PROJECT_NAME} PRIVATE c) - target_sources(${PROJECT_NAME} PRIVATE start.c) -endif() +target_link_libraries(${PROJECT_NAME} PRIVATE nanowasm) # Avoid C11 since it is not supported by the i386-mingw32 toolchain. set(cflags ${cflags} -Wall -ffunction-sections -fdata-sections -pedantic) @@ -32,6 +26,11 @@ set(components set(interfaces ) +if(PS1_BUILD) + add_subdirectory(libc) + add_subdirectory(ps1) +endif() + target_compile_options(${PROJECT_NAME} PUBLIC ${cflags}) target_compile_options(nanowasm PUBLIC ${cflags}) # Dependencies for main.c @@ -56,8 +55,3 @@ foreach(i ${interfaces}) endforeach() target_link_options(${PROJECT_NAME} PRIVATE -Wl,--gc-sections) - -if(PS1_BUILD) - target_link_options(${PROJECT_NAME} PRIVATE - -T${CMAKE_CURRENT_LIST_DIR}/playstation.x) -endif() |
