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 | |
| parent | a0672be24d53ec78d1a2567cf60d9f774b0d158a (diff) | |
| download | wnix-c8f9dbd494732c43d5b3626ba7010bf27d1f7664.tar.gz | |
Move PS1-specific files to subdirectory
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 18 | ||||
| -rw-r--r-- | src/ps1/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/ps1/playstation.x (renamed from src/playstation.x) | 0 | ||||
| -rw-r--r-- | src/ps1/start.c (renamed from src/start.c) | 0 | ||||
| -rw-r--r-- | src/ps1/system.cnf (renamed from src/system.cnf) | 0 |
5 files changed, 11 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() diff --git a/src/ps1/CMakeLists.txt b/src/ps1/CMakeLists.txt new file mode 100644 index 0000000..6ba4543 --- /dev/null +++ b/src/ps1/CMakeLists.txt @@ -0,0 +1,5 @@ +target_link_libraries(${PROJECT_NAME} PRIVATE c) +target_link_libraries(nanowasm PRIVATE c) +target_sources(${PROJECT_NAME} PRIVATE start.c) +target_link_options(${PROJECT_NAME} PRIVATE + -T${CMAKE_CURRENT_LIST_DIR}/playstation.x) diff --git a/src/playstation.x b/src/ps1/playstation.x index 00a1a74..00a1a74 100644 --- a/src/playstation.x +++ b/src/ps1/playstation.x diff --git a/src/start.c b/src/ps1/start.c index 09ca6c9..09ca6c9 100644 --- a/src/start.c +++ b/src/ps1/start.c diff --git a/src/system.cnf b/src/ps1/system.cnf index 716bb6c..716bb6c 100644 --- a/src/system.cnf +++ b/src/ps1/system.cnf |
