forked from glee3way/psx4all
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.giz
215 lines (174 loc) · 5.25 KB
/
Makefile.giz
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
203
204
205
206
207
208
209
210
211
212
213
214
215
NAME = psx4all.exe
O = o
#UNAI=1
ZOTTD=1
ifdef ZOTTD
CC = /opt/cegcc/bin/arm-wince-cegcc-gcc
CXX = /opt/cegcc/bin/arm-wince-cegcc-g++
AS = /opt/cegcc/bin/arm-wince-cegcc-as
AR = /opt/cegcc/bin/arm-wince-cegcc-ar
STRIP = /opt/cegcc/bin/arm-wince-cegcc-strip
INCS = /opt/cegcc/arm-wince-cegcc/include
LD = /opt/cegcc/bin/arm-wince-cegcc-g++
WRES = /opt/cegcc/bin/arm-wince-cegcc-windres
endif
STD_PSXREC=1
NAME = psx4all_std_rec.exe
PROG = $(NAME)
USE_HLE=1
#NEWSPU=1
GPUAPI=1
#NEWGPU=1
#DUMMYGPU=1
NULLSPU=1
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 = -march=armv5t -mtune=xscale -DGIZMONDO -DARM_ARCH -DDATA_PREFIX=\"example/\" -DROM_PREFIX=\"./\" -Isrc -Isrc/giz_sdl -I$(INCS)
LDFLAGS = -L/opt/mingw32ce/arm-wince-mingw32ce/lib -lSDL -lzlib
MORE_CFLAGS = -msoft-float -O3 --param max-inline-insns-single=800 -ftemplate-depth-36
MORE_CFLAGS += -ffast-math -fstrict-aliasing -mstructure-size-boundary=32 -fexpensive-optimizations
MORE_CFLAGS += -fweb -frename-registers -fomit-frame-pointer
MORE_CFLAGS += -falign-functions=32 -falign-loops -falign-labels -falign-jumps
MORE_CFLAGS += -finline -finline-functions -fno-builtin -fno-common
MORE_CFLAGS += -funroll-loops -fstrength-reduce
MORE_CFLAGS += -fsigned-char
MORE_CFLAGS += -DLSB_FIRST -DSIGNED_SAMPLES -DACORN -DINLINE="inline"
MORE_CFLAGS +=
MORE_CFLAGS += -DMITSHM $(DEFS) -DUNZIP_SUPPORT -DZLIB -DHAVE_MKSTEMP -DHAVE_STRINGS_H
#'-DACCEPT_SIZE_T=int'
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
CPPFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
ASFLAGS = -c $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
#all: $(PROG)
ASM_OBJS = src/arm/memcmp.S \
src/arm/memcpy.S \
src/arm/memset.S \
src/arm/strcmp.S \
src/arm/strlen.S \
src/arm/strncmp.S
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/giz_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_callback.o \
src/franspu/spu_dma.o \
src/franspu/spu_registers.o \
src/franspu/spu_output_sdl.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/recompiler2/arm/arm_std_rec_big.o
OBJS += src/recompiler3/arm/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/arm/disasm.o
OBJS += src/recompiler3/arm/mips_disasm.o
#ASM_OBJS += src/recompiler3/arm/arm.S
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
ASM_OBJS += src/gpuAPI/newGPU/ARM_asm.s
RC_OBJ = src/giz_sdl/psx4ppcppc.rc
%.o: %.cpp
${CXX} -fpeel-loops ${CFLAGS} -c -o $@ $<
%.o: %.s
${CXX} -fpeel-loops ${CFLAGS} -c -o $@ $<
%.o: %.c
${CC} -fpeel-loops ${CFLAGS} -c -o $@ $<
all: ${OBJS} ${GPU_OBJS}
${WRES} ${RC_OBJ} ${RC_OBJ}.rsc
${LD} -O3 ${CFLAGS} ${ASM_OBJS} ${GPU_OBJS} ${OBJS} ${RC_OBJ}.rsc -o ${PROG} ${LDFLAGS}
#/opt/mingw32ce/bin/arm-wince-mingw32ce-objdump ${PROG} -p
#${STRIP} ${PROG}
#$(PROG): $(OBJS) $(GPU_OBJS) $(ASM_OBJS)
# $(LD) $(CFLAGS) -o $(PROG) $(OBJS) $(GPU_OBJS) $(ASM_OBJS) $(LDFLAGS) -s
# $(STRIP) $(PROG)
run: $(PROG)
./$(PROG) example
clean:
$(RM) $(PROG) $(OBJS) $(GPU_OBJS) ${RC_OBJ}.rsc
test:
$(CXX) $(CFLAGS) -S -o src/arm/arm_std_rec.S src/arm/arm_std_rec.cpp
test2:
$(CXX) $(CFLAGS) -S -o src/misc.S src/misc.cpp