-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile.common
191 lines (165 loc) · 5.24 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
SOURCES_CXX :=
SOURCES_C :=
MEDNAFEN_DIR := $(CORE_DIR)/mednafen
CORE_EMU_DIR := $(MEDNAFEN_DIR)/pcfx
LIBRETRO_COMM_DIR := $(CORE_DIR)/libretro-common
CDROM_DIR := $(MEDNAFEN_DIR)/cdrom
DEPS_DIR := $(CORE_DIR)/deps
INCFLAGS := -I$(CORE_DIR) -I$(MEDNAFEN_DIR) -I$(MEDNAFEN_DIR)/include -I$(MEDNAFEN_DIR)/intl -I$(MEDNAFEN_DIR)/hw_sound -I$(MEDNAFEN_DIR)/hw_cpu -I$(MEDNAFEN_DIR)/hw_misc -I$(LIBRETRO_COMM_DIR)/include -I$(LIBRETRO_COMM_DIR)/include
ifeq ($(HAVE_CDROM), 1)
SOURCES_C += \
$(LIBRETRO_COMM_DIR)/cdrom/cdrom.c \
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation_cdrom.c
endif
ifneq ($(HAVE_GRIFFIN),1)
SOURCES_CXX += \
$(CORE_EMU_DIR)/king.cpp \
$(CORE_EMU_DIR)/soundbox.cpp \
$(CORE_EMU_DIR)/interrupt.cpp \
$(CORE_EMU_DIR)/huc6273.cpp \
$(CORE_EMU_DIR)/input.cpp \
$(CORE_EMU_DIR)/timer.cpp \
$(CORE_EMU_DIR)/rainbow.cpp \
$(CORE_EMU_DIR)/input/gamepad.cpp \
$(CORE_EMU_DIR)/input/mouse.cpp \
$(MEDNAFEN_DIR)/sound/OwlResampler.cpp \
$(MEDNAFEN_DIR)/hw_cpu/v810/v810_cpu.cpp \
$(MEDNAFEN_DIR)/hw_cpu/v810/v810_fp_ops.cpp \
$(MEDNAFEN_DIR)/hw_sound/pce_psg/pce_psg.cpp \
$(MEDNAFEN_DIR)/hw_video/huc6270/vdc_video.cpp
SOURCES_C += \
$(CORE_EMU_DIR)/jrevdct.c
endif
ifeq ($(NEED_BLIP), 1)
SOURCES_CXX += $(MEDNAFEN_DIR)/sound/Blip_Buffer.cpp
endif
ifeq ($(HAVE_HES), 1)
SOURCES_CXX += $(CORE_EMU_DIR)/hes.cpp
endif
ifeq ($(HAVE_THREADS), 1)
FLAGS += -DHAVE_THREADS
SOURCES_C += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.c
endif
ifeq ($(NEED_DEINTERLACER), 1)
FLAGS += -DNEED_DEINTERLACER
endif
ifeq ($(IS_X86), 1)
FLAGS += -DARCH_X86
endif
ifeq ($(NEED_BPP), 8)
FLAGS += -DWANT_8BPP
endif
ifeq ($(NEED_BPP), 16)
FLAGS += -DWANT_16BPP
endif
ifeq ($(NEED_BPP), 32)
FLAGS += -DWANT_32BPP
endif
ifeq ($(NO_COMPUTED_GOTO), 1)
FLAGS += -DNO_COMPUTED_GOTO
endif
ifeq ($(NEED_STEREO_SOUND), 1)
FLAGS += -DWANT_STEREO_SOUND
endif
ifeq ($(FRONTEND_SUPPORTS_RGB565), 1)
FLAGS += -DFRONTEND_SUPPORTS_RGB565
endif
ifeq ($(CACHE_CD), 1)
FLAGS += -D__LIBRETRO_CACHE_CD__
endif
ifneq ($(HAVE_GRIFFIN),1)
SOURCES_CXX += $(CDROM_DIR)/CDAccess.cpp \
$(CDROM_DIR)/CDAccess_Image.cpp \
$(CDROM_DIR)/CDAccess_CCD.cpp \
$(CDROM_DIR)/CDAFReader.cpp \
$(CDROM_DIR)/CDAFReader_Vorbis.cpp \
$(CDROM_DIR)/cdromif.cpp \
$(CDROM_DIR)/CDUtility.cpp \
$(CDROM_DIR)/lec.cpp \
$(CDROM_DIR)/galois.cpp \
$(CDROM_DIR)/recover-raw.cpp \
$(CDROM_DIR)/l-ec.cpp \
$(CDROM_DIR)/scsicd.cpp \
$(CDROM_DIR)/edc_crc32.cpp
endif
FLAGS += -DNEED_CD
ifeq ($(HAVE_CHD), 1)
FLAGS += -DHAVE_CHD -D_7ZIP_ST
INCFLAGS += \
-I$(DEPS_DIR)/lzma-19.00/include \
-I$(DEPS_DIR)/libchdr/include
ZLIB_INCFLAGS = -I$(DEPS_DIR)/zlib-1.2.11
ZLIB_SOURCES_C = \
$(DEPS_DIR)/zlib-1.2.11/adler32.c \
$(DEPS_DIR)/zlib-1.2.11/crc32.c \
$(DEPS_DIR)/zlib-1.2.11/inffast.c \
$(DEPS_DIR)/zlib-1.2.11/inflate.c \
$(DEPS_DIR)/zlib-1.2.11/inftrees.c
ifeq ($(SYSTEM_ZLIB), 1)
INCFLAGS += $(shell pkg-config --cflags zlib)
LIBS += $(shell pkg-config --libs zlib)
else
INCFLAGS += $(ZLIB_INCFLAGS)
SOURCES_C += $(ZLIB_SOURCES_C)
endif
SOURCES_C += \
$(DEPS_DIR)/lzma-19.00/src/Alloc.c \
$(DEPS_DIR)/lzma-19.00/src/Bra86.c \
$(DEPS_DIR)/lzma-19.00/src/BraIA64.c \
$(DEPS_DIR)/lzma-19.00/src/CpuArch.c \
$(DEPS_DIR)/lzma-19.00/src/Delta.c \
$(DEPS_DIR)/lzma-19.00/src/LzFind.c \
$(DEPS_DIR)/lzma-19.00/src/Lzma86Dec.c \
$(DEPS_DIR)/lzma-19.00/src/LzmaDec.c \
$(DEPS_DIR)/lzma-19.00/src/LzmaEnc.c \
$(DEPS_DIR)/libchdr/src/libchdr_bitstream.c \
$(DEPS_DIR)/libchdr/src/libchdr_cdrom.c \
$(DEPS_DIR)/libchdr/src/libchdr_chd.c \
$(DEPS_DIR)/libchdr/src/libchdr_flac.c \
$(DEPS_DIR)/libchdr/src/libchdr_huffman.c
SOURCES_CXX += \
$(CDROM_DIR)/CDAccess_CHD.cpp
endif
ifeq ($(NEED_TREMOR), 1)
SOURCES_C += $(sort $(filter-out %ivorbisfile_example.c, $(wildcard $(MEDNAFEN_DIR)/tremor/*.c)))
FLAGS += -DNEED_TREMOR
endif
ifneq ($(HAVE_GRIFFIN), 1)
SOURCES_CXX += \
$(MEDNAFEN_DIR)/general.cpp \
$(MEDNAFEN_DIR)/FileStream.cpp \
$(MEDNAFEN_DIR)/MemoryStream.cpp \
$(MEDNAFEN_DIR)/Stream.cpp \
$(MEDNAFEN_DIR)/mempatcher.cpp \
$(CORE_DIR)/libretro.cpp
ifeq ($(NEED_DEINTERLACER), 1)
SOURCES_CXX += \
$(MEDNAFEN_DIR)/video/Deinterlacer.cpp
endif
SOURCES_C += \
$(MEDNAFEN_DIR)/file.c \
$(MEDNAFEN_DIR)/settings.c \
$(MEDNAFEN_DIR)/mednafen-endian.c \
$(MEDNAFEN_DIR)/state.c \
$(MEDNAFEN_DIR)/mednafen_md5.c
endif
ifneq ($(STATIC_LINKING), 1)
SOURCES_C += \
$(LIBRETRO_COMM_DIR)/streams/file_stream.c \
$(LIBRETRO_COMM_DIR)/streams/file_stream_transforms.c \
$(LIBRETRO_COMM_DIR)/file/file_path.c \
$(LIBRETRO_COMM_DIR)/file/retro_dirent.c \
$(LIBRETRO_COMM_DIR)/lists/string_list.c \
$(LIBRETRO_COMM_DIR)/lists/dir_list.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
$(LIBRETRO_COMM_DIR)/compat/compat_snprintf.c \
$(LIBRETRO_COMM_DIR)/compat/compat_posix_string.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.c \
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
$(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.c \
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c \
$(LIBRETRO_COMM_DIR)/memmap/memalign.c \
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
$(LIBRETRO_COMM_DIR)/time/rtime.c
endif