beetle-pce-fast-libretro/Makefile.common
2016-06-09 08:12:51 +02:00

127 lines
2.8 KiB
Makefile

SOURCES_CXX :=
SOURCES_C :=
LIBRETRO_DIR := $(CORE_DIR)/libretro-common
MEDNAFEN_DIR := $(CORE_DIR)/mednafen
CORE_EMU_DIR := $(MEDNAFEN_DIR)/pce_fast
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
ifneq ($(HAVE_GRIFFIN),1)
SOURCES_CXX += \
$(CORE_EMU_DIR)/huc6280.cpp \
$(CORE_EMU_DIR)/input.cpp \
$(CORE_EMU_DIR)/pcecd.cpp \
$(CORE_EMU_DIR)/pcecd_drive.cpp \
$(CORE_EMU_DIR)/psg.cpp \
$(CORE_EMU_DIR)/vdc.cpp \
$(MEDNAFEN_DIR)/hw_misc/arcade_card/arcade_card.cpp
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 ($(NEED_THREADING), 1)
FLAGS += -DWANT_THREADING
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 ($(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
ifeq ($(NEED_CD), 1)
ifneq ($(HAVE_GRIFFIN),1)
SOURCES_CXX += $(MEDNAFEN_DIR)/cdrom/CDAccess.cpp \
$(MEDNAFEN_DIR)/cdrom/CDAccess_Image.cpp \
$(MEDNAFEN_DIR)/cdrom/CDAccess_CCD.cpp \
$(MEDNAFEN_DIR)/cdrom/CDUtility.cpp \
$(MEDNAFEN_DIR)/cdrom/lec.cpp \
$(MEDNAFEN_DIR)/cdrom/SimpleFIFO.cpp \
$(MEDNAFEN_DIR)/cdrom/audioreader.cpp \
$(MEDNAFEN_DIR)/cdrom/galois.cpp \
$(MEDNAFEN_DIR)/cdrom/recover-raw.cpp \
$(MEDNAFEN_DIR)/cdrom/l-ec.cpp \
$(MEDNAFEN_DIR)/cdrom/crc32.cpp \
$(MEDNAFEN_DIR)/cdrom/cdromif.cpp
endif
FLAGS += -DNEED_CD
endif
ifeq ($(NEED_TREMOR), 1)
SOURCES_C += $(wildcard $(MEDNAFEN_DIR)/tremor/*.c)
FLAGS += -DNEED_TREMOR
endif
ifneq ($(HAVE_GRIFFIN), 1)
SOURCES_CXX += \
$(MEDNAFEN_DIR)/error.cpp \
$(MEDNAFEN_DIR)/settings.cpp \
$(MEDNAFEN_DIR)/general.cpp \
$(MEDNAFEN_DIR)/file.cpp \
$(MEDNAFEN_DIR)/FileStream.cpp \
$(MEDNAFEN_DIR)/MemoryStream.cpp \
$(MEDNAFEN_DIR)/Stream.cpp \
$(MEDNAFEN_DIR)/state.cpp \
$(MEDNAFEN_DIR)/mempatcher.cpp \
$(MEDNAFEN_DIR)/okiadpcm.cpp \
$(CORE_DIR)/libretro.cpp
SOURCES_C += \
$(MEDNAFEN_DIR)/mednafen-endian.c
endif
ifneq ($(STATIC_LINKING), 1)
SOURCES_C += $(LIBRETRO_DIR)/streams/file_stream.c \
$(LIBRETRO_DIR)/file/retro_stat.c \
$(LIBRETRO_DIR)/string/stdstring.c
ifeq ($(NEED_THREADING), 1)
SOURCES_C += $(LIBRETRO_DIR)/rthreads/rthreads.c
endif
endif