diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/ps2/Makefile.ps2 | 81 |
1 files changed, 43 insertions, 38 deletions
diff --git a/backends/platform/ps2/Makefile.ps2 b/backends/platform/ps2/Makefile.ps2 index 8d31246ed8..67fc909ec5 100644 --- a/backends/platform/ps2/Makefile.ps2 +++ b/backends/platform/ps2/Makefile.ps2 @@ -1,27 +1,13 @@ # $Header: Exp $ include $(PS2SDK)/Defs.make +#These should point to the extra PS2 libs PS2_EXTRA = /home/tony/GSOC/ps2/sdk-extra PS2_EXTRA_INCS = /zlib/include /libmad/ee/include /SjPcm/ee/src /tremor PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /SjPcm/ee/lib /vorbis /tremor/tremor -# Set to 1 to enable, 0 to disable dynamic modules -DYNAMIC_MODULES = 1 - -VERBOSE_BUILD=0 - -# Test for dynamic plugins -ifeq ($(DYNAMIC_MODULES),1) -ENABLED = DYNAMIC_PLUGIN -DEFINES += -DDYNAMIC_MODULES -PRE_OBJS_FLAGS = -Wl,--whole-archive -POST_OBJS_FLAGS = -Wl,--no-whole-archive -else -ENABLED = STATIC_PLUGIN -endif - -#ENABLE_SCUMM = $(ENABLED) -#ENABLE_SCUMM_7_8 = $(ENABLED) +ENABLE_SCUMM = $(ENABLED) +ENABLE_SCUMM_7_8 = $(ENABLED) ENABLE_HE = $(ENABLED) ENABLE_AGI = $(ENABLED) ENABLE_AGOS = $(ENABLED) @@ -44,39 +30,63 @@ ENABLE_SWORD2 = $(ENABLED) # ENABLE_TINSEL = $(ENABLED) ENABLE_TOUCHE = $(ENABLED) +# Set to 1 to enable, 0 to disable dynamic modules +DYNAMIC_MODULES = 1 +# Set to 1 to enable, 0 to disable more detailed printing of gcc commands +VERBOSE_BUILD=0 +# -------------------------------------------------------------------- + +#General variables +srcdir = ../../.. +VPATH = $(srcdir) TARGET = elf/scummvm.elf #EXECUTABLE = $(TARGET) -HAVE_GCC3 = true +#Variables for common ScummVM makefile +CXX = ee-g++ -G 0 +CXXFLAGS = -O2 -Wall -Wno-multichar -fno-exceptions -fno-rtti +DEFINES = -DUSE_VORBIS -DUSE_MAD -DUSE_TREMOR -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ +LDFLAGS := +INCDIR = ../../../ +INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) +INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines +DEPDIR = .deps +MODULE_DIRS += ./ +MKDIR = mkdir -p +RM = rm -f +RM_REC = rm -rf CC = ee-gcc -G 0 -CXX = ee-g++ -G 0 AS = ee-gcc -G 0 LD = ee-gcc -G 0 AR = ee-ar cru RANLIB = ee-ranlib +HAVE_GCC3 = true STRIP = ee-strip -MKDIR = mkdir -p -RM = rm -f - -srcdir = ../../.. -VPATH = $(srcdir) -INCDIR = ../../../ -DEPDIR = .deps CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP # Variables for dynamic plugin building PLUGIN_PREFIX = PLUGIN_SUFFIX = .plg -PLUGIN_EXTRA_DEPS = plugin.syms elf/scummvm.elf -PLUGIN_LDFLAGS = -nostartfiles -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-q,--just-symbols=elf/scummvm.elf,-Tplugin.ld,--retain-symbols-file,plugin.syms -lstdc++ -lc +PLUGIN_EXTRA_DEPS = plugin.ld plugin.syms elf/scummvm.elf #comment out -mno? +PLUGIN_LDFLAGS = -nostartfiles -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-q,--just-symbols,elf/scummvm.elf,-Tplugin.ld,--retain-symbols-file,plugin.syms -lstdc++ -lc -DEFINES = -DUSE_VORBIS -DUSE_MAD -DUSE_TREMOR -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -O2 -Wall -Wno-multichar -fno-exceptions -fno-rtti +# Test for dynamic plugins +ifeq ($(DYNAMIC_MODULES),1) +ENABLED = DYNAMIC_PLUGIN +DEFINES += -DDYNAMIC_MODULES +PRE_OBJS_FLAGS = -Wl,--whole-archive +POST_OBJS_FLAGS = -Wl,--no-whole-archive +else +ENABLED = STATIC_PLUGIN +endif -INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) -INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines +LDFLAGS += -L $(PS2SDK)/ee/lib -L . +LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS)) +LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++ +LDFLAGS += -s -OBJS := backends/platform/ps2/DmaPipe.o \ +OBJS := backends/platform/ps2/DmaPipe.o \ backends/platform/ps2/Gs2dScreen.o \ backends/platform/ps2/irxboot.o \ backends/platform/ps2/ps2input.o \ @@ -93,16 +103,11 @@ OBJS := backends/platform/ps2/DmaPipe.o \ backends/platform/ps2/ps2time.o \ backends/platform/ps2/ps2debug.o \ backends/platform/ps2/ps2loader.o - -MODULE_DIRS += ./ + include $(srcdir)/Makefile.common LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T main_prog.ld #$(PS2SDK)/ee/startup/linkfile -LDFLAGS += -L $(PS2SDK)/ee/lib -L . -LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS)) -LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++ -LDFLAGS += all: $(TARGET) |