Merge pull request #83 from GregorR/libretro-git-version
[pcsx_rearmed.git] / jni / Android.mk
index a0dbec3..9dd9e39 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
+
 APP_DIR := ../../src
 
 #fix stupid change in ndk r11 that breaks compiling even when the exe would run fine
@@ -95,7 +100,7 @@ LOCAL_SRC_FILES += ../frontend/main.c ../frontend/plugin.c ../frontend/cspace.c
 # libretro
 LOCAL_SRC_FILES += ../frontend/libretro.c
 
-LOCAL_CFLAGS += -O3 -ffast-math -funroll-loops -DNDEBUG -D_FILE_OFFSET_BITS=64 -DHAVE_LIBRETRO -DNO_FRONTEND -DFRONTEND_SUPPORTS_RGB565
+LOCAL_CFLAGS += -O3 -ffast-math -funroll-loops -DNDEBUG -D_FILE_OFFSET_BITS=64 -DHAVE_LIBRETRO -DNO_FRONTEND -DFRONTEND_SUPPORTS_RGB565 -DANDROID
 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include
 LOCAL_LDLIBS := -lz -llog