mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'more-makefile-changes' into 'master'
Nifty makefile changes for exe naming See merge request KartKrew/Kart!651
This commit is contained in:
commit
aced12b2b2
3 changed files with 18 additions and 11 deletions
20
src/Makefile
20
src/Makefile
|
|
@ -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)) ===
|
||||
|
|
|
|||
|
|
@ -91,3 +91,6 @@ endif
|
|||
endif
|
||||
|
||||
.=$(call Ifndef,ECHO,@)
|
||||
|
||||
# prepends an underscore if not empty
|
||||
_=$(if $(1),_$(1))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue