android: solve "text segment is not shareable"
[picodrive.git] / jni / Android.mk
index 60d6f7d..54b9f06 100644 (file)
@@ -2,6 +2,11 @@ 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
+
 #fix stupid change in ndk r11 that breaks compiling even when the exe would run fine
 LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true
 
@@ -23,7 +28,6 @@ asm_memory = 0
 asm_render = 0
 asm_ym2612 = 0
 asm_misc = 0
-asm_cdpico = 0
 asm_cdmemory = 0
 asm_mix = 0
 
@@ -34,16 +38,19 @@ ifeq ($(TARGET_ARCH),arm)
   endif
 
   use_cyclone = 1
-  use_drz80 = 1
+
+  # texrels, -perf ~~8%
+  use_drz80 = 0
+  use_cz80 = 1
+
   use_sh2drc = 1
   use_svpdrc = 1
 
-  asm_memory = 1
+#  asm_memory = 1 # texrels, -perf negligible
   asm_render = 1
-  asm_ym2612 = 1
+#  asm_ym2612 = 1 # texrels, -perf ~~4%
   asm_misc = 1
-  asm_cdpico = 1
-  asm_cdmemory = 1
+#  asm_cdmemory = 1 # texrels
   asm_mix = 1
 else
   use_fame = 1
@@ -51,6 +58,9 @@ else
   use_sh2mame = 1
 endif
 
+# PD is currently not strict aliasing safe
+LOCAL_CFLAGS += -fno-strict-aliasing
+
 # sources
 SRCS_COMMON :=
 DEFINES :=