mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 02:00:11 +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:=
|
sources:=
|
||||||
makedir:=../make
|
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
|
# -DCOMPVERSION: flag to use comptime.h
|
||||||
opts:=-DCOMPVERSION -g
|
opts:=-DCOMPVERSION -g
|
||||||
libs:=
|
libs:=
|
||||||
|
|
@ -206,6 +193,9 @@ nasm_format:=
|
||||||
# also defines the name as a macro to the compiler.
|
# also defines the name as a macro to the compiler.
|
||||||
passthru_opts:=
|
passthru_opts:=
|
||||||
|
|
||||||
|
# separate suffix with an underscore
|
||||||
|
exesuffix:=$(call _,$(EXESUFFIX))
|
||||||
|
|
||||||
include Makefile.d/platform.mk
|
include Makefile.d/platform.mk
|
||||||
include Makefile.d/features.mk
|
include Makefile.d/features.mk
|
||||||
include Makefile.d/versions.mk
|
include Makefile.d/versions.mk
|
||||||
|
|
@ -248,8 +238,13 @@ else
|
||||||
EXEDIR?=../bin
|
EXEDIR?=../bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# default EXENAME (usually set by platform)
|
# append branch name by default
|
||||||
EXENAME?=$(exe)
|
ifndef EXENAME
|
||||||
|
base:=ringracers
|
||||||
|
branch:=$(shell git symbolic-ref -q --short HEAD)
|
||||||
|
EXENAME:=$(base)$(call _,$(branch))$(exesuffix)
|
||||||
|
endif
|
||||||
|
|
||||||
DBGNAME?=$(EXENAME).debug
|
DBGNAME?=$(EXENAME).debug
|
||||||
|
|
||||||
exe:=$(EXEDIR)/$(EXENAME)
|
exe:=$(EXEDIR)/$(EXENAME)
|
||||||
|
|
|
||||||
|
|
@ -91,3 +91,6 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.=$(call Ifndef,ECHO,@)
|
.=$(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
|
# 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
|
# disable dynamicbase if under msys2
|
||||||
ifdef MSYSTEM
|
ifdef MSYSTEM
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue