blob: 4f3744f7e85413dc8ee06adbc95cde6b79c0fd3b (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
TOOLPATH = /opt/mips64-toolchain
LIBN64PATH = $(TOOLPATH)/hkz-libn64/
GCCN64PREFIX = $(TOOLPATH)/bin/mips64-
srcdir = ../../..
VPATH = $(srcdir)
CC = $(GCCN64PREFIX)gcc
CXX = $(GCCN64PREFIX)g++
AS = $(GCCN64PREFIX)as
LD = $(GCCN64PREFIX)g++
OBJCOPY = $(GCCN64PREFIX)objcopy
AR = $(GCCN64PREFIX)ar cru
RANLIB = $(GCCN64PREFIX)ranlib
DEFINES += -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DENABLE_VKEYBD -DUSE_ZLIB
LIBS += -lpakfs -lframfs -ln64 -ln64utils -lromfs
#DEFINES += -D_ENABLE_DEBUG_
USE_LIBMAD=0
USE_LIBOGG=1
ifeq ($(USE_LIBMAD),1)
DEFINES += -DUSE_MAD
LIBS += -lmad
endif
ifeq ($(USE_LIBOGG), 1)
DEFINES += -DUSE_VORBIS -DUSE_TREMOR
LIBS += -lvorbisidec
endif
LIBS += -lm -lstdc++ -lc -lgcc -lz -lnosys
CXXFLAGS = -g -mno-extern-sdata -O2 --param max-inline-insns-auto=20 -fomit-frame-pointer -march=vr4300 -mtune=vr4300 -mhard-float -fno-rtti -fno-exceptions -Wno-multichar -Wshadow -I$(LIBN64PATH) -I$(TOOLPATH)/include -I./ -I$(srcdir) -I$(srcdir)/engines
LDFLAGS = -g -march=vr4300 -mtune=vr4300 -nodefaultlibs -nostartfiles -mno-crt0 -L$(LIBN64PATH) -L$(TOOLPATH)/lib $(LIBS) -T n64ld_cpp.x -Xlinker -Map -Xlinker scummvm.map
TARGET = scummvm
DEPDIR = .deps
CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP
MKDIR = mkdir -p
RM = rm -f
RM_REC = rm -rf
VERBOSE_BUILD=1
HAVE_GCC3=1
USE_RGB_COLOR=0
ENABLED=STATIC_PLUGIN
#ENABLE_SCUMM = $(ENABLED)
#ENABLE_SCI = $(ENABLED)
#ENABLE_GOB = $(ENABLED)
#ENABLE_PARALLACTION = $(ENABLED)
#ENABLE_KYRA = $(ENABLED)
#ENABLE_AGOS = $(ENABLED)
#ENABLE_AGI = $(ENABLED)
#ENABLE_QUEEN = $(ENABLED)
#ENABLE_MADE = $(ENABLED)
#ENABLE_SAGA = $(ENABLED)
#ENABLE_TEENAGENT = $(ENABLED)
#ENABLE_DRACI = $(ENABLED)
OBJS := nintendo64.o osys_n64_base.o osys_n64_events.o osys_n64_utilities.o pakfs_save_manager.o framfs_save_manager.o
BACKEND := n64
include $(srcdir)/Makefile.common
MODULE_DIRS += ./
all: $(TARGET).v64
$(TARGET).v64: $(TARGET).bin ROMFS.img bootcode
cat bootcode $(TARGET).bin ROMFS.img > $(TARGET).v64
./pad_rom.sh $(TARGET).v64
ROMFS.img:
genromfs -f ./ROMFS.img -d ./ROMFS -V romtest
$(TARGET).elf: $(OBJS)
$(LD) -o $(TARGET).elf $(OBJS) $(LDFLAGS)
$(TARGET).bin : $(TARGET).elf
$(OBJCOPY) $(TARGET).elf $(TARGET).bin -O binary
spotless : distclean
$(RM) *.bin *.elf *.v64 *.img *.bak *.tmp *.map
send: $(TARGET).v64
sudo ucon64 --xv64 $(TARGET).v64
|