Merge branch 'more-makefile-changes' into 'master'

Nifty makefile changes  for exe naming

See merge request KartKrew/Kart!651
This commit is contained in:
Sal 2022-08-27 01:30:00 +00:00
commit aced12b2b2
3 changed files with 18 additions and 11 deletions

View file

@ -193,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
@ -230,17 +233,22 @@ endif
objects:=$(addprefix $(objdir)/,$(objects))
ifdef DEBUGMODE
bin:=../bin/debug
EXEDIR?=../bin/debug
else
bin:=../bin
EXEDIR?=../bin
endif
# append branch name by default
ifndef EXENAME
base:=ringracers
branch:=$(shell git symbolic-ref -q --short HEAD)
EXENAME:=$(base)$(call _,$(filter-out master,$(branch)))$(exesuffix)
endif
# default EXENAME (usually set by platform)
EXENAME?=ringracers
DBGNAME?=$(EXENAME).debug
exe:=$(bin)/$(EXENAME)
dbg:=$(bin)/$(DBGNAME)
exe:=$(EXEDIR)/$(EXENAME)
dbg:=$(EXEDIR)/$(DBGNAME)
build_done==== Build is done, look for \
$(<F) at $(abspath $(<D)) ===

View file

@ -91,3 +91,6 @@ endif
endif
.=$(call Ifndef,ECHO,@)
# prepends an underscore if not empty
_=$(if $(1),_$(1))

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
exesuffix:=$(exesuffix)$(if $(MINGW64),64).exe
# disable dynamicbase if under msys2
ifdef MSYSTEM