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

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

View File

@@ -25,6 +25,10 @@ CFLAGS ?=
TARGET_NAME := picodrive
LIBM := -lm
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
asm_memory = 0
asm_render = 0

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
#fix stupid change in ndk r11 that breaks compiling even when the exe would run fine
LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true

View File

@@ -539,7 +539,10 @@ void retro_get_system_info(struct retro_system_info *info)
{
memset(info, 0, sizeof(*info));
info->library_name = "PicoDrive";
info->library_version = VERSION;
#ifndef GIT_VERSION
#define GIT_VERSION ""
#endif
info->library_version = VERSION GIT_VERSION;
info->valid_extensions = "bin|gen|smd|md|32x|cue|iso|sms";
info->need_fullpath = true;
}