Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename libsmb2_ips to rpc and others to libsmb2. #356

Merged
merged 3 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions Makefile.platform
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
26 changes: 7 additions & 19 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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})
Expand All @@ -256,4 +244,4 @@ install(TARGETS smb2 EXPORT smb2
ARCHIVE DESTINATION lib${LIB_SUFFIX}
LIBRARY DESTINATION lib${LIB_SUFFIX})
endif()
endif()
endif()
2 changes: 1 addition & 1 deletion lib/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ struct sockaddr_storage {
#include <loadcore.h>
#endif

#ifdef PS2IPS
#ifdef PS2RPC
#include <ps2ips.h>
#else
#include <ps2ip.h>
Expand Down