diff --git a/CMakeLists.txt b/CMakeLists.txt index d684873b..59deecf1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -248,12 +248,12 @@ else() add_compile_options("${CMAKE_C_FLAGS}") elseif(EE) add_definitions(-DNEED_BE64TOH -DNEED_POLL -DNEED_WRITEV -DNEED_READV -DNEED_GETLOGIN_R) - if(PLATFORM_PS2 AND EE AND PS2IPS) - add_definitions(-DPS2IPS) + if(EE AND PS2RPC) + add_definitions(-DPS2RPC) endif() elseif(IOP) add_definitions(-DHAVE_CONFIG_H -DNEED_BE64TOH -DNEED_STRDUP -DNEED_READV -DNEED_WRITEV -DNEED_POLL -DNEED_GETPID -DNEED_RANDOM -DNEED_SRANDOM -DNEED_GETLOGIN_R -DHAVE_STRING_H -DHAVE_SYS_FCNTL_H) - if(PLATFORM_PS2 AND IOP AND BUILD_IRX) + if(IOP AND BUILD_IRX) add_definitions(-D__ps2sdk_iop__) endif() set(CMAKE_C_FLAGS "-Wall") diff --git a/Makefile.platform b/Makefile.platform index 9762ae03..f7efc99d 100644 --- a/Makefile.platform +++ b/Makefile.platform @@ -73,11 +73,11 @@ ps2_ee_all: ps2_ee_install: ps2_ee_all cmake --build build --target install -ps2_ips_all: - cmake -S . -B build -DPS2IPS=1 "-DCMAKE_TOOLCHAIN_FILE=${PS2DEV}/share/ps2dev.cmake" "-DCMAKE_INSTALL_PREFIX=${PS2SDK}/ports" "-DCMAKE_INSTALL_PREFIX=${PS2SDK}/ports" +ps2_rpc_all: + cmake -S . -B build -DPS2RPC=1 "-DCMAKE_TOOLCHAIN_FILE=${PS2DEV}/share/ps2dev.cmake" "-DCMAKE_INSTALL_PREFIX=${PS2SDK}/ports" "-DCMAKE_INSTALL_PREFIX=${PS2SDK}/ports" cmake --build build -ps2_ips_install: ps2_ips_all +ps2_rpc_install: ps2_rpc_all cmake --build build --target install ps2_iop_all: diff --git a/README b/README index 285abd5b..6754c5df 100644 --- a/README +++ b/README @@ -215,15 +215,15 @@ EE, Emotion-Engine, is the main CPU for the PS2. To compile libsmb2 for the PS2 EE, first install the PS2 toolchain and PS2 SDK and set it up. -To build libsmb2_ip.a, a version of libsmb2 for the EE tcpip stack: +To build libsmb2.a, a version of libsmb2 for the EE tcpip stack: $ make -f Makefile.platform clean $ make -f Makefile.platform ps2_ee_install EE Using IOP Stack, It´s a different of EE -version for when the LWIP stack is running on the IOP (libsmb2_ips and linking +version for when the LWIP stack is running on the IOP (libsmb2_rpc and linking with -lps2ips) -To build libsmb2_ips.a, a version of libsmb2 for the IOP tcpip stack: +To build libsmb2_rpc.a, a version of libsmb2 for ee with IOP tcpip stack: $ make -f Makefile.platform clean $ make -f Makefile.platform ps2_ips_install diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7f437368..808c053d 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -58,27 +58,13 @@ set(HEADERS ${SMB2_INCLUDE}/smb2-errors.h ${SMB2_INCLUDE}/smb2.h) -if(EE AND NOT PLATFORM_PS2 AND NOT PS2IPS) -add_library(smb2_ip ${SOURCES} ${HEADERS}) -target_link_libraries(smb2_ip PUBLIC ${core_DEPENDS} ${CORE_LIBRARIES}) -target_include_directories(smb2_ip PUBLIC ${INCLUDE_PATH}) -set_target_properties(smb2_ip PROPERTIES +if(EE AND PS2RPC) +add_library(smb2_rpc ${SOURCES} ${HEADERS}) +target_link_libraries(smb2_rpc PUBLIC ${core_DEPENDS} ${CORE_LIBRARIES}) +target_include_directories(smb2_rpc PUBLIC ${INCLUDE_PATH}) +set_target_properties(smb2_rpc PROPERTIES VERSION ${PROJECT_VERSION} - SOVERSION ${SOVERSION}) -elseif(PLATFORM_PS2 AND EE AND PS2IPS) -add_library(smb2_ips ${SOURCES} ${HEADERS}) -target_link_libraries(smb2_ips PUBLIC ${core_DEPENDS} ${CORE_LIBRARIES}) -target_include_directories(smb2_ips PUBLIC ${INCLUDE_PATH}) -set_target_properties(smb2_ips PROPERTIES - VERSION ${PROJECT_VERSION} - SOVERSION ${SOVERSION}) -elseif(IOP) -add_library(smb2_iop ${SOURCES} ${HEADERS}) -target_link_libraries(smb2_iop PUBLIC ${core_DEPENDS} ${CORE_LIBRARIES}) -target_include_directories(smb2_iop PUBLIC ${INCLUDE_PATH}) -set_target_properties(smb2_iop PROPERTIES - VERSION ${PROJECT_VERSION} - SOVERSION ${SOVERSION}) + SOVERSION ${SOVERSION}) else() add_library(smb2 ${SOURCES} ${HEADERS}) target_link_libraries(smb2 PUBLIC ${core_DEPENDS} ${CORE_LIBRARIES}) @@ -97,21 +83,11 @@ else() endif() endif() -if(EE AND NOT PLATFORM_PS2 AND NOT PS2IPS) -install(TARGETS smb2_ip EXPORT smb2_ip +if(EE AND PS2RPC) +install(TARGETS smb2_rpc EXPORT smb2_rpc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib${LIB_SUFFIX} - LIBRARY DESTINATION lib${LIB_SUFFIX}) -elseif(PLATFORM_PS2 AND EE AND PS2IPS) -install(TARGETS smb2_ips EXPORT smb2_ips - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib${LIB_SUFFIX} - LIBRARY DESTINATION lib${LIB_SUFFIX}) -elseif(IOP) -install(TARGETS smb2_iop EXPORT smb2_iop - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib${LIB_SUFFIX} - LIBRARY DESTINATION lib${LIB_SUFFIX}) + LIBRARY DESTINATION lib${LIB_SUFFIX}) else() install(TARGETS smb2 EXPORT smb2 RUNTIME DESTINATION bin diff --git a/lib/compat.h b/lib/compat.h index 7f564cd0..99c7803b 100644 --- a/lib/compat.h +++ b/lib/compat.h @@ -436,7 +436,7 @@ struct sockaddr_storage { #include #endif -#ifdef PS2IPS +#ifdef PS2RPC #include #else #include