From f50e946c189411e55bc5bc90f8951368e873cd48 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Mon, 9 Apr 2018 16:41:52 -0500 Subject: [PATCH] Refactor android jni makefiles --- jni/Android.mk | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/jni/Android.mk b/jni/Android.mk index fc32dff..ee17060 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -1,35 +1,20 @@ 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 - -ifeq ($(TARGET_ARCH),arm) -LOCAL_CFLAGS += -DANDROID_ARM -LOCAL_ARM_MODE := arm -endif - -ifeq ($(TARGET_ARCH),x86) -LOCAL_CFLAGS += -DANDROID_X86 -endif - -ifeq ($(TARGET_ARCH),mips) -LOCAL_CFLAGS += -DANDROID_MIPS -endif - -LOCAL_MODULE := libretro - -ROOT_DIR := ../ +ROOT_DIR := $(LOCAL_PATH)/.. CORE_DIR := $(ROOT_DIR)/src include $(ROOT_DIR)/Makefile.common -LOCAL_SRC_FILES = $(SOURCES_C) +COREFLAGS := -DHAVE_LIBMAD -DMUSIC_SUPPORT $(COREDEFINES) $(INCFLAGS) -LOCAL_CFLAGS += -O3 -DHAVE_LIBMAD -DMUSIC_SUPPORT $(COREDEFINES) $(INCFLAGS) -LOCAL_C_INCLUDES = $(INCFLAGS) +GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" +ifneq ($(GIT_VERSION)," unknown") + COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" +endif +include $(CLEAR_VARS) +LOCAL_MODULE := retro +LOCAL_SRC_FILES := $(SOURCES_C) +LOCAL_CFLAGS := $(COREFLAGS) +LOCAL_LDFLAGS := -Wl,-version-script=$(ROOT_DIR)/libretro/link.T include $(BUILD_SHARED_LIBRARY)