aboutsummaryrefslogtreecommitdiff
path: root/cmake/ps1.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/ps1.cmake')
-rw-r--r--cmake/ps1.cmake29
1 files changed, 10 insertions, 19 deletions
diff --git a/cmake/ps1.cmake b/cmake/ps1.cmake
index 21d77fa..14b6937 100644
--- a/cmake/ps1.cmake
+++ b/cmake/ps1.cmake
@@ -1,13 +1,8 @@
-find_package(PSXSDK 0.7.1 REQUIRED)
-
-target_compile_definitions(${PROJECT_NAME} PUBLIC FIXMATH_FAST_SIN PSXSDK_DEBUG)
-add_custom_target(exe ALL elf2exe ${PROJECT_NAME}
- ${cdroot}/${PROJECT_NAME}.exe -mark="A homebrew game created with PSXSDK"
+add_custom_target(exe ALL ${TOOLS_PREFIX}/bin/elf2exe ${PROJECT_NAME}
+ ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.exe
+ -mark="wnix, a Unix-like operating system for WebAssembly applications"
DEPENDS ${PROJECT_NAME})
-add_custom_target(iso ALL mkisofs -o ${PROJECT_NAME}.iso -V ${PROJECT_NAME}
- -sysid PLAYSTATION ${cdroot} DEPENDS exe)
-
-set(license_prefix $ENV{PSXSDK_PATH}/share/licenses)
+add_dependencies(exe tools)
if(VIDEO_MODE STREQUAL "VMODE_PAL")
set(region eur)
@@ -24,20 +19,16 @@ elseif(VIDEO_MODE STREQUAL "VMODE_NTSC")
set(region ${NTSC_REGION})
endif()
-set(license $ENV{PSXSDK_PATH}/share/licenses/info${region}.dat)
+add_custom_target(bin_cue ALL
+ ${TOOLS_PREFIX}/bin/mkpsxiso -q ${CMAKE_BINARY_DIR}/wnix.xml
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
-add_custom_target(bin_cue ALL mkpsxiso ${PROJECT_NAME}.iso ${PROJECT_NAME}.bin
- ${license} -s DEPENDS iso)
+add_dependencies(bin_cue exe tools)
-if(NOT EXISTS "${cdroot}/system.cnf")
- file(COPY "src/ps1/system.cnf" DESTINATION "${cdroot}")
-endif()
+set(cflags ${cflags})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(cflags ${cflags} -Og)
else()
- set(cflags ${cflags} -Os)
+ set(cflags ${cflags} -O3 -g)
endif()
-
-set(cflags ${cflags} -fshort-enums)
-# libfixmath is already bundled with PSXSDK.