Changeset 187 in Main
- Timestamp:
- Sep 28, 2024, 9:07:34 AM (7 weeks ago)
- Location:
- trunk
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Platform/ps3.mk
r186 r187 1 1 # $Id$ 2 2 3 PREFIX = ms0:/PSP/GAME/httpd3 PREFIX = /dev_hdd0/httpd 4 4 5 CC = p sp-gcc6 AR = p sp-ar7 CFLAGS = -g - std=c99 -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common -I /usr/local/pspdev/psp/sdk/include -D_PSP_FW_VERSION=6008 LDFLAGS = - Wl,-zmax-page-size=128 -L /usr/local/pspdev/psp/sdk/lib9 LIBS = -l pspgum -lpspgu -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspnet -lpspnet_apctl -lcglue -lpspwlan5 CC = ppu-gcc 6 AR = ppu-ar 7 CFLAGS = -g -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common -I /usr/local/ps3dev/ppu/include 8 LDFLAGS = -L /usr/local/ps3dev/ppu/lib 9 LIBS = -lnet -lsysmodule -lsysutil -lrt -llv2 10 10 EXEC = .elf 11 11 LIB = .so 12 12 MODULE = 13 SERVADD = p sp-fixup-imports tewi.elf && psp-strip tewi.elf -o tewi_strip.elf14 TARGET = tewi.p bp13 SERVADD = ppu-strip tewi.elf -o tewi_strip.elf 14 TARGET = tewi.pkg -
trunk/Server/Makefile
r183 r187 22 22 mksfoex -d MEMSIZE=1 'Tewi HTTPd' $@ 23 23 24 tewi.self: tewi_strip$(EXEC) 25 sprxlinker tewi_strip$(EXEC) 26 make_self_npdrm tewi_strip$(EXEC) $@ UP0001-TEWI_00-0000000000000000 27 fself tewi_strip$(EXEC) tewi.fake.self 28 29 tewi.pkg: tewi.self 30 mkdir -p pkg/USRDIR 31 cp /usr/local/ps3dev/bin/ICON0.PNG pkg/ICON0.PNG 32 make_self_npdrm tewi.elf pkg/USRDIR/EBOOT.BIN UP0001-TEWI_00-0000000000000000 33 sfo.py --title "Tewi HTTPd" --appid "TEWI" -f /usr/local/ps3dev/bin/sfo.xml pkg/PARAM.SFO 34 pkg.py --contentid UP0001-TEWI_00-0000000000000000 pkg/ $@ 35 rm -rf pkg 36 24 37 .c.o: 25 38 $(CC) $(CFLAGS) $(EXTCFLAGS) -c -o $@ $< … … 29 42 30 43 clean: 31 rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp 44 rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp *.self *.pkg -
trunk/Server/config.c
r182 r187 102 102 config.server_admin = cm_strdup(SERVER_ADMIN); 103 103 config.defined[0] = NULL; 104 #if def _PSP104 #if defined(_PSP) 105 105 strcpy(config.hostname, "psp"); 106 #elif defined(__PPU__) 107 strcpy(config.hostname, "ps3"); 106 108 #else 107 109 gethostname(config.hostname, 1024); -
trunk/Server/http.c
r147 r187 20 20 #else 21 21 #ifdef USE_POLL 22 #ifdef __PPU__ 23 #include <net/poll.h> 24 #else 22 25 #include <poll.h> 26 #endif 23 27 #else 24 28 #include <sys/select.h> -
trunk/Server/main.c
r183 r187 241 241 } 242 242 printf("Connected, My IP is %s\n", info.ip); 243 #elif defined(__PPU__) 244 printf("PS3 Bootstrap, Tewi/%s\n", tw_get_version()); 245 netInitialize(); 243 246 #endif 244 247 int st = startup(argc, argv); -
trunk/Server/module.c
r182 r187 16 16 extern struct tw_config config; 17 17 18 #if def _PSP18 #if defined(_PSP) || defined(__PPU__) 19 19 void* tw_module_load(const char* path) { return NULL; } 20 20 -
trunk/Server/server.c
r183 r187 43 43 #else 44 44 #ifdef USE_POLL 45 #ifdef __PPU__ 46 #include <net/poll.h> 47 #else 45 48 #include <poll.h> 49 #endif 46 50 #else 47 51 #include <sys/select.h> … … 50 54 #include <arpa/inet.h> 51 55 #include <netinet/in.h> 56 #ifndef __PPU__ 52 57 #include <netinet/tcp.h> 58 #endif 53 59 #ifndef NO_GETADDRINFO 54 60 #include <netdb.h> … … 136 142 return 1; 137 143 } 144 #ifndef __PPU__ 138 145 if(setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*)&yes, sizeof(yes)) < 0) { 139 146 close_socket(sock); … … 141 148 return 1; 142 149 } 150 #endif 143 151 #ifndef NO_IPV6 144 152 int no = 0; … … 431 439 #elif defined(__HAIKU__) 432 440 int32_t tw_server_pass(void* ptr) { 433 #elif defined(_PSP) 441 #elif defined(_PSP) || defined(__PPU__) 434 442 int tw_server_pass(void* ptr) { 435 443 #endif 436 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) 444 #if defined(__HAIKU__) || defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) 437 445 int sock = ((struct pass_entry*)ptr)->sock; 438 446 bool ssl = ((struct pass_entry*)ptr)->ssl; … … 514 522 struct tm tm; 515 523 strptime(req.headers[i + 1], "%a, %d %b %Y %H:%M:%S GMT", &tm); 516 #if defined(__MINGW32__) || defined(_PSP) 524 #if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) 517 525 time_t t = 0; 518 526 struct tm* btm = localtime(&t); … … 919 927 int sock = accept(sockets[i], (struct sockaddr*)&claddr, &clen); 920 928 cm_log("Server", "New connection accepted"); 921 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) 929 #if defined(__MINGW32__) || defined(__HAIKU__) || defined(_PSP) || defined(__PPU__) 922 930 struct pass_entry* e = malloc(sizeof(*e)); 923 931 e->sock = sock; … … 945 953 } 946 954 } 947 #elif defined(_PSP) 955 #elif defined(_PSP) || defined(__PPU__) 948 956 tw_server_pass(e); 949 957 #elif defined(__HAIKU__) -
trunk/Server/tw_config.h
r156 r187 19 19 #define NO_IPV6 20 20 #else 21 #ifdef __PPU__ 22 #include <net/net.h> 23 #endif 21 24 #include <netinet/in.h> 22 25 #ifdef __HAIKU__ -
trunk/Server/version.c
r183 r187 22 22 #elif defined(_PSP) 23 23 "PSP" 24 #elif defined(__PPU__) 25 "PS3" 24 26 #else 25 27 "Unix" -
trunk/config.h.tmpl
r182 r187 28 28 #endif 29 29 30 #if defined(_PSP) && !defined(NO_IPV6)30 #if (defined(_PSP) || defined(__PPU__)) && !defined(NO_IPV6) 31 31 #define NO_IPV6 32 /* PSP does not have IPv6 */32 /* PSP/PS3 does not have IPv6 */ 33 33 #endif 34 34 35 #if defined(_PSP) && defined(USE_POLL)35 #if (defined(_PSP)) && defined(USE_POLL) 36 36 #undef USE_POLL 37 37 /* Force select(2) for PSP */ 38 38 #endif 39 39 40 #if defined(_PSP) && defined(HAS_CHROOT)40 #if (defined(_PSP) || defined(__PPU__)) && defined(HAS_CHROOT) 41 41 #undef HAS_CHROOT 42 /* PSP should not have chroot */42 /* PSP/PS3 should not have chroot */ 43 43 #endif 44 44 45 #if defined(_PSP) && !defined(NO_GETADDRINFO)45 #if (defined(_PSP) || defined(__PPU__)) && !defined(NO_GETADDRINFO) 46 46 #define NO_GETADDRINFO 47 /* PSP should not have getaddrinfo */47 /* PSP/PS3 should not have getaddrinfo */ 48 48 #endif 49 49 -
trunk/psp.sh
r184 r187 3 3 export PSPDEV=/usr/local/pspdev 4 4 export PATH=$PATH:/usr/local/pspdev/bin 5 cat config.h.tmpl | sed -E 's/#undef (NO_SSL)/#define \1/g' > config.h 5 6 rm -rf httpd 6 7 make PLATFORM=psp DESTDIR=httpd/ install
Note:
See TracChangeset
for help on using the changeset viewer.