Add git sha to odin version command

This commit is contained in:
Mikkel Hjortshoej
2020-08-23 15:25:19 +02:00
parent 16b50a2f57
commit ae2fc5830e
7 changed files with 35 additions and 44 deletions
+5 -1
View File
@@ -1,6 +1,7 @@
GIT_SHA=$(shell git rev-parse --short HEAD)
DISABLED_WARNINGS=-Wno-switch -Wno-pointer-sign -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare -Wno-macro-redefined
LDFLAGS=-pthread -ldl -lm -lstdc++
CFLAGS=-std=c++11
CFLAGS=-std=c++11 -DGIT_SHA=\"$(GIT_SHA)\"
CC=clang
OS=$(shell uname)
@@ -20,5 +21,8 @@ debug:
release:
$(CC) src/main.cpp $(DISABLED_WARNINGS) $(CFLAGS) -O3 -march=native $(LDFLAGS) -o odin
nightly:
$(CC) src/main.cpp $(DISABLED_WARNINGS) $(CFLAGS) -DNIGHTLY -O3 -march=native $(LDFLAGS) -o odin