forked from libretro/flycast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.common
257 lines (231 loc) · 8.16 KB
/
Makefile.common
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
DEPS_DIR = $(CORE_DIR)/core/deps
LIBRETRO_COMM_DIR = $(CORE_DIR)/core/libretro-common
INCFLAGS += -I$(CORE_DIR)/core/libretro \
-I$(CORE_DIR)/core/ \
-I$(DEPS_DIR) \
-I$(DEPS_DIR)/picotcp/include \
-I$(DEPS_DIR)/picotcp/modules \
-I$(LIBRETRO_COMM_DIR)/include
CORE_DEFINES += -DNO_MMU
SOURCES_C :=
SOURCES_CXX := \
$(CORE_DIR)/core/hw/arm7/arm_mem.cpp \
$(CORE_DIR)/core/hw/arm7/arm7.cpp \
$(CORE_DIR)/core/hw/arm7/vbaARM.cpp \
$(CORE_DIR)/core/hw/arm7/virt_arm.cpp \
\
$(CORE_DIR)/core/hw/aica/dsp.cpp \
$(CORE_DIR)/core/hw/aica/dsp_interp.cpp \
$(CORE_DIR)/core/hw/aica/aica.cpp \
$(CORE_DIR)/core/hw/aica/aica_if.cpp \
$(CORE_DIR)/core/hw/aica/aica_mem.cpp \
$(CORE_DIR)/core/hw/aica/sgc_if.cpp \
\
$(CORE_DIR)/core/hw/holly/holly_intc.cpp \
$(CORE_DIR)/core/hw/holly/sb.cpp \
$(CORE_DIR)/core/hw/holly/sb_mem.cpp \
\
$(CORE_DIR)/core/hw/gdrom/gdrom_response.cpp \
$(CORE_DIR)/core/hw/gdrom/gdromv3.cpp \
\
$(CORE_DIR)/core/hw/maple/maple_helper.cpp \
$(CORE_DIR)/core/hw/maple/maple_devs.cpp \
$(CORE_DIR)/core/hw/maple/maple_if.cpp \
$(CORE_DIR)/core/hw/maple/maple_cfg.cpp \
\
$(CORE_DIR)/core/hw/mem/_vmem.cpp \
\
$(CORE_DIR)/core/hw/modem/dns.cpp \
$(CORE_DIR)/core/hw/modem/modem.cpp \
$(CORE_DIR)/core/hw/modem/picoppp.cpp \
\
$(CORE_DIR)/core/hw/pvr/drkPvr.cpp \
$(CORE_DIR)/core/hw/pvr/Renderer_if.cpp \
$(CORE_DIR)/core/hw/pvr/pvr_mem.cpp \
$(CORE_DIR)/core/hw/pvr/pvr_regs.cpp \
$(CORE_DIR)/core/hw/pvr/pvr_sb_regs.cpp \
$(CORE_DIR)/core/hw/pvr/spg.cpp \
$(CORE_DIR)/core/hw/pvr/ta.cpp \
$(CORE_DIR)/core/hw/pvr/ta_ctx.cpp \
$(CORE_DIR)/core/hw/pvr/ta_vtx.cpp \
$(CORE_DIR)/core/rend/TexCache.cpp \
\
$(CORE_DIR)/core/hw/sh4/sh4_mmr.cpp \
$(CORE_DIR)/core/hw/sh4/sh4_mem.cpp \
$(CORE_DIR)/core/hw/sh4/sh4_interrupts.cpp \
$(CORE_DIR)/core/hw/sh4/sh4_rom.cpp \
$(CORE_DIR)/core/hw/sh4/sh4_core_regs.cpp \
$(CORE_DIR)/core/hw/sh4/sh4_sched.cpp \
$(CORE_DIR)/core/hw/sh4/sh4_opcode_list.cpp \
$(CORE_DIR)/core/hw/sh4/interpr/sh4_interpreter.cpp \
$(CORE_DIR)/core/hw/sh4/interpr/sh4_fpu.cpp \
$(CORE_DIR)/core/hw/sh4/interpr/sh4_opcodes.cpp \
$(CORE_DIR)/core/hw/sh4/modules/serial.cpp \
$(CORE_DIR)/core/hw/sh4/modules/rtc.cpp \
$(CORE_DIR)/core/hw/sh4/modules/bsc.cpp \
$(CORE_DIR)/core/hw/sh4/modules/tmu.cpp \
$(CORE_DIR)/core/hw/sh4/modules/ccn.cpp \
$(CORE_DIR)/core/hw/sh4/modules/intc.cpp \
$(CORE_DIR)/core/hw/sh4/modules/ubc.cpp \
$(CORE_DIR)/core/hw/sh4/modules/cpg.cpp \
$(CORE_DIR)/core/hw/sh4/modules/dmac.cpp \
$(CORE_DIR)/core/hw/sh4/modules/mmu.cpp \
$(CORE_DIR)/core/imgread/ImgReader.cpp \
$(CORE_DIR)/core/imgread/cdi.cpp \
$(CORE_DIR)/core/imgread/chd.cpp \
$(CORE_DIR)/core/imgread/common.cpp \
$(CORE_DIR)/core/imgread/gdi.cpp \
\
$(CORE_DIR)/core/nullDC.cpp \
$(CORE_DIR)/core/serialize.cpp \
$(CORE_DIR)/core/stdclass.cpp \
\
$(DEPS_DIR)/coreio/coreio.cpp \
$(DEPS_DIR)/crypto/sha1.cpp \
$(DEPS_DIR)/crypto/sha256.cpp \
$(DEPS_DIR)/crypto/md5.cpp \
$(DEPS_DIR)/libelf/elf.cpp \
$(DEPS_DIR)/libelf/elf32.cpp \
$(DEPS_DIR)/libelf/elf64.cpp \
$(DEPS_DIR)/chdpsr/cdipsr.cpp \
\
\
$(CORE_DIR)/core/reios/reios_elf.cpp \
$(CORE_DIR)/core/reios/reios.cpp \
$(CORE_DIR)/core/reios/gdrom_hle.cpp \
$(CORE_DIR)/core/reios/descrambl.cpp
SOURCES_C += \
$(DEPS_DIR)/chdr/bitstream.c \
$(DEPS_DIR)/chdr/cdrom.c \
$(DEPS_DIR)/chdr/chd.c \
$(DEPS_DIR)/chdr/flac.c \
$(DEPS_DIR)/chdr/huffman.c \
\
$(DEPS_DIR)/picotcp/modules/pico_arp.c \
$(DEPS_DIR)/picotcp/modules/pico_dev_ppp.c \
$(DEPS_DIR)/picotcp/modules/pico_dns_client.c \
$(DEPS_DIR)/picotcp/modules/pico_dns_common.c \
$(DEPS_DIR)/picotcp/modules/pico_ethernet.c \
$(DEPS_DIR)/picotcp/modules/pico_fragments.c \
$(DEPS_DIR)/picotcp/modules/pico_ipv4.c\
$(DEPS_DIR)/picotcp/modules/pico_socket_tcp.c \
$(DEPS_DIR)/picotcp/modules/pico_socket_udp.c \
$(DEPS_DIR)/picotcp/modules/pico_tcp.c \
$(DEPS_DIR)/picotcp/modules/pico_udp.c \
$(DEPS_DIR)/picotcp/stack/pico_device.c \
$(DEPS_DIR)/picotcp/stack/pico_frame.c \
$(DEPS_DIR)/picotcp/stack/pico_md5.c \
$(DEPS_DIR)/picotcp/stack/pico_protocol.c \
$(DEPS_DIR)/picotcp/stack/pico_socket_multicast.c \
$(DEPS_DIR)/picotcp/stack/pico_socket.c \
$(DEPS_DIR)/picotcp/stack/pico_stack.c \
$(DEPS_DIR)/picotcp/stack/pico_tree.c \
$(DEPS_DIR)/xxhash/xxhash.c
SOURCES_ASM :=
ifeq ($(NO_REND), 1)
SOURCES_CXX += $(CORE_DIR)/core/rend/norend/norend.cpp
endif
ifeq ($(HAVE_GL), 1)
SOURCES_CXX += $(CORE_DIR)/core/rend/gles/gles.cpp \
$(CORE_DIR)/core/rend/gles/gldraw.cpp \
$(CORE_DIR)/core/rend/gles/gltex.cpp
ifeq ($(HAVE_OIT), 1)
SOURCES_CXX += $(CORE_DIR)/core/rend/gl4/gles.cpp \
$(CORE_DIR)/core/rend/gl4/gldraw.cpp \
$(CORE_DIR)/core/rend/gl4/gltex.cpp \
$(CORE_DIR)/core/rend/gl4/abuffer.cpp
endif
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/rglgen.c \
$(LIBRETRO_COMM_DIR)/glsm/glsm.c
ifeq ($(GLES), 1)
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/glsym_es2.c
else
SOURCES_C += $(LIBRETRO_COMM_DIR)/glsym/glsym_gl.c
endif
endif
SOURCES_CXX += $(CORE_DIR)/core/hw/naomi/naomi.cpp \
$(CORE_DIR)/core/hw/naomi/naomi_cart.cpp
ifeq ($(HAVE_GENERIC_JIT), 1)
DYNAREC_USED = 1
SOURCES_CXX += $(CORE_DIR)/core/rec-cpp/rec_cpp.cpp
endif
# Recompiler (x64)
ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), x86_64 x64))
DYNAREC_USED = 1
SOURCES_CXX += $(CORE_DIR)/core/rec-x64/rec_x64.cpp
# Recompiler (x86 32bit)
#
else ifeq ($(WITH_DYNAREC), $(filter $(WITH_DYNAREC), i386 i686 x86))
DYNAREC_USED = 1
ifeq ($(platform), unix)
SOURCES_ASM += $(CORE_DIR)/core/rec-x86/rec_lin86_asm.S
else
SOURCES_ASM += $(CORE_DIR)/core/rec-x86/rec_win86_asm.S
#SOURCES_ASM += $(CORE_DIR)/core/hw/arm7/arm7_win86_asm.S
endif
SOURCES_CXX += $(CORE_DIR)/core/rec-x86/rec_x86_asm.cpp \
$(CORE_DIR)/core/rec-x86/rec_x86_driver.cpp \
$(CORE_DIR)/core/rec-x86/rec_x86_il.cpp \
$(CORE_DIR)/core/rec-x86/x86_emitter.cpp
endif
# Recompiler (ARM)
ifeq ($(WITH_DYNAREC), arm)
DYNAREC_USED = 1
SOURCES_CXX += $(CORE_DIR)/core/rec-ARM/rec_arm.cpp
endif
ifeq ($(DYNAREC_USED),1)
SOURCES_CXX += $(CORE_DIR)/core/rec.cpp
# Dynarec
SOURCES_CXX += $(CORE_DIR)/core/hw/sh4/dyna/decoder.cpp \
$(CORE_DIR)/core/hw/sh4/dyna/driver.cpp \
$(CORE_DIR)/core/hw/sh4/dyna/blockmanager.cpp \
$(CORE_DIR)/core/hw/sh4/dyna/shil.cpp
endif
ifeq ($(WITH_DYNAREC), arm)
SOURCES_ASM += $(CORE_DIR)/core/rec-ARM/ngen_arm.S
endif
SOURCES_CXX += $(CORE_DIR)/core/libretro/libretro.cpp \
$(CORE_DIR)/core/libretro/audiostream.cpp \
$(CORE_DIR)/core/libretro/common.cpp
SOURCES_C += $(LIBRETRO_COMM_DIR)/memmap/memalign.c \
$(LIBRETRO_COMM_DIR)/file/retro_stat.c
ifeq ($(NO_THREADS),1)
else
SOURCES_C += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.c
endif
ifeq ($(HAVE_TEXUPSCALE),1)
SOURCES_CXX += $(DEPS_DIR)/xbrz/xbrz.cpp
endif
ifeq ($(HAVE_CHD),1)
INCFLAGS += -I$(DEPS_DIR)/flac/include
SOURCES_C += \
$(DEPS_DIR)/flac/bitmath.c \
$(DEPS_DIR)/flac/bitreader.c \
$(DEPS_DIR)/flac/cpu.c \
$(DEPS_DIR)/flac/crc.c \
$(DEPS_DIR)/flac/fixed.c \
$(DEPS_DIR)/flac/float.c \
$(DEPS_DIR)/flac/format.c \
$(DEPS_DIR)/flac/lpc.c \
$(DEPS_DIR)/flac/md5.c \
$(DEPS_DIR)/flac/memory.c \
$(DEPS_DIR)/flac/stream_decoder.c
SOURCES_C += $(DEPS_DIR)/lzma/C/LzFind.c \
$(DEPS_DIR)/lzma/C/LzmaDec.c \
$(DEPS_DIR)/lzma/C/LzmaEnc.c
endif
SOURCES_C += $(DEPS_DIR)/zlib/deflate.c \
$(DEPS_DIR)/zlib/gzlib.c \
$(DEPS_DIR)/zlib/uncompr.c \
$(DEPS_DIR)/zlib/zutil.c \
$(DEPS_DIR)/zlib/inffast.c \
$(DEPS_DIR)/zlib/gzread.c \
$(DEPS_DIR)/zlib/crc32.c \
$(DEPS_DIR)/zlib/gzwrite.c \
$(DEPS_DIR)/zlib/inflate.c \
$(DEPS_DIR)/zlib/infback.c \
$(DEPS_DIR)/zlib/inftrees.c \
$(DEPS_DIR)/zlib/trees.c \
$(DEPS_DIR)/zlib/gzclose.c \
$(DEPS_DIR)/zlib/compress.c \
$(DEPS_DIR)/zlib/adler32.c