beetle-wswan-libretro/Makefile.common
2020-10-04 14:47:02 +02:00

86 lines
1.7 KiB
Makefile

SOURCES_CXX :=
SOURCES_C :=
MEDNAFEN_DIR := $(CORE_DIR)/mednafen
CORE_EMU_DIR := $(MEDNAFEN_DIR)/wswan
LIBRETRO_COMM_DIR := $(CORE_DIR)/libretro-common
INCFLAGS := -I$(CORE_DIR) \
-I$(MEDNAFEN_DIR) \
-I$(MEDNAFEN_DIR)/include \
-I$(MEDNAFEN_DIR)/hw_sound \
-I$(MEDNAFEN_DIR)/hw_cpu \
-I$(MEDNAFEN_DIR)/hw_misc \
-I$(LIBRETRO_COMM_DIR)/include
ifneq (,$(findstring msvc2003,$(platform)))
INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc
endif
ifneq ($(HAVE_GRIFFIN),1)
SOURCES_CXX += \
$(CORE_EMU_DIR)/gfx.cpp \
$(CORE_EMU_DIR)/wswan-memory.cpp \
$(CORE_EMU_DIR)/sound.cpp
SOURCES_C += \
$(CORE_EMU_DIR)/interrupt.c \
$(CORE_EMU_DIR)/rtc.c \
$(CORE_EMU_DIR)/tcache.c \
$(CORE_EMU_DIR)/v30mz.c \
$(CORE_EMU_DIR)/eeprom.c
endif
ifeq ($(NEED_BLIP), 1)
SOURCES_C += $(MEDNAFEN_DIR)/sound/Blip_Buffer.c
endif
ifeq ($(NEED_THREADING), 1)
FLAGS += -DWANT_THREADING
SOURCES_C += $(CORE_DIR)/threads.c
endif
ifeq ($(NEED_DEINTERLACER), 1)
FLAGS += -DNEED_DEINTERLACER
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
ifneq ($(HAVE_GRIFFIN), 1)
SOURCES_CXX += \
$(MEDNAFEN_DIR)/mempatcher.cpp \
SOURCES_C += \
$(MEDNAFEN_DIR)/state.c \
$(MEDNAFEN_DIR)/settings.c \
$(CORE_DIR)/libretro.c
ifneq ($(STATIC_LINKING), 1)
SOURCES_C += \
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
$(LIBRETRO_COMM_DIR)/compat/compat_snprintf.c
endif
endif