mirror of
https://github.com/accelerator74/l4dtoolz.git
synced 2024-12-22 14:37:26 +08:00
Print git version hash if available
This commit is contained in:
parent
934b59b480
commit
2b9ddf260d
6
Makefile
6
Makefile
@ -1,6 +1,8 @@
|
||||
# (C)2004-2010 Metamod:Source Development Team
|
||||
# Makefile written by David "BAILOPAN" Anderson
|
||||
|
||||
GIT_VERSION = $(shell sh -c 'git describe --abbrev=8 --dirty --always')
|
||||
|
||||
###########################################
|
||||
### EDIT THESE PATHS FOR YOUR OWN SETUP ###
|
||||
###########################################
|
||||
@ -46,6 +48,10 @@ ifeq "$(ENGINE)" "left4dead2"
|
||||
CFLAGS += -DSOURCE_ENGINE=9 -DL4D2
|
||||
endif
|
||||
|
||||
ifneq "$(GIT_VERSION)" ""
|
||||
CFLAGS += -D__GIT_VERSION=\"$(GIT_VERSION)\"
|
||||
endif
|
||||
|
||||
HL2PUB = $(HL2SDK)/public
|
||||
|
||||
|
||||
|
@ -270,7 +270,11 @@ const char *l4dtoolz::GetLicense()
|
||||
|
||||
const char *l4dtoolz::GetVersion()
|
||||
{
|
||||
return "1.0.0.9f";
|
||||
#ifdef __GIT_VERSION
|
||||
return __GIT_VERSION;
|
||||
#else
|
||||
return "1.0.0.9g-unknown";
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *l4dtoolz::GetDate()
|
||||
|
Loading…
Reference in New Issue
Block a user