diff options
author | Aaron Kling | 2018-04-11 11:45:31 -0500 |
---|---|---|
committer | Aaron Kling | 2018-04-11 11:45:31 -0500 |
commit | c625e68871ff33ca14a76784e09d2e245c10b3e3 (patch) | |
tree | 96bf8c6582876d28a1746ba7357954a87c4b1149 /jni | |
parent | ba88b0b450fdc5a9e14a4193735de1982155f2c2 (diff) | |
download | snes9x2005-c625e68871ff33ca14a76784e09d2e245c10b3e3.tar.gz snes9x2005-c625e68871ff33ca14a76784e09d2e245c10b3e3.tar.bz2 snes9x2005-c625e68871ff33ca14a76784e09d2e245c10b3e3.zip |
Refactor android jni makefiles
Diffstat (limited to 'jni')
-rw-r--r-- | jni/Android.mk | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/jni/Android.mk b/jni/Android.mk index e832e41..e5cf6e3 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -1,38 +1,24 @@ LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" -ifneq ($(GIT_VERSION)," unknown") - LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" -endif - -CORE_DIR := ../source -LIBRETRO_DIR := .. +ROOT_DIR := $(LOCAL_PATH)/.. +CORE_DIR := $(ROOT_DIR)/source +LIBRETRO_DIR := $(ROOT_DIR) -DEBUG = 0 -PERF_TEST = 0 -LOAD_FROM_MEMORY_TEST = 1 -USE_BLARGG_APU = 0 - -LOCAL_MODULE := retro +LOAD_FROM_MEMORY_TEST := 1 +FLAGS := -ifeq ($(TARGET_ARCH),arm) -LOCAL_CFLAGS += -DANDROID_ARM -LOCAL_ARM_MODE := arm -endif +include $(ROOT_DIR)/Makefile.common -ifeq ($(TARGET_ARCH),x86) -LOCAL_CFLAGS += -DANDROID_X86 -endif +COREFLAGS := -ffast-math $(FLAGS) -ifeq ($(TARGET_ARCH),mips) -LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__ +GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" +ifneq ($(GIT_VERSION)," unknown") + COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" endif -include ../Makefile.common - -LOCAL_SRC_FILES += $(SOURCES_C) -LOCAL_CFLAGS += -std=gnu99 -ffast-math $(FLAGS) - +include $(CLEAR_VARS) +LOCAL_MODULE := retro +LOCAL_SRC_FILES := $(SOURCES_C) +LOCAL_CFLAGS := $(COREFLAGS) +LOCAL_LDFLAGS := -Wl,-version-script=$(LIBRETRO_DIR)/link.T include $(BUILD_SHARED_LIBRARY) |