mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-30 12:20:42 +00:00
339 lines
12 KiB
Makefile
339 lines
12 KiB
Makefile
SOURCES_CXX :=
|
|
SOURCES_C :=
|
|
|
|
DEPS_DIR := $(CORE_DIR)/deps
|
|
LIBRETRO_DIR := $(CORE_DIR)/libretro-common
|
|
LIBKIRK_DIR := $(DEPS_DIR)/libkirk
|
|
MEDNAFEN_DIR := $(CORE_DIR)/mednafen
|
|
CORE_EMU_DIR := $(MEDNAFEN_DIR)/psx
|
|
RSXGL_DIR := $(CORE_DIR)/rustation-libretro/src
|
|
|
|
ifeq ($(HAVE_CDROM_NEW), 1)
|
|
FLAGS += -DHAVE_CDROM_NEW
|
|
CDROM_DIR := $(MEDNAFEN_DIR)/cdrom-new
|
|
else
|
|
CDROM_DIR := $(MEDNAFEN_DIR)/cdrom
|
|
endif
|
|
|
|
ifeq ($(HAVE_OPENGL), 1)
|
|
ifeq ($(GLES), 1)
|
|
GLFLAGS := -DHAVE_OPENGLES -DHAVE_OPENGLES2
|
|
CFLAGS += $(GLFLAGS)
|
|
CXXFLAGS += $(GLFLAGS)
|
|
|
|
SOURCES_C += $(LIBRETRO_DIR)/glsym/glsym_es2.c
|
|
else
|
|
GLFLAGS := -DHAVE_OPENGL -DCORE
|
|
CFLAGS += $(GLFLAGS)
|
|
CXXFLAGS += $(GLFLAGS)
|
|
SOURCES_C += $(LIBRETRO_DIR)/glsym/glsym_gl.c
|
|
endif
|
|
|
|
SOURCES_C += $(LIBRETRO_DIR)/glsm/glsm.c \
|
|
$(LIBRETRO_DIR)/glsym/rglgen.c
|
|
|
|
SOURCES_CXX += $(CORE_DIR)/rsx/rsx_lib_gl.cpp
|
|
endif
|
|
|
|
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_DIR)/include \
|
|
-I$(DEPS_DIR)/zlib \
|
|
-I/usr/local/include
|
|
|
|
SOURCES_C += $(DEPS_DIR)/zlib/adler32.c \
|
|
$(DEPS_DIR)/zlib/compress.c \
|
|
$(DEPS_DIR)/zlib/crc32.c \
|
|
$(DEPS_DIR)/zlib/deflate.c \
|
|
$(DEPS_DIR)/zlib/gzclose.c \
|
|
$(DEPS_DIR)/zlib/gzlib.c \
|
|
$(DEPS_DIR)/zlib/gzread.c \
|
|
$(DEPS_DIR)/zlib/gzwrite.c \
|
|
$(DEPS_DIR)/zlib/inffast.c \
|
|
$(DEPS_DIR)/zlib/inflate.c \
|
|
$(DEPS_DIR)/zlib/inftrees.c \
|
|
$(DEPS_DIR)/zlib/trees.c \
|
|
$(DEPS_DIR)/zlib/uncompr.c \
|
|
$(DEPS_DIR)/zlib/zutil.c
|
|
|
|
ifeq ($(HAVE_GRIFFIN),1)
|
|
SOURCES_CXX += beetle_psx_griffin.cpp \
|
|
$(CORE_EMU_DIR)/dma.cpp \
|
|
$(CORE_EMU_DIR)/sio.cpp
|
|
|
|
SOURCES_C += beetle_psx_griffin_c.c
|
|
endif
|
|
|
|
FLAGS += -DHAVE_PBP
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
SOURCES_CXX += $(CORE_EMU_DIR)/dis.cpp
|
|
endif
|
|
|
|
ifeq ($(NEED_THREADING), 1)
|
|
FLAGS += -DWANT_THREADING -DHAVE_THREADS
|
|
endif
|
|
|
|
ifeq ($(NEED_CRC32), 1)
|
|
FLAGS += -DWANT_CRC32
|
|
SOURCES_C += $(CORE_DIR)/scrc32.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 ($(WANT_NEW_API), 1)
|
|
FLAGS += -DWANT_NEW_API
|
|
endif
|
|
|
|
ifeq ($(NO_COMPUTED_GOTO), 1)
|
|
FLAGS += -DNO_COMPUTED_GOTO
|
|
endif
|
|
|
|
ifeq ($(FRONTEND_SUPPORTS_RGB565), 1)
|
|
FLAGS += -DFRONTEND_SUPPORTS_RGB565
|
|
endif
|
|
|
|
ifeq ($(NEED_CD), 1)
|
|
FLAGS += -DNEED_CD
|
|
endif
|
|
|
|
ifeq ($(HAVE_CHD), 1)
|
|
FLAGS += -DHAVE_CHD \
|
|
-D_7ZIP_ST \
|
|
-DPACKAGE_VERSION=\"1.3.2\" \
|
|
-DFLAC_API_EXPORTS \
|
|
-DFLAC__HAS_OGG=0 \
|
|
-DHAVE_LROUND \
|
|
-DHAVE_STDINT_H \
|
|
-DHAVE_STDLIB_H \
|
|
-DHAVE_SYS_PARAM_H
|
|
|
|
INCFLAGS += -I$(DEPS_DIR)/crypto \
|
|
-I$(DEPS_DIR)/flac-1.3.2/include \
|
|
-I$(DEPS_DIR)/flac-1.3.2/src/libFLAC/include \
|
|
-I$(DEPS_DIR)/lzma-16.04/C \
|
|
-I$(DEPS_DIR)/libchdr
|
|
|
|
ifeq ($(platform), win)
|
|
FLAGS += -DHAVE_FSEEKO
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(NEED_TREMOR), 1)
|
|
FLAGS += -DNEED_TREMOR
|
|
endif
|
|
|
|
ifneq ($(HAVE_GRIFFIN), 1)
|
|
SOURCES_CXX += $(CORE_EMU_DIR)/irq.cpp \
|
|
$(CORE_EMU_DIR)/timer.cpp \
|
|
$(CORE_EMU_DIR)/dma.cpp \
|
|
$(CORE_EMU_DIR)/frontio.cpp \
|
|
$(CORE_EMU_DIR)/sio.cpp \
|
|
$(CORE_EMU_DIR)/cpu.cpp \
|
|
$(CORE_EMU_DIR)/gte.cpp \
|
|
$(CORE_EMU_DIR)/cdc.cpp \
|
|
$(CORE_EMU_DIR)/spu.cpp \
|
|
$(CORE_EMU_DIR)/gpu.cpp \
|
|
$(CORE_EMU_DIR)/mdec.cpp \
|
|
$(CORE_EMU_DIR)/input/gamepad.cpp \
|
|
$(CORE_EMU_DIR)/input/dualanalog.cpp \
|
|
$(CORE_EMU_DIR)/input/dualshock.cpp \
|
|
$(CORE_EMU_DIR)/input/justifier.cpp \
|
|
$(CORE_EMU_DIR)/input/guncon.cpp \
|
|
$(CORE_EMU_DIR)/input/negcon.cpp \
|
|
$(CORE_EMU_DIR)/input/memcard.cpp \
|
|
$(CORE_EMU_DIR)/input/multitap.cpp \
|
|
$(CORE_EMU_DIR)/input/mouse.cpp
|
|
|
|
ifeq ($(HAVE_JIT), 1)
|
|
SOURCES_CXX += $(CORE_EMU_DIR)/decomp.cpp
|
|
endif
|
|
|
|
SOURCES_C += $(CORE_DIR)/libretro_cbs.c
|
|
|
|
ifeq ($(NEED_TREMOR), 1)
|
|
SOURCES_C += $(sort $(wildcard $(MEDNAFEN_DIR)/tremor/*.c))
|
|
endif
|
|
|
|
ifeq ($(HAVE_CDROM_NEW), 1)
|
|
SOURCES_CXX += $(CDROM_DIR)/CDAccess.cpp \
|
|
$(CDROM_DIR)/CDAccess_Image.cpp \
|
|
$(CDROM_DIR)/CDAccess_CCD.cpp \
|
|
$(CDROM_DIR)/CDAccess_PBP.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)/edc_crc32.cpp
|
|
else
|
|
SOURCES_CXX += $(CDROM_DIR)/CDAccess.cpp \
|
|
$(CDROM_DIR)/CDAccess_Image.cpp \
|
|
$(CDROM_DIR)/CDAccess_CCD.cpp \
|
|
$(CDROM_DIR)/CDAccess_PBP.cpp \
|
|
$(CDROM_DIR)/audioreader.cpp \
|
|
$(CDROM_DIR)/misc.cpp \
|
|
$(CDROM_DIR)/cdromif.cpp
|
|
|
|
SOURCES_C += $(CDROM_DIR)/CDUtility.c \
|
|
$(CDROM_DIR)/galois.c \
|
|
$(CDROM_DIR)/l-ec.c \
|
|
$(CDROM_DIR)/lec.c \
|
|
$(CDROM_DIR)/recover-raw.c \
|
|
$(CDROM_DIR)/edc_crc32.c
|
|
endif
|
|
|
|
SOURCES_CXX += $(MEDNAFEN_DIR)/error.cpp \
|
|
$(MEDNAFEN_DIR)/settings.cpp \
|
|
$(MEDNAFEN_DIR)/general.cpp \
|
|
$(MEDNAFEN_DIR)/FileStream.cpp \
|
|
$(MEDNAFEN_DIR)/MemoryStream.cpp \
|
|
$(MEDNAFEN_DIR)/Stream.cpp \
|
|
$(MEDNAFEN_DIR)/state.cpp \
|
|
$(MEDNAFEN_DIR)/mempatcher.cpp \
|
|
$(MEDNAFEN_DIR)/video/Deinterlacer.cpp \
|
|
$(MEDNAFEN_DIR)/video/surface.cpp \
|
|
$(CORE_DIR)/libretro.cpp \
|
|
$(CORE_DIR)/input.cpp
|
|
|
|
SOURCES_C += $(MEDNAFEN_DIR)/file.c \
|
|
$(CORE_DIR)/rsx/rsx_lib_soft.c \
|
|
$(MEDNAFEN_DIR)/mednafen-endian.c \
|
|
$(MEDNAFEN_DIR)/md5.c
|
|
|
|
SOURCES_CXX += $(CORE_DIR)/rsx/rsx_intf.cpp
|
|
|
|
ifneq ($(RSX_DUMP),)
|
|
SOURCES_CXX += $(CORE_DIR)/rsx/rsx_dump.cpp
|
|
CFLAGS += -DRSX_DUMP
|
|
CXXFLAGS += -DRSX_DUMP
|
|
endif
|
|
|
|
ifeq ($(HAVE_VULKAN), 1)
|
|
SOURCES_CXX += $(wildcard $(CORE_DIR)/parallel-psx/renderer/*.cpp) \
|
|
$(wildcard $(CORE_DIR)/parallel-psx/atlas/*.cpp) \
|
|
$(wildcard $(CORE_DIR)/parallel-psx/vulkan/*.cpp) \
|
|
$(CORE_DIR)/parallel-psx/vulkan/SPIRV-Cross/spirv_cross.cpp \
|
|
$(CORE_DIR)/rsx/rsx_lib_vulkan.cpp
|
|
|
|
EXTRA_INCLUDES += -I$(CORE_DIR)/parallel-psx/vulkan/SPIRV-Cross \
|
|
-I$(CORE_DIR)/parallel-psx/renderer \
|
|
-I$(CORE_DIR)/parallel-psx/khronos/include \
|
|
-I$(CORE_DIR)/parallel-psx/atlas \
|
|
-I$(CORE_DIR)/parallel-psx/vulkan \
|
|
-I$(CORE_DIR)/parallel-psx/glsl/prebuilt
|
|
|
|
CXXFLAGS += -std=c++11
|
|
ifneq ($(VULKAN_DEBUG),)
|
|
FLAGS += -DVULKAN_DEBUG
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(STATIC_LINKING), 1)
|
|
SOURCES_C += $(LIBRETRO_DIR)/streams/file_stream.c \
|
|
$(LIBRETRO_DIR)/string/stdstring.c \
|
|
$(LIBRETRO_DIR)/compat/compat_strl.c \
|
|
$(LIBRETRO_DIR)/compat/compat_strcasestr.c \
|
|
$(LIBRETRO_DIR)/file/retro_dirent.c \
|
|
$(LIBRETRO_DIR)/file/file_path.c \
|
|
$(LIBRETRO_DIR)/hash/rhash.c
|
|
|
|
|
|
ifeq ($(NEED_THREADING), 1)
|
|
SOURCES_C += $(LIBRETRO_DIR)/rthreads/rthreads.c
|
|
endif
|
|
|
|
endif
|
|
endif ## ifneq($(HAVE_GRIFFIN, 1))
|
|
|
|
SOURCES_C += $(LIBKIRK_DIR)/aes.c \
|
|
$(LIBKIRK_DIR)/amctrl.c \
|
|
$(LIBKIRK_DIR)/bn.c \
|
|
$(LIBKIRK_DIR)/des.c \
|
|
$(LIBKIRK_DIR)/ec.c \
|
|
$(LIBKIRK_DIR)/kirk_engine.c \
|
|
$(LIBKIRK_DIR)/sha1.c
|
|
|
|
SOURCES_C += $(CORE_DIR)/pgxp/pgxp_cpu.c \
|
|
$(CORE_DIR)/pgxp/pgxp_debug.c \
|
|
$(CORE_DIR)/pgxp/pgxp_gpu.c \
|
|
$(CORE_DIR)/pgxp/pgxp_gte.c \
|
|
$(CORE_DIR)/pgxp/pgxp_main.c \
|
|
$(CORE_DIR)/pgxp/pgxp_mem.c \
|
|
$(CORE_DIR)/pgxp/pgxp_value.c
|
|
|
|
ifeq ($(HAVE_CHD), 1)
|
|
SOURCES_C += $(DEPS_DIR)/crypto/md5.c \
|
|
$(DEPS_DIR)/crypto/sha1.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/bitmath.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/bitreader.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/cpu.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/crc.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/fixed.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/fixed_intrin_sse2.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/fixed_intrin_ssse3.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/float.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/format.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/lpc.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/lpc_intrin_avx2.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/lpc_intrin_sse2.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/lpc_intrin_sse41.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/lpc_intrin_sse.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/md5.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/memory.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/metadata_iterators.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/metadata_object.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/stream_decoder.c \
|
|
$(DEPS_DIR)/flac-1.3.2/src/libFLAC/window.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/Alloc.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/Bra86.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/Bra.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/BraIA64.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/CpuArch.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/Delta.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/LzFind.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/Lzma86Dec.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/Lzma86Enc.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/LzmaDec.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/LzmaEnc.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/LzmaLib.c \
|
|
$(DEPS_DIR)/lzma-16.04/C/Sort.c \
|
|
$(DEPS_DIR)/libchdr/bitstream.c \
|
|
$(DEPS_DIR)/libchdr/cdrom.c \
|
|
$(DEPS_DIR)/libchdr/chd.c \
|
|
$(DEPS_DIR)/libchdr/flac.c \
|
|
$(DEPS_DIR)/libchdr/huffman.c
|
|
|
|
ifeq ($(platform), win)
|
|
SOURCES_C += $(DEPS_DIR)/flac-1.3.2/src/libFLAC/windows_unicode_filenames.c
|
|
endif
|
|
|
|
SOURCES_CXX += $(CDROM_DIR)/CDAccess_CHD.cpp
|
|
endif ## ifeq ($(HAVE_CHD), 1)
|