Refactor android jni makefiles

This commit is contained in:
Aaron Kling 2018-04-09 16:41:52 -05:00
parent 494885cc2c
commit f50e946c18

View File

@ -1,35 +1,20 @@
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) ROOT_DIR := $(LOCAL_PATH)/..
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 := ../
CORE_DIR := $(ROOT_DIR)/src CORE_DIR := $(ROOT_DIR)/src
include $(ROOT_DIR)/Makefile.common 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) GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
LOCAL_C_INCLUDES = $(INCFLAGS) 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) include $(BUILD_SHARED_LIBRARY)