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.
|
# 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
|
||||||
|
|
@ -230,17 +233,22 @@ endif
|
||||||
objects:=$(addprefix $(objdir)/,$(objects))
|
objects:=$(addprefix $(objdir)/,$(objects))
|
||||||
|
|
||||||
ifdef DEBUGMODE
|
ifdef DEBUGMODE
|
||||||
bin:=../bin/debug
|
EXEDIR?=../bin/debug
|
||||||
else
|
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
|
endif
|
||||||
|
|
||||||
# default EXENAME (usually set by platform)
|
|
||||||
EXENAME?=ringracers
|
|
||||||
DBGNAME?=$(EXENAME).debug
|
DBGNAME?=$(EXENAME).debug
|
||||||
|
|
||||||
exe:=$(bin)/$(EXENAME)
|
exe:=$(EXEDIR)/$(EXENAME)
|
||||||
dbg:=$(bin)/$(DBGNAME)
|
dbg:=$(EXEDIR)/$(DBGNAME)
|
||||||
|
|
||||||
build_done==== Build is done, look for \
|
build_done==== Build is done, look for \
|
||||||
$(<F) at $(abspath $(<D)) ===
|
$(<F) at $(abspath $(<D)) ===
|
||||||
|
|
|
||||||
|
|
@ -91,3 +91,6 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.=$(call Ifndef,ECHO,@)
|
.=$(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
|
# Mingw, if you don't know, that's Win32/Win64
|
||||||
#
|
#
|
||||||
|
|
||||||
ifndef MINGW64
|
exesuffix:=$(exesuffix)$(if $(MINGW64),64).exe
|
||||||
EXENAME?=ringracers.exe
|
|
||||||
else
|
|
||||||
EXENAME?=ringracers64.exe
|
|
||||||
endif
|
|
||||||
|
|
||||||
# disable dynamicbase if under msys2
|
# disable dynamicbase if under msys2
|
||||||
ifdef MSYSTEM
|
ifdef MSYSTEM
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue