mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-25 01:12:39 +00:00
Makefile: add EXESUFFIX
Appends to branch name, separated by underscore, before
.exe.
Also fixed faulty $(dbg) from 607fe240b.
This commit is contained in:
parent
5be854683e
commit
1b4fe4e13d
3 changed files with 14 additions and 16 deletions
25
src/Makefile
25
src/Makefile
|
|
@ -183,19 +183,6 @@ 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:=
|
||||
|
|
@ -206,6 +193,9 @@ nasm_format:=
|
|||
# also defines the name as a macro to the compiler.
|
||||
passthru_opts:=
|
||||
|
||||
# separate suffix with an underscore
|
||||
exesuffix:=$(call _,$(EXESUFFIX))
|
||||
|
||||
include Makefile.d/platform.mk
|
||||
include Makefile.d/features.mk
|
||||
include Makefile.d/versions.mk
|
||||
|
|
@ -248,8 +238,13 @@ else
|
|||
EXEDIR?=../bin
|
||||
endif
|
||||
|
||||
# default EXENAME (usually set by platform)
|
||||
EXENAME?=$(exe)
|
||||
# append branch name by default
|
||||
ifndef EXENAME
|
||||
base:=ringracers
|
||||
branch:=$(shell git symbolic-ref -q --short HEAD)
|
||||
EXENAME:=$(base)$(call _,$(branch))$(exesuffix)
|
||||
endif
|
||||
|
||||
DBGNAME?=$(EXENAME).debug
|
||||
|
||||
exe:=$(EXEDIR)/$(EXENAME)
|
||||
|
|
|
|||
|
|
@ -91,3 +91,6 @@ endif
|
|||
endif
|
||||
|
||||
.=$(call Ifndef,ECHO,@)
|
||||
|
||||
# prepends an underscore if not empty
|
||||
_=$(if $(1),_$(1))
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# Mingw, if you don't know, that's Win32/Win64
|
||||
#
|
||||
|
||||
exe:=$(exe)$(if $(MINGW64),64).exe
|
||||
exesuffix:=$(exesuffix)$(if $(MINGW64),64).exe
|
||||
|
||||
# disable dynamicbase if under msys2
|
||||
ifdef MSYSTEM
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue