Refactor android jni makefiles

This commit is contained in:
Aaron Kling 2018-04-05 10:17:47 -05:00
parent f892b4437d
commit 5de89d61b3

View File

@ -1,30 +1,20 @@
LOCAL_PATH := $(call my-dir)
GIT_VERSION := " $(shell git rev-parse --short HEAD)"
include $(CLEAR_VARS)
LOCAL_MODULE := retro
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 -D__mips__ -D__MIPSEL__
endif
CORE_DIR = ..
CORE_DIR := $(LOCAL_PATH)/..
include $(CORE_DIR)/Makefile.common
LOCAL_SRC_FILES += $(SOURCES_C)
LOCAL_CFLAGS += -O2 -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DNDEBUG=1 -DGIT_VERSION=\"$(GIT_VERSION)\" $(INCFLAGS)
COREFLAGS := -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 $(INCFLAGS)
LOCAL_LDLIBS += -lz -llog
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=$(CORE_DIR)/link.T
LOCAL_LDLIBS := -llog -lz
include $(BUILD_SHARED_LIBRARY)