build scripts: pass git commit hash as preprocessor symbol

This commit is contained in:
ole00 2024-03-19 21:01:34 +00:00
parent 52466f64c6
commit 757e13e55f
3 changed files with 13 additions and 3 deletions

View File

@ -1 +1,5 @@
gcc -g3 -O0 -DNO_CLOSE -o afterburner src_pc/afterburner.c
GCOM=`git rev-parse --short HEAD`
gcc -g3 -O0 -DNO_CLOSE -DGCOM="\"g${GCOM}\"" -o afterburner src_pc/afterburner.c

View File

@ -1,4 +1,7 @@
# path to your Osx cross-compiler
CC=~/opt/osxcross/bin/o64-clang
$CC -g3 -O0 -DNO_CLOSE -o afterburner_osx src_pc/afterburner.c
GCOM=`git rev-parse --short HEAD`
$CC -g3 -O0 -DNO_CLOSE -DGCOM="\"g${GCOM}\"" -o afterburner_osx src_pc/afterburner.c

View File

@ -1,4 +1,7 @@
# path to your Win64 cross-compiler
CC=~/opt/mingw64/bin/x86_64-w64-mingw32-gcc
$CC -g3 -O0 -o afterburner_w64.exe src_pc/afterburner.c -D_USE_WIN_API_ -DNO_CLOSE
GCOM=`git rev-parse --short HEAD`
$CC -g3 -O0 -o afterburner_w64.exe src_pc/afterburner.c -D_USE_WIN_API_ -DNO_CLOSE -DGCOM="\"g${GCOM}\""