From: Gregor Richards Date: Sat, 10 Dec 2016 00:56:33 +0000 (-0500) Subject: Report git version with library_version X-Git-Tag: r24l~814^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=8fc5171a4c53b6f0e7ef7247d36ee5e05eaf0a07;p=pcsx_rearmed.git Report git version with library_version --- diff --git a/Makefile.libretro b/Makefile.libretro index a7fa0ebb..df1cec26 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -22,6 +22,10 @@ CC_AS ?= $(CC) CFLAGS ?= TARGET_NAME := pcsx_rearmed +GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" +ifneq ($(GIT_VERSION)," unknown") + CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" +endif LIBZ := -lz LIBPTHREAD := -lpthread LIBDL := -ldl diff --git a/frontend/libretro.c b/frontend/libretro.c index 44cb9747..589f07cb 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -638,7 +638,10 @@ void retro_get_system_info(struct retro_system_info *info) { memset(info, 0, sizeof(*info)); info->library_name = "PCSX-ReARMed"; - info->library_version = "r22"; +#ifndef GIT_VERSION +#define GIT_VERSION "" +#endif + info->library_version = "r22" GIT_VERSION; info->valid_extensions = "bin|cue|img|mdf|pbp|toc|cbn|m3u"; info->need_fullpath = true; } diff --git a/jni/Android.mk b/jni/Android.mk index 43a98da9..9dd9e399 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -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