beetle-pce-fast-libretro/jni/Android.mk

183 lines
4.8 KiB
Makefile
Raw Normal View History

2012-12-28 22:03:33 +00:00
LOCAL_PATH := $(call my-dir)
DEBUG = 0
FRONTEND_SUPPORTS_RGB565 = 1
FAST = 1
include $(CLEAR_VARS)
ifeq ($(TARGET_ARCH),arm)
LOCAL_CXXFLAGS += -DANDROID_ARM
LOCAL_CFLAGS +=-DANDROID_ARM
2012-12-28 22:03:33 +00:00
LOCAL_ARM_MODE := arm
endif
ifeq ($(TARGET_ARCH),x86)
LOCAL_CXXFLAGS += -DANDROID_X86
LOCAL_CFLAGS += -DANDROID_X86
IS_X86 = 1
2012-12-28 22:03:33 +00:00
endif
ifeq ($(TARGET_ARCH),mips)
LOCAL_CXXFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
2012-12-28 22:03:33 +00:00
endif
MEDNAFEN_DIR := ../mednafen
MEDNAFEN_LIBRETRO_DIR := ..
LOCAL_MODULE := libretro
# If you have a system with 1GB RAM or more - cache the whole
# CD for CD-based systems in order to prevent file access delays/hiccups
CACHE_CD = 0
2014-06-18 19:55:15 +00:00
PTHREAD_FLAGS = -pthread
NEED_BPP = 16
WANT_NEW_API = 1
NEED_BLIP = 1
NEED_CD = 1
NEED_STEREO_SOUND = 1
NEED_SCSI_CD = 1
NEED_THREADING = 1
NEED_TREMOR = 1
NEED_CRC32 = 1
CORE_DEFINE := -DWANT_PCE_FAST_EMU
2014-06-18 20:01:17 +00:00
CORE_DIR := $(MEDNAFEN_DIR)/pce_fast
2012-12-28 22:03:33 +00:00
CORE_SOURCES := $(CORE_DIR)/huc.cpp \
2013-01-16 14:35:13 +00:00
$(CORE_DIR)/huc6280.cpp \
2012-12-28 22:03:33 +00:00
$(CORE_DIR)/input.cpp \
2014-04-22 16:32:49 +00:00
$(CORE_DIR)/pcecd.cpp \
$(CORE_DIR)/pcecd_drive.cpp \
$(CORE_DIR)/psg.cpp \
2012-12-28 22:03:33 +00:00
$(CORE_DIR)/vdc.cpp
TARGET_NAME := mednafen_pce_fast_libretro
2013-01-16 14:35:13 +00:00
HW_CPU_SOURCES := $(MEDNAFEN_DIR)/hw_cpu/huc6280/cpu_huc6280.cpp
HW_MISC_SOURCES := $(MEDNAFEN_DIR)/hw_misc/arcade_card/arcade_card.cpp
2013-01-16 14:35:13 +00:00
HW_VIDEO_SOURCES := $(MEDNAFEN_DIR)/hw_video/huc6270/vdc_video.cpp
OKIADPCM_SOURCES := $(MEDNAFEN_DIR)/okiadpcm.cpp
2012-12-28 22:03:33 +00:00
ifeq ($(NEED_STEREO_SOUND), 1)
SOUND_DEFINE := -DWANT_STEREO_SOUND
endif
2012-12-29 13:50:24 +00:00
CORE_INCDIR := $(CORE_DIR)
2012-12-28 22:03:33 +00:00
ifeq ($(NEED_THREADING), 1)
FLAGS += -DWANT_THREADING
2014-06-18 20:10:07 +00:00
THREAD_SOURCES += $(MEDNAFEN_LIBRETRO_DIR)/thread.c
2012-12-28 22:03:33 +00:00
endif
ifeq ($(NEED_CRC32), 1)
FLAGS += -DWANT_CRC32
2014-04-22 16:32:49 +00:00
CORE_SOURCES += $(MEDNAFEN_LIBRETRO_DIR)/scrc32.cpp
2012-12-28 22:03:33 +00:00
endif
ifeq ($(NEED_DEINTERLACER), 1)
FLAGS += -DNEED_DEINTERLACER
endif
ifeq ($(NEED_SCSI_CD), 1)
SCSI_CD_SOURCES := $(MEDNAFEN_DIR)/cdrom/scsicd.cpp
2012-12-28 22:03:33 +00:00
endif
ifeq ($(NEED_CD), 1)
CDROM_SOURCES := $(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/cdromif.cpp $(MEDNAFEN_DIR)/cdrom/crc32.cpp
2012-12-28 22:03:33 +00:00
FLAGS += -DNEED_CD
endif
ifeq ($(NEED_TREMOR), 1)
TREMOR_SRC := $(wildcard $(MEDNAFEN_DIR)/tremor/*.c)
FLAGS += -DNEED_TREMOR
endif
MEDNAFEN_SOURCES := $(MEDNAFEN_DIR)/error.cpp \
2012-12-28 22:03:33 +00:00
$(MEDNAFEN_DIR)/math_ops.cpp \
$(MEDNAFEN_DIR)/settings.cpp \
$(MEDNAFEN_DIR)/general.cpp \
$(MEDNAFEN_DIR)/FileWrapper.cpp \
$(MEDNAFEN_DIR)/FileStream.cpp \
$(MEDNAFEN_DIR)/MemoryStream.cpp \
$(MEDNAFEN_DIR)/Stream.cpp \
$(MEDNAFEN_DIR)/state.cpp \
$(MEDNAFEN_DIR)/mempatcher.cpp \
$(MEDNAFEN_DIR)/video/surface.cpp \
$(MEDNAFEN_DIR)/sound/Blip_Buffer.cpp \
2012-12-28 22:03:33 +00:00
$(MEDNAFEN_DIR)/file.cpp \
2014-04-22 16:32:49 +00:00
$(MEDNAFEN_DIR)/endian.cpp \
2012-12-28 22:03:33 +00:00
$(OKIADPCM_SOURCES) \
$(MEDNAFEN_DIR)/md5.cpp
2014-06-18 20:10:07 +00:00
LIBRETRO_SOURCES := $(MEDNAFEN_LIBRETRO_DIR)/libretro.cpp
2012-12-28 22:03:33 +00:00
2014-06-18 20:10:07 +00:00
SOURCES_C := $(TREMOR_SRC) $(LIBRETRO_SOURCES_C) $(MEDNAFEN_DIR)/trio/trio.c $(MEDNAFEN_DIR)/trio/triostr.c $(THREAD_SOURCES)
2012-12-28 22:03:33 +00:00
LOCAL_SRC_FILES += $(LIBRETRO_SOURCES) $(CORE_SOURCES) $(MEDNAFEN_SOURCES) $(CDROM_SOURCES) $(SCSI_CD_SOURCES) $(HW_CPU_SOURCES) $(HW_MISC_SOURCES) $(HW_SOUND_SOURCES) $(HW_VIDEO_SOURCES) $(SOURCES_C) $(CORE_CD_SOURCES)
2012-12-28 22:03:33 +00:00
WARNINGS := -Wall \
-Wno-sign-compare \
-Wno-unused-variable \
-Wno-unused-function \
-Wno-uninitialized \
$(NEW_GCC_WARNING_FLAGS) \
-Wno-strict-aliasing
2014-04-26 17:57:37 +00:00
EXTRA_GCC_FLAGS := -funroll-loops
2012-12-28 22:03:33 +00:00
ifeq ($(NO_GCC),1)
EXTRA_GCC_FLAGS :=
WARNINGS :=
endif
ifeq ($(DEBUG),0)
FLAGS += -O3 $(EXTRA_GCC_FLAGS)
else
FLAGS += -O0 -g
endif
ifneq ($(OLD_GCC),1)
NEW_GCC_WARNING_FLAGS += -Wno-narrowing \
-Wno-unused-but-set-variable \
-Wno-unused-result \
-Wno-overflow
NEW_GCC_FLAGS += -fno-strict-overflow
endif
LDFLAGS += $(fpic) $(SHARED)
FLAGS += $(fpic) $(NEW_GCC_FLAGS)
2013-01-16 14:35:13 +00:00
LOCAL_C_INCLUDES += .. ../mednafen ../mednafen/include ../mednafen/intl ../mednafen/hw_cpu ../mednafen/hw_sound ../mednafen/hw_misc ../mednafen/hw_video $(CORE_INCDIR) $(EXTRA_CORE_INCDIR)
2012-12-28 22:03:33 +00:00
2014-04-22 16:32:49 +00:00
FLAGS += $(ENDIANNESS_DEFINES) -DSIZEOF_DOUBLE=8 $(WARNINGS) -DMEDNAFEN_VERSION=\"0.9.26\" -DPACKAGE=\"mednafen\" -DMEDNAFEN_VERSION_NUMERIC=926 -DPSS_STYLE=1 -DMPC_FIXED_POINT $(CORE_DEFINE) -DSTDC_HEADERS -D__STDC_LIMIT_MACROS -D__LIBRETRO__ -DNDEBUG -D_LOW_ACCURACY_ $(SOUND_DEFINE) -DLSB_FIRST
2012-12-28 22:03:33 +00:00
ifeq ($(IS_X86), 1)
FLAGS += -DARCH_X86
endif
ifeq ($(CACHE_CD), 1)
FLAGS += -D__LIBRETRO_CACHE_CD__
endif
ifeq ($(NEED_BPP), 16)
FLAGS += -DWANT_16BPP
endif
2014-04-22 16:32:49 +00:00
ifeq ($(WANT_NEW_API), 1)
FLAGS += -DWANT_NEW_API
endif
2012-12-28 22:03:33 +00:00
ifeq ($(FRONTEND_SUPPORTS_RGB565), 1)
FLAGS += -DFRONTEND_SUPPORTS_RGB565
endif
ifeq ($(NEED_BPP), 32)
FLAGS += -DWANT_32BPP
endif
LOCAL_CFLAGS = $(FLAGS)
LOCAL_CXXFLAGS = $(FLAGS) -fexceptions
include $(BUILD_SHARED_LIBRARY)