2012-12-05 11:17:57 -05:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
2016-11-26 16:02:09 -05:00
|
|
|
|
2016-03-22 16:40:02 +01:00
|
|
|
include $(CLEAR_VARS)
|
2013-10-14 21:08:41 +02:00
|
|
|
|
2015-09-20 16:05:18 +02:00
|
|
|
RARCH_DIR := ../../../..
|
2012-12-05 11:17:57 -05:00
|
|
|
|
2015-08-29 17:06:39 +02:00
|
|
|
HAVE_NEON := 1
|
|
|
|
HAVE_LOGGER := 0
|
2016-09-29 12:22:31 +02:00
|
|
|
HAVE_VULKAN := 1
|
2014-06-11 12:37:58 +02:00
|
|
|
|
2016-03-01 19:04:20 +01:00
|
|
|
INCFLAGS :=
|
2016-03-01 18:59:12 +01:00
|
|
|
DEFINES :=
|
|
|
|
|
2016-09-20 01:54:24 +02:00
|
|
|
LIBRETRO_COMM_DIR := $(RARCH_DIR)/libretro-common
|
2016-09-20 01:54:59 +02:00
|
|
|
DEPS_DIR := $(RARCH_DIR)/deps
|
2016-09-20 01:54:24 +02:00
|
|
|
|
2016-11-26 16:02:09 -05:00
|
|
|
GIT_VERSION := $(shell git rev-parse --short HEAD 2>/dev/null)
|
|
|
|
ifneq ($(GIT_VERSION),)
|
|
|
|
DEFINES += -DHAVE_GIT_VERSION -DGIT_VERSION=$(GIT_VERSION)
|
|
|
|
endif
|
|
|
|
|
2016-03-22 16:40:02 +01:00
|
|
|
include $(CLEAR_VARS)
|
2014-06-11 12:37:58 +02:00
|
|
|
ifeq ($(TARGET_ARCH),arm)
|
2016-03-01 18:59:12 +01:00
|
|
|
DEFINES += -DANDROID_ARM -marm
|
2016-03-22 16:40:02 +01:00
|
|
|
LOCAL_ARM_MODE := arm
|
2014-06-11 12:37:58 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(TARGET_ARCH),x86)
|
2016-03-01 18:59:12 +01:00
|
|
|
DEFINES += -DANDROID_X86 -DHAVE_SSSE3
|
2014-06-11 12:37:58 +02:00
|
|
|
endif
|
|
|
|
|
2016-03-22 16:40:02 +01:00
|
|
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
|
|
|
|
|
|
|
ifeq ($(HAVE_NEON),1)
|
|
|
|
DEFINES += -D__ARM_NEON__
|
2016-12-12 13:26:45 +01:00
|
|
|
LOCAL_SRC_FILES += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float_neon.S.neon \
|
|
|
|
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.S.neon \
|
|
|
|
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.S.neon \
|
2016-09-20 01:54:24 +02:00
|
|
|
$(RARCH_DIR)/audio/drivers_resampler/cc_resampler_neon.S.neon
|
2016-03-22 16:40:02 +01:00
|
|
|
endif
|
|
|
|
DEFINES += -DSINC_LOWER_QUALITY
|
|
|
|
DEFINES += -DANDROID_ARM_V7
|
|
|
|
endif
|
|
|
|
|
2017-06-04 20:38:53 -05:00
|
|
|
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
2017-06-04 20:55:51 -05:00
|
|
|
DEFINES += -DANDROID_AARCH64
|
2017-06-04 20:38:53 -05:00
|
|
|
endif
|
|
|
|
|
2016-03-22 16:40:02 +01:00
|
|
|
ifeq ($(TARGET_ARCH),mips)
|
|
|
|
DEFINES += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
|
|
|
|
endif
|
|
|
|
|
|
|
|
LOCAL_MODULE := retroarch-activity
|
|
|
|
|
2016-09-20 01:54:24 +02:00
|
|
|
LOCAL_SRC_FILES += $(RARCH_DIR)/griffin/griffin.c \
|
|
|
|
$(RARCH_DIR)/griffin/griffin_cpp.cpp
|
2016-03-22 16:40:02 +01:00
|
|
|
|
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
|
|
DEFINES += -DHAVE_LOGGER
|
|
|
|
endif
|
|
|
|
LOGGER_LDLIBS := -llog
|
|
|
|
|
|
|
|
ifeq ($(GLES),3)
|
|
|
|
GLES_LIB := -lGLESv3
|
|
|
|
DEFINES += -DHAVE_OPENGLES3
|
|
|
|
else
|
|
|
|
GLES_LIB := -lGLESv2
|
2016-12-08 15:22:00 -07:00
|
|
|
DEFINES += -DHAVE_OPENGLES2
|
2016-03-22 16:40:02 +01:00
|
|
|
endif
|
|
|
|
|
2017-09-19 21:19:34 +02:00
|
|
|
DEFINES += -DRARCH_MOBILE -DHAVE_GRIFFIN -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_EGL -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DINLINE=inline -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETWORKGAMEPAD -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_SHADERPIPELINE -DHAVE_LIBRETRODB -DHAVE_STB_FONT -DHAVE_IMAGEVIEWER -DHAVE_UPDATE_ASSETS -DHAVE_CC_RESAMPLER -DHAVE_MINIUPNPC -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -DHAVE_KEYMAPPER -DHAVE_NETWORKGAMEPAD -DHAVE_FLAC -DHAVE_CHD
|
2016-03-03 02:08:47 +01:00
|
|
|
DEFINES += -DWANT_IFADDRS
|
2016-03-01 18:46:40 +01:00
|
|
|
|
|
|
|
ifeq ($(HAVE_VULKAN),1)
|
2016-03-22 16:40:02 +01:00
|
|
|
DEFINES += -DHAVE_VULKAN
|
2016-03-01 18:46:40 +01:00
|
|
|
endif
|
2016-03-01 18:59:12 +01:00
|
|
|
DEFINES += -DHAVE_7ZIP
|
|
|
|
DEFINES += -DHAVE_CHEEVOS
|
|
|
|
DEFINES += -DHAVE_SL
|
2017-07-09 00:14:46 +02:00
|
|
|
#DEFINES += -DHAVE_TINYALSA
|
2016-03-01 18:46:40 +01:00
|
|
|
|
2016-03-22 16:40:02 +01:00
|
|
|
LOCAL_CFLAGS += -Wall -std=gnu99 -pthread -Wno-unused-function -fno-stack-protector -funroll-loops $(DEFINES)
|
2016-05-15 13:53:12 +02:00
|
|
|
LOCAL_CPPFLAGS := -fexceptions -fpermissive -std=gnu++11 -fno-rtti -Wno-reorder $(DEFINES)
|
2016-03-22 16:40:02 +01:00
|
|
|
|
|
|
|
# Let ndk-build set the optimization flags but remove -O3 like in cf3c3
|
|
|
|
LOCAL_CFLAGS := $(subst -O3,-O2,$(LOCAL_CFLAGS))
|
|
|
|
|
|
|
|
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -landroid -lEGL $(GLES_LIB) $(LOGGER_LDLIBS) -ldl
|
2017-02-16 00:59:22 +01:00
|
|
|
LOCAL_C_INCLUDES := \
|
|
|
|
$(LOCAL_PATH)/$(RARCH_DIR)/libretro-common/include/ \
|
|
|
|
$(LOCAL_PATH)/$(RARCH_DIR)/deps
|
|
|
|
|
2014-06-11 12:37:58 +02:00
|
|
|
|
2016-03-22 16:40:02 +01:00
|
|
|
ifeq ($(HAVE_VULKAN),1)
|
|
|
|
INCFLAGS += $(LOCAL_PATH)/$(RARCH_DIR)/gfx/include
|
|
|
|
|
|
|
|
LOCAL_C_INCLUDES += $(INCFLAGS)
|
2016-09-20 01:54:24 +02:00
|
|
|
LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/$(DEPS_DIR)/glslang \
|
|
|
|
-I$(LOCAL_PATH)/$(DEPS_DIR)/glslang/glslang/glslang/Public \
|
|
|
|
-I$(LOCAL_PATH)/$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent \
|
|
|
|
-I$(LOCAL_PATH)/$(DEPS_DIR)/glslang/glslang/SPIRV \
|
|
|
|
-I$(LOCAL_PATH)/$(DEPS_DIR)/spir2cross \
|
|
|
|
-I$(LOCAL_PATH)/$(DEPS_DIR)/SPIRV-Cross
|
2016-03-22 16:40:02 +01:00
|
|
|
|
2016-06-25 14:44:56 +02:00
|
|
|
LOCAL_CFLAGS += -Wno-sign-compare -Wno-unused-variable -Wno-parentheses
|
2016-09-20 01:54:24 +02:00
|
|
|
LOCAL_SRC_FILES += $(DEPS_DIR)/glslang/glslang.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/SPIRV/SpvBuilder.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/SPIRV/Logger.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/SPIRV/SPVRemapper.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/SPIRV/InReadableOrder.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/SPIRV/doc.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/SPIRV/GlslangToSpv.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/SPIRV/disassemble.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/OGLCompilersDLL/InitializeDll.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/GenericCodeGen/Link.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/GenericCodeGen/CodeGen.cpp \
|
2016-12-05 04:24:45 +01:00
|
|
|
$(DEPS_DIR)/glslang/glslang/hlsl/hlslAttributes.cpp \
|
2016-09-20 01:54:24 +02:00
|
|
|
$(DEPS_DIR)/glslang/glslang/hlsl/hlslGrammar.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/hlsl/hlslOpMap.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/hlsl/hlslTokenStream.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/hlsl/hlslScanContext.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/hlsl/hlslParseHelper.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/hlsl/hlslParseables.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Intermediate.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/propagateNoContraction.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/glslang_tab.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Versions.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/RemoveTree.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/limits.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/intermOut.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Initialize.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/SymbolTable.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/parseConst.cpp \
|
2016-12-05 04:24:45 +01:00
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/ParseContextBase.cpp \
|
2016-09-20 01:54:24 +02:00
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/ParseHelper.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/IntermTraverse.cpp \
|
2016-12-05 04:24:45 +01:00
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/iomapper.cpp \
|
2016-09-20 01:54:24 +02:00
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/InfoSink.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Constant.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Scan.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/reflection.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/linkValidate.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/PoolAlloc.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp \
|
|
|
|
$(DEPS_DIR)/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp
|
2016-03-01 18:46:40 +01:00
|
|
|
endif
|
|
|
|
|
2014-06-11 12:37:58 +02:00
|
|
|
LOCAL_LDLIBS += -lOpenSLES -lz
|
|
|
|
|
2015-12-05 09:59:03 -03:00
|
|
|
ifneq ($(SANITIZER),)
|
|
|
|
LOCAL_CFLAGS += -g -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
|
|
|
|
LOCAL_CPPFLAGS += -g -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
|
|
|
|
LOCAL_LDFLAGS += -fsanitize=$(SANITIZER)
|
|
|
|
endif
|
|
|
|
|
2014-06-11 12:37:58 +02:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|