aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2/Makefile.ps2
blob: 204f4f7a165d138b2133646bc8ace82ff50e51fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# $Header: Exp $
include $(PS2SDK)/Defs.make

DISABLE_SCALERS = true
DISABLE_HQ_SCALERS = true
# DISABLE_KYRA = true
HAVE_GCC3 = true

CC		= ee-gcc
CXX     = ee-g++
AS      = ee-gcc
LD      = ee-gcc
AR      = ee-ar cru
RANLIB  = ee-ranlib
STRIP   = ee-strip
MKDIR 	= mkdir -p
RM 	= rm -f

srcdir = ../../..
VPATH = $(srcdir)
INCDIR = ../../../
DEPDIR = .deps

DEFINES  = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_MPEG2 -DUSE_ZLIB -D_EE -D__PLAYSTATION2__ -O2 -Wall -Wno-multichar

# PS2SDK-Ports from ps2dev.org's SVN repository for libmad, zlib and ucl
PS2SDK_PORTS = /mnt/winxp/scummvm/ports
PS2SDK_PORTS_INCS = /ucl /zlib/include /libmad/ee/include
PS2SDK_PORTS_LIBS = /ucl /zlib/lib /libmad/ee/lib

# we also need SjPcm, Tremor and libmpeg2
MORE_LIBS_DIR = /mnt/winxp/scummvm/ports
MORE_LIBS_INCS = /SjPcm/ee/src /mpeg2dec/include /tremor
MORE_LIBS_LIBS = /SjPcm/ee/lib /mpeg2dec/libmpeg2 /tremor/tremor

INCLUDES  = $(addprefix -I$(PS2SDK_PORTS),$(PS2SDK_PORTS_INCS)) 
INCLUDES += $(addprefix -I$(MORE_LIBS_DIR),$(MORE_LIBS_INCS))
INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines

TARGET = elf/scummvm.elf

OBJS := backends/platform/ps2/DmaPipe.o \
    backends/platform/ps2/Gs2dScreen.o \
    backends/platform/ps2/irxboot.o \
	backends/platform/ps2/ps2input.o \
	backends/platform/ps2/ps2pad.o \
	backends/platform/ps2/rawsavefile.o \
    backends/platform/ps2/savefile.o \
	backends/platform/ps2/savefilemgr.o \
    backends/platform/ps2/fileio.o \
    backends/platform/ps2/icon.o \
    backends/platform/ps2/asyncfio.o \
    backends/platform/ps2/cd.o \
    backends/platform/ps2/eecodyvdfs.o \
    backends/platform/ps2/rpckbd.o \
    backends/platform/ps2/systemps2.o \
    backends/platform/ps2/ps2mutex.o \
    backends/platform/ps2/ps2time.o \
	backends/platform/ps2/ps2debug.o
    
MODULE_DIRS += .

include $(srcdir)/Makefile.common

LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile 
LDFLAGS += -L $(PS2SDK)/ee/lib -L .
LDFLAGS += $(addprefix -L$(MORE_LIBS_DIR),$(MORE_LIBS_LIBS))
LDFLAGS += $(addprefix -L$(PS2SDK_PORTS),$(PS2SDK_PORTS_LIBS)) 
LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmpeg2 -lmad -ltremor -lz -lucl -lm -lc -lfileXio -lkernel -lstdc++ 
# LDFLAGS += -s 

all: $(TARGET)

$(TARGET): $(OBJS)
	$(LD) $^ $(LDFLAGS) -o $@