forked from glee3way/psx4all
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.iphone
242 lines (198 loc) · 5.63 KB
/
Makefile.iphone
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
VERSION = 0.3.0
O = o
ZODTTD=1
ifdef ZODTTD
CC = /usr/local/bin/arm-apple-darwin8-gcc
CXX = /usr/local/bin/arm-apple-darwin8-g++
AS = /usr/local/bin/arm-apple-darwin8-g++
AR = /usr/local/bin/arm-apple-darwin8-ar
STRIP = /usr/local/bin/arm-apple-darwin8-strip
INC =
INCS = ${INC}
LD = /usr/local/bin/arm-apple-darwin8-g++
LDFLAGS = \
-lobjc \
-framework CoreFoundation \
-framework Foundation \
-framework UIKit \
-framework LayerKit \
-framework CoreGraphics \
-framework GraphicsServices \
-framework CoreSurface \
-framework CoreAudio \
-framework Celestial \
-framework AudioToolbox \
-lz
endif
#STD_INTERP=1
#NAME = psx4allint
STD_PSXREC=1
NAME = psx4all
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 = -DIPHONE -DARM_ARCH -DDATA_PREFIX=\"example/\" -DROM_PREFIX=\"./\" -Isrc -Isrc/iphone -I$(INCS)
#-mcpu=arm1176jzf-s
MORE_CFLAGS =
MORE_CFLAGS += -mhard-float -march=armv6 -maspen-version-min=1.0 -O3 -ftemplate-depth-36
MORE_CFLAGS += -fomit-frame-pointer
MORE_CFLAGS += -mstructure-size-boundary=32 -falign-functions=32 -falign-loops -falign-labels -falign-jumps -fno-builtin -fno-common
MORE_CFLAGS += -frename-registers -finline -finline-functions
MORE_CFLAGS += -fstrict-aliasing -fexpensive-optimizations -fweb -funroll-loops -fstrength-reduce
MORE_CFLAGS += -fsigned-char
MORE_CFLAGS += -DLSB_FIRST -DSIGNED_SAMPLES -DACORN -DINLINE="inline"
MORE_CFLAGS += -DVERSION='"$(VERSION)"'
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/iphone/minimal.o \
src/iphone/main.o \
src/iphone/app.o \
src/iphone/ControllerView.o \
src/iphone/MainView.o \
src/iphone/FileTable.o \
src/iphone/FileBrowser.o \
src/iphone/EmulationView.o \
src/iphone/ScreenView.o \
src/iphone/app_iPhone.o \
src/iphone/JoyPad.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_iphone.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
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
# src/gpuAPI/drhellGPU/GPU.o
ASM_OBJS += src/iphone/ARM_asm.s
%.o: %.cpp
${CXX} -fpeel-loops ${CFLAGS} -c -o $@ $<
%.o: %.m
${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}
${LD} -O3 ${ASM_OBJS} ${CFLAGS} ${GPU_OBJS} ${OBJS} -o ${PROG} ${LDFLAGS}
# ${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)
test:
$(CXX) $(CFLAGS) -S -o src/main.cpp.S src/main.cpp
test2:
$(CXX) $(CFLAGS) -S -o src/misc.S src/misc.cpp