Merge pull request #34 from GregorR/libretro-git-version

Report git version with library_version
This commit is contained in:
Twinaphex 2016-12-10 00:42:50 +01:00 committed by GitHub
commit e87b0278d9
3 changed files with 13 additions and 1 deletions

View File

@ -62,6 +62,10 @@ else ifneq ($(findstring Darwin,$(UNAME)),)
endif
TARGET_NAME := gpsp
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
LIBM := -lm
CORE_DIR := .
LDFLAGS :=

View 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
LOCAL_MODULE := retro
CPU_ARCH :=

View File

@ -116,7 +116,10 @@ extern struct retro_perf_callback perf_cb;
void retro_get_system_info(struct retro_system_info* info)
{
info->library_name = "gpSP";
info->library_version = "v0.91";
#ifndef GIT_VERSION
#define GIT_VERSION ""
#endif
info->library_version = "v0.91" GIT_VERSION;
info->need_fullpath = true;
info->block_extract = false;
info->valid_extensions = "gba|bin|agb|gbz" ;