2014-12-10 04:54:32 +01:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
2018-04-06 23:13:44 +02:00
|
|
|
CORE_DIR := $(LOCAL_PATH)/..
|
|
|
|
|
2018-03-31 22:03:16 +02:00
|
|
|
CORE_LDLIBS :=
|
|
|
|
CPU_ARCH :=
|
|
|
|
HAVE_DYNAREC :=
|
2014-12-10 04:54:32 +01:00
|
|
|
|
2018-04-06 23:13:44 +02:00
|
|
|
COREFLAGS := -DINLINE=inline -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565
|
2016-12-10 00:42:12 +01:00
|
|
|
|
2014-12-10 04:54:32 +01:00
|
|
|
ifeq ($(TARGET_ARCH),arm)
|
2018-04-06 23:13:44 +02:00
|
|
|
COREFLAGS += -DARM_ARCH -DARM_MEMORY_DYNAREC
|
2018-03-31 22:03:16 +02:00
|
|
|
CPU_ARCH := arm
|
|
|
|
HAVE_DYNAREC := 1
|
2018-04-06 23:13:44 +02:00
|
|
|
else ifeq ($(TARGET_ARCH),x86)
|
|
|
|
COREFLAGS += -DHAVE_MMAP
|
2018-03-31 22:03:16 +02:00
|
|
|
CPU_ARCH := x86_32
|
|
|
|
HAVE_DYNAREC := 1
|
2014-12-10 15:21:49 +01:00
|
|
|
endif
|
2014-12-10 04:54:32 +01:00
|
|
|
|
2014-12-10 20:31:56 +01:00
|
|
|
ifeq ($(HAVE_DYNAREC),1)
|
2018-04-06 23:13:44 +02:00
|
|
|
COREFLAGS += -DHAVE_DYNAREC
|
2018-03-31 22:03:16 +02:00
|
|
|
CORE_LDLIBS += -Wl,--no-warn-shared-textrel
|
2014-12-10 20:31:56 +01:00
|
|
|
endif
|
2014-12-10 04:54:32 +01:00
|
|
|
|
2014-12-10 05:46:03 +01:00
|
|
|
include $(CORE_DIR)/Makefile.common
|
|
|
|
|
2018-04-06 23:13:44 +02:00
|
|
|
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
|
|
|
|
ifneq ($(GIT_VERSION)," unknown")
|
|
|
|
COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
|
|
|
endif
|
2014-12-10 04:54:32 +01:00
|
|
|
|
2018-03-31 22:03:16 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := retro
|
|
|
|
LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_ASM)
|
2018-04-06 23:13:44 +02:00
|
|
|
LOCAL_CFLAGS := $(COREFLAGS) $(INCFLAGS)
|
|
|
|
LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/link.T
|
2018-03-31 22:03:16 +02:00
|
|
|
LOCAL_LDLIBS := $(CORE_LDLIBS)
|
2014-12-10 04:54:32 +01:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|