Skip to content

Commit

Permalink
Refactor android jni makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
webgeek1234 committed Apr 9, 2018
1 parent 494885c commit f50e946
Showing 1 changed file with 11 additions and 26 deletions.
37 changes: 11 additions & 26 deletions jni/Android.mk
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit f50e946

Please sign in to comment.