Makefile: append branch name to EXENAME if not manually set

This commit is contained in:
James R 2022-08-11 01:09:19 -07:00
parent 5ebcf86d7d
commit 607fe240bb
2 changed files with 15 additions and 6 deletions

View file

@ -183,6 +183,19 @@ include Makefile.d/detect.mk
sources:=
makedir:=../make
exe:=ringracers
# append branch name by default
ifndef EXENAME
branch:=$(shell git symbolic-ref -q --short HEAD)
# not a detached HEAD
ifdef branch
exe:=$(exe)_$(branch)
endif
endif
# -DCOMPVERSION: flag to use comptime.h
opts:=-DCOMPVERSION -g
libs:=
@ -236,7 +249,7 @@ bin:=../bin
endif
# default EXENAME (usually set by platform)
EXENAME?=ringracers
EXENAME?=$(exe)
DBGNAME?=$(EXENAME).debug
exe:=$(bin)/$(EXENAME)

View file

@ -2,11 +2,7 @@
# Mingw, if you don't know, that's Win32/Win64
#
ifndef MINGW64
EXENAME?=ringracers.exe
else
EXENAME?=ringracers64.exe
endif
exe:=$(exe)$(if $(MINGW64),64).exe
# disable dynamicbase if under msys2
ifdef MSYSTEM