forked from glee3way/psx4all
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.dingoo
202 lines (166 loc) · 5.13 KB
/
Makefile.dingoo
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#DESKTOP=1
USE_HLE=1
NEWSPU=1
GPUAPI=1
#DUMMYGPU=1
NULLSPU=1
ifdef DESKTOP
CC = gcc # not 64-bit-safe
CXX = g++
INC = /usr/include
INCS = ${INC} -I${INC}/SDL
LD = g++
LDFLAGS= `sdl-config --libs` -lz
MACHINE_CFLAGS = -O2 -m32
else
CC = mipsel-linux-cc
CXX = mipsel-linux-c++
AS = mipsel-linux-as
STRIP = mipsel-linux-strip
INC = /opt/mipsel-linux-uclibc/usr/include
INCS = ${INC} -I${INC}/SDL
LD = mipsel-linux-c++
LDFLAGS = -lSDL -lz -pthread -static
MACHINE_CFLAGS = -O3 -fpeel-loops -march=mips32 -mno-long-calls -mno-shared -mno-abicalls
endif
ifdef DESKTOP
STD_INTERP=1
NAME = psx4all_std_int.gpe
else
STD_PSXREC=1
NAME = psx4all_std_rec.gpe
endif
PROG = $(NAME)
TOOLS = cbin
DEFS += -DUSE_OLD_COUNTERS
#DEFS += -DNOSOUND
#DEFS += -DNO_RENDER
#DEFS += -DEMU_LOG -DLOG_STDOUT
#DEFS += -DPROFILER_PSX4ALL
#DEFS += -DPROFILER_SDL
#DEFS += -DAUTOEVENTS=4000
#DEFS += -DMAXFRAMES=4000
#DEFS += -DNOTHREADLIB
#DEFS += -DGP2X_SDLWRAPPER_NODOUBLEBUFFER
ifdef STD_INTERP
DEFS += -DINTERP
endif
ifdef STD_PSXREC
DEFS += -DDYNAREC
endif
ifdef USE_HLE
DEFS += -DWITH_HLE
endif
DEFAULT_CFLAGS = -DGP2X_SDL -DARM_ARCH -DDATA_PREFIX=\"example/\" -DROM_PREFIX=\"./\" -Isrc -Isrc/sdl -I$(INCS)
MORE_CFLAGS = -funroll-loops -g -Wall -Wno-sign-compare
MORE_CFLAGS += -fsigned-char -fno-exceptions -fno-rtti
MORE_CFLAGS += -DLSB_FIRST -DSIGNED_SAMPLES -DINLINE="inline"
MORE_CFLAGS += -Wno-unused-value $(MACHINE_CFLAGS)
MORE_CFLAGS += -DMITSHM $(DEFS) -DUNZIP_SUPPORT -DZLIB -DHAVE_MKSTEMP -DHAVE_STRINGS_H
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
CPPFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
ASFLAGS = -c $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
OBJS = \
src/main.o \
src/cdrom.o \
src/decode_xa.o \
src/mdec.o \
src/misc.o \
src/bios.o \
src/dma.o \
src/hle.o \
src/hw.o \
src/components.o \
src/pad.o \
src/sio.o \
src/spu.o \
src/sdl/minimal.o \
OBJS += src/cdr/oldversion/cdriso.o
#OBJS += src/cdr/CDDAData.o
#OBJS += src/cdr/FileInterface.o
#OBJS += src/cdr/Globals.o
#OBJS += src/cdr/Open.o
#OBJS += src/cdr/SubchannelData.o
#OBJS += src/cdr/TrackParser.o
#OBJS += src/cdr/unrar/unrarlib.o
#OBJS += src/cdr/bzip/blocksort.o
#OBJS += src/cdr/bzip/bzlib.o
#OBJS += src/cdr/bzip/compress.o
#OBJS += src/cdr/bzip/crctable.o
#OBJS += src/cdr/bzip/decompress.o
#OBJS += src/cdr/bzip/huffman.o
#OBJS += src/cdr/bzip/randtable.o
ifdef NULLSPU
OBJS += src/nullspu/spu_core.o
else
ifdef NEWSPU
OBJS += \
src/franspu/spu.o \
src/franspu/spu_dma.o \
src/franspu/spu_registers.o \
src/franspu/spu_output.o
else
OBJS += \
src/petespu/stdafx.o \
src/petespu/adsr.o \
src/petespu/spu_dma.o \
src/petespu/freeze.o \
src/petespu/oss.o \
src/petespu/registers.o \
src/petespu/reverb.o \
src/petespu/spu.o \
src/petespu/xa.o
endif
endif
ifdef STD_INTERP
OBJS += src/interpreter/interpreter.o
OBJS += src/r3000a_new.o
OBJS += src/counters_new.o
OBJS += src/gte_pcsx.o
OBJS += src/gte_mame.o
OBJS += src/mem.o
endif
ifdef STD_PSXREC
OBJS += src/interpreter/interpreter.o
OBJS += src/recompiler3/mips/recompiler.o
OBJS += src/r3000a_new.o
OBJS += src/counters_new.o
OBJS += src/gte_pcsx.o
OBJS += src/gte_mame.o
OBJS += src/mem.o
OBJS += src/recompiler3/mips/mips_disasm.o
OBJS += src/recompiler3/mips/mips.o
endif
GPU_OBJS = src/gpuAPI/gpuAPI.o \
src/gpuAPI/newGPU/newGPU.o \
src/gpuAPI/newGPU/fixed.o \
src/gpuAPI/newGPU/core_Command.o \
src/gpuAPI/newGPU/core_Dma.o \
src/gpuAPI/newGPU/core_Draw.o \
src/gpuAPI/newGPU/core_Misc.o \
src/gpuAPI/newGPU/raster_Sprite.o \
src/gpuAPI/newGPU/raster_Poly.o \
src/gpuAPI/newGPU/raster_Line.o \
src/gpuAPI/newGPU/raster_Image.o \
src/gpuAPI/newGPU/inner.o
%.o: %.cpp
${CXX} ${CFLAGS} -c -o $@ $<
%.o: %.s
${CXX} ${CFLAGS} -c -o $@ $<
%.o: %.c
${CC} ${CFLAGS} -c -o $@ $<
all: ${PROG} ${TOOLS}
${PROG}: ${OBJS} ${GPU_OBJS}
${LD} ${CFLAGS} ${CFLAGS} ${GPU_OBJS} ${OBJS} -o ${PROG} ${LDFLAGS}
strip: ${PROG} ${TOOLS}
${STRIP} ${PROG} $(TOOLS}
cbin: tools/cbin.c tools/cbin.h
cc -Wall -O2 -o $@ $< -lz
clean:
$(RM) $(PROG) $(OBJS) $(GPU_OBJS) $(TOOLS)
test2:
$(CXX) $(CFLAGS) -S -o src/misc.S src/misc.cpp
src/recompiler3/mips/recompiler.o: src/recompiler3/mips/recompiler.cpp src/recompiler3/mips/mips_codegen.h src/recompiler3/mips/mips_std_rec_calls.cpp src/recompiler3/mips/mips_std_rec_globals.cpp src/recompiler3/mips/defines.h src/recompiler3/mips/disasm.h src/recompiler3/mips/rec_bcu.cpp.h src/recompiler3/mips/rec_cpo.h src/recompiler3/mips/rec_lsu.cpp.h \
src/recompiler3/mips/mips_dpimacros.h src/recompiler3/mips/mips_std_rec_debug.cpp src/recompiler3/mips/mips_std_rec_regcache.cpp src/recompiler3/mips/externs.h src/recompiler3/mips/rec_alu.cpp.h src/recompiler3/mips/rec_cp0.cpp.h src/recompiler3/mips/rec_gte.cpp.h src/recompiler3/mips/rec_mdu.cpp.h src/recompiler3/mips/recompiler.h
src/recompiler3/mips/recompiler.o: src/generator/mips/generator.cpp.h src/generator/mips/gen_helper.cpp.h src/generator/mips/gen_alu.cpp.h
src/gpuAPI/newGPU/core_Draw.o: src/gpuAPI/newGPU/inner_Blit.h