diff --git a/CMakeLists.txt b/CMakeLists.txt index d5c957da..c378a134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,8 +158,8 @@ endif() add_compile_options("${CMAKE_C_FLAGS}") elseif(EE) add_definitions(-DNEED_BE64TOH -DNEED_POLL -DNEED_WRITEV -DNEED_READV -DNEED_GETLOGIN_R) - if(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) diff --git a/Makefile.platform b/Makefile.platform index 02d602ae..e3d804dd 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..8ffa5fce 100644 --- a/README +++ b/README @@ -215,17 +215,17 @@ 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 + $ make -f Makefile.platform ps2_rpc_install IOP, IO-Processor is the secondary CPU for the PS2. The library is been used to build smb2man.irx module but it doesn´t comes with the library installed, To install libsmb2 for the PS2 IOP and smb2man.irx, first install the PS2 toolchain and PS2SDK and set it up. diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e4b8518d..eb016bed 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -177,18 +177,11 @@ set(HEADERS ${SMB2_INCLUDE}/smb2-errors.h ${SMB2_INCLUDE}/smb2.h) -if(EE 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 - VERSION ${PROJECT_VERSION} - SOVERSION ${SOVERSION}) -elseif(EE AND PS2IPS) +if(EE AND PS1RPC) 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 +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(IOP AND NOT BUILD_IRX) @@ -228,13 +221,8 @@ else() endif() if(NOT PICO_BOARD OR NOT ESP_PLATFORM) -if(EE AND NOT PS2IPS) -install(TARGETS smb2_ip EXPORT smb2_ip - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib${LIB_SUFFIX} - LIBRARY DESTINATION lib${LIB_SUFFIX}) -elseif(EE AND PS2IPS) -install(TARGETS smb2_ips EXPORT smb2_ips +if(EE AND PS2RPC) +install(TARGETS smb2_ips EXPORT smb2_rpc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib${LIB_SUFFIX} LIBRARY DESTINATION lib${LIB_SUFFIX}) @@ -256,4 +244,4 @@ install(TARGETS smb2 EXPORT smb2 ARCHIVE DESTINATION lib${LIB_SUFFIX} LIBRARY DESTINATION lib${LIB_SUFFIX}) endif() -endif() \ No newline at end of file +endif() 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