Commit f2235a15 authored by phcoder's avatar phcoder
Browse files

Add git version to the reported version

parent 39348ee0
......@@ -49,6 +49,11 @@ ifeq ($(STATIC_LINKING), 1)
EXT := a
endif
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
CXXFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
ifneq (,$(findstring unix,$(platform)))
EXT ?= so
TARGET := $(TARGET_NAME)_libretro.$(EXT)
......
......@@ -93,7 +93,10 @@ extern "C"
std::memset(info, 0, sizeof(*info));
info->library_name = "retro-8 (alpha)";
info->library_version = "0.1b";
#ifndef GIT_VERSION
#define GIT_VERSION ""
#endif
info->library_version = "0.1b" GIT_VERSION;
info->need_fullpath = false;
info->valid_extensions = "p8|png";
}
......
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