Merge pull request #47 from webgeek1234/master

Refactor android jni makefiles
This commit is contained in:
Andrés 2018-04-06 20:31:44 -05:00 committed by GitHub
commit 434612ab68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 18 deletions

View File

@ -1,44 +1,39 @@
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
CORE_CFLAGS := CORE_DIR := $(LOCAL_PATH)/..
CORE_LDLIBS := CORE_LDLIBS :=
CPU_ARCH := CPU_ARCH :=
HAVE_DYNAREC := HAVE_DYNAREC :=
SOURCES_C :=
SOURCES_ASM :=
CORE_DIR := .. COREFLAGS := -DINLINE=inline -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
CORE_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
ifeq ($(TARGET_ARCH),arm) ifeq ($(TARGET_ARCH),arm)
CORE_CFLAGS += -DARM_ARCH -DARM_MEMORY_DYNAREC COREFLAGS += -DARM_ARCH -DARM_MEMORY_DYNAREC
CPU_ARCH := arm CPU_ARCH := arm
HAVE_DYNAREC := 1 HAVE_DYNAREC := 1
endif else ifeq ($(TARGET_ARCH),x86)
COREFLAGS += -DHAVE_MMAP
ifeq ($(TARGET_ARCH),x86)
CORE_CFLAGS += -DHAVE_MMAP
CPU_ARCH := x86_32 CPU_ARCH := x86_32
HAVE_DYNAREC := 1 HAVE_DYNAREC := 1
endif endif
ifeq ($(HAVE_DYNAREC),1) ifeq ($(HAVE_DYNAREC),1)
CORE_CFLAGS += -DHAVE_DYNAREC COREFLAGS += -DHAVE_DYNAREC
CORE_LDLIBS += -Wl,--no-warn-shared-textrel CORE_LDLIBS += -Wl,--no-warn-shared-textrel
endif endif
include $(CORE_DIR)/Makefile.common include $(CORE_DIR)/Makefile.common
CORE_CFLAGS += -DINLINE=inline -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 $(INCFLAGS) GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := retro LOCAL_MODULE := retro
LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_ASM) LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_ASM)
LOCAL_CFLAGS := $(CORE_CFLAGS) LOCAL_CFLAGS := $(COREFLAGS) $(INCFLAGS)
LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/link.T
LOCAL_LDLIBS := $(CORE_LDLIBS) LOCAL_LDLIBS := $(CORE_LDLIBS)
LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)