File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,20 @@ endif
1212
1313export PATH := $(DEVKITPPC ) /bin:$(PATH )
1414
15- export LIBOGC_MAJOR := 2
16- export LIBOGC_MINOR := 12
17- export LIBOGC_PATCH := 2
18-
1915include $(DEVKITPPC ) /base_rules
2016
2117BUILD := build
2218
2319DATESTRING := $(shell date +% Y% m% d)
2420VERSTRING := $(LIBOGC_MAJOR ) .$(LIBOGC_MINOR ) .$(LIBOGC_PATCH )
21+ ifeq ($(strip $(LIBOGC_VER ) ) ,)
22+ export LIBOGC_VER := $(shell git describe --tags)
23+ endif
24+
25+ export LIBOGC_MAJOR := ` echo $( LIBOGC_VER) | sed " s/^v\([0-9]*\).*/\1/" `
26+ export LIBOGC_MINOR := ` echo $( LIBOGC_VER) | sed " s/v[0-9]*\.\([0-9]*\).*/\1/" `
27+ export LIBOGC_PATCH := ` echo $( LIBOGC_VER) | sed " s/v[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/" `
28+ export LIBOGC_SUFFIX := ` echo $( LIBOGC_VER) | sed " s/v[0-9]*\.[0-9]*\.[0-9]*\(.*\)/\1/" `
2529
2630# ---------------------------------------------------------------------------------
2731ifeq ($(strip $(PLATFORM ) ) ,)
@@ -224,7 +228,7 @@ gc/ogc/libversion.h : Makefile
224228 @echo "# define _V_DATE_ __DATE__" >> $@
225229 @echo "# define _V_TIME_ __TIME__" >> $@
226230 @echo >> $@
227- @echo '# define _V_STRING "libOGC Release '$(LIBOGC_MAJOR).$(LIBOGC_MINOR).$(LIBOGC_PATCH)'"' >> $@
231+ @echo '# define _V_STRING "libOGC Release '$(LIBOGC_MAJOR).$(LIBOGC_MINOR).$(LIBOGC_PATCH)$(LIBOGC_SUFFIX) '"' >> $@
228232 @echo >> $@
229233 @echo "# endif // __LIBVERSION_H__" >> $@
230234
You can’t perform that action at this time.
0 commit comments