Commit d5b2972f authored by Gregor Richards's avatar Gregor Richards
Browse files

Follow the convention used in (some) other cores.

parent fba476cf
......@@ -29,8 +29,8 @@ else ifneq ($(findstring MINGW,$(shell uname -a)),)
endif
TARGET_NAME := 2048
GIT_VERSION := "$(shell git describe --abbrev=7 --dirty --always --tags || echo unknown)"
ifneq ($(GIT_VERSION),"unknown")
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
LIBM := -lm
......
......@@ -4,6 +4,11 @@ include $(CLEAR_VARS)
LOCAL_MODULE := retro
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -DANDROID_ARM
LOCAL_ARM_MODE := arm
......
......@@ -127,11 +127,10 @@ void retro_get_system_info(struct retro_system_info *info)
{
memset(info, 0, sizeof(*info));
info->library_name = "2048";
#ifdef GIT_VERSION
info->library_version = GIT_VERSION;
#else
info->library_version = "v1.0";
#ifndef GIT_VERSION
#define GIT_VERSION ""
#endif
info->library_version = "v1.0" GIT_VERSION;
info->need_fullpath = false;
info->valid_extensions = NULL; /* Anything is fine, we don't care. */
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment