Report git version with library_version
[picodrive.git] / Makefile.libretro
index b2759d8..07da266 100644 (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