add git branch to logs

This commit is contained in:
FunkyFr3sh 2024-09-01 09:40:46 +02:00
parent 7c85e9c494
commit 0f2a367c36
4 changed files with 65 additions and 16 deletions

View file

@ -1,12 +1,15 @@
-include config.mk
TARGET = ddraw.dll
GIT_REV := $(shell git rev-parse --short @{0} || echo "UNKNOWN")
GIT_FILE := $(shell echo "#define GIT_COMMIT" $(GIT_REV) > inc/version_tmp.h)
LDFLAGS = -Wl,--enable-stdcall-fixup -s -static -shared
CFLAGS = -Iinc -O2 -march=i486 -Wall
LIBS = -lgdi32 -lwinmm -ldbghelp -lole32
REV := $(shell git rev-parse --short HEAD || echo "UNKNOWN")
BRANCH := $(shell git rev-parse --abbrev-ref HEAD || echo "UNKNOWN")
EREV := $(shell echo "#define GIT_COMMIT" $(REV) > inc/version_tmp.h)
EBRANCH := $(shell echo "#define GIT_BRANCH" $(BRANCH) >> inc/version_tmp.h)
CC = i686-w64-mingw32-gcc
WINDRES ?= i686-w64-mingw32-windres