Changeset 189 in Main


Ignore:
Timestamp:
Sep 29, 2024, 9:37:00 AM (7 weeks ago)
Author:
Nishi
Message:

will try to fix ps2 later

Location:
trunk
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Platform/ps2.mk

    r187 r189  
    33PREFIX = /dev_hdd0/httpd
    44
    5 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
     5CC = mips64r5900el-ps2-elf-gcc
     6AR = mips64r5900el-ps2-elf-ar
     7CFLAGS = -O2 -D_EE -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include
     8LDFLAGS = -T/usr/local/ps2dev/ps2sdk/ee/startup/linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -O2
     9LIBS = -ldebug -lsocket
    1010EXEC = .elf
    1111LIB = .so
    1212MODULE =
    13 SERVADD = ppu-strip tewi.elf -o tewi_strip.elf
    14 TARGET = tewi.pkg
     13SERVADD = mips64r5900el-ps2-elf-strip tewi.elf -o tewi_strip.elf
  • trunk/Server/Makefile

    r187 r189  
    66.SUFFIXES: .c .o
    77
    8 OBJS = version.o main.o config.o server.o http.o module.o strptime.o $(EXTOBJS) $(PREOBJS)
     8OBJS = main.o version.o config.o server.o http.o module.o strptime.o $(EXTOBJS) $(PREOBJS)
    99
    1010all: tewi$(EXEC) $(TARGET)
     
    1313
    1414tewi$(EXEC): $(OBJS) ../Common/common.a
    15         $(CC) $(LDFLAGS) $(EXTLDFLAGS) -o $@ $(OBJS) $(EXTLIBS) $(LIBS) ../Common/common.a
     15        $(CC) $(LDFLAGS) $(EXTLDFLAGS) -o $@ $(OBJS) $(EXTLIBS) ../Common/common.a $(LIBS)
    1616        $(SERVADD)
    1717
  • trunk/Server/config.c

    r187 r189  
    106106#elif defined(__PPU__)
    107107        strcpy(config.hostname, "ps3");
     108#elif defined(__ps2sdk__)
     109        strcpy(config.hostname, "ps2");
    108110#else
    109111        gethostname(config.hostname, 1024);
  • trunk/Server/main.c

    r187 r189  
    55#include "../config.h"
    66
     7#include <unistd.h>
    78#include <stdio.h>
    89#include <stdbool.h>
     
    4041#define printf(...) pspDebugScreenPrintf(__VA_ARGS__)
    4142#define STDERR_LOG(...) pspDebugScreenPrintf(__VA_ARGS__)
     43#elif defined(__ps2sdk__)
     44#include <debug.h>
     45#include <sifrpc.h>
     46
     47#define printf(...) scr_printf(__VA_ARGS__)
     48#define STDERR_LOG(...) scr_printf(__VA_ARGS__)
    4249#else
    4350#define STDERR_LOG(...) fprintf(stderr, __VA_ARGS__)
     
    244251        printf("PS3 Bootstrap, Tewi/%s\n", tw_get_version());
    245252        netInitialize();
     253#elif defined(__ps2sdk__)
     254        SifInitRpc(0);
     255        init_scr();
     256        scr_printf("PS2 Bootstrap, Tewi/%s\n", tw_get_version());
     257        while(1)
     258                ;
    246259#endif
    247260        int st = startup(argc, argv);
  • trunk/Server/module.c

    r187 r189  
    1616extern struct tw_config config;
    1717
    18 #if defined(_PSP) || defined(__PPU__)
     18#if defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__)
    1919void* tw_module_load(const char* path) { return NULL; }
    2020
  • trunk/Server/server.c

    r187 r189  
    6262#endif
    6363
    64 #ifdef _PSP
     64#if defined(_PSP) || defined(__ps2sdk__)
    6565#include "strptime.h"
    6666#endif
     
    522522                                        struct tm tm;
    523523                                        strptime(req.headers[i + 1], "%a, %d %b %Y %H:%M:%S GMT", &tm);
    524 #if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__)
     524#if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__)
    525525                                        time_t t = 0;
    526526                                        struct tm* btm = localtime(&t);
  • trunk/Server/strptime.h

    r182 r189  
    88#include <time.h>
    99
    10 #if defined(_WIN32) || defined(_PSP)
     10#if defined(_WIN32) || defined(_PSP) || defined(__ps2sdk__)
    1111char* strptime(const char *buf, const char *fmt, struct tm *tm);
    1212#endif
  • trunk/config.h.tmpl

    r187 r189  
    2828#endif
    2929
    30 #if (defined(_PSP) || defined(__PPU__)) && !defined(NO_IPV6)
     30#if (defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__)) && !defined(NO_IPV6)
    3131#define NO_IPV6
    32 /* PSP/PS3 does not have IPv6 */
     32/* PSP/PS2/PS3 does not have IPv6 */
    3333#endif
    3434
    35 #if (defined(_PSP)) && defined(USE_POLL)
     35#if (defined(_PSP) || defined(__ps2sdk__)) && defined(USE_POLL)
    3636#undef USE_POLL
    37 /* Force select(2) for PSP */
     37/* Force select(2) for PSP/PS2 */
    3838#endif
    3939
    40 #if (defined(_PSP) || defined(__PPU__)) && defined(HAS_CHROOT)
     40#if (defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__)) && defined(HAS_CHROOT)
    4141#undef HAS_CHROOT
    42 /* PSP/PS3 should not have chroot */
     42/* PSP/PS2/PS3 should not have chroot */
    4343#endif
    4444
    45 #if (defined(_PSP) || defined(__PPU__)) && !defined(NO_GETADDRINFO)
     45#if (defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__)) && !defined(NO_GETADDRINFO)
    4646#define NO_GETADDRINFO
    47 /* PSP/PS3 should not have getaddrinfo */
     47/* PSP/PS2/PS3 should not have getaddrinfo */
    4848#endif
    4949
Note: See TracChangeset for help on using the changeset viewer.