Report git version with library_version
[pcsx_rearmed.git] / Makefile.libretro
index a7fa0eb..df1cec2 100644 (file)
@@ -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