mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Makefile: Move the PREFIX stuff up so version detection can take advantage of
(cherry picked from commit 489bb81d0065299ffea09b20cfa06dbbedcf247a)
This commit is contained in:
parent
deb7bf35b7
commit
6de79f1377
1 changed files with 24 additions and 24 deletions
|
@ -21,6 +21,30 @@ SUPPORTED_GCC_VERSIONS:=\
|
||||||
|
|
||||||
LATEST_GCC_VERSION=9.1
|
LATEST_GCC_VERSION=9.1
|
||||||
|
|
||||||
|
# gcc or g++
|
||||||
|
ifdef PREFIX
|
||||||
|
CC=$(PREFIX)-gcc
|
||||||
|
CXX=$(PREFIX)-g++
|
||||||
|
OBJCOPY=$(PREFIX)-objcopy
|
||||||
|
OBJDUMP=$(PREFIX)-objdump
|
||||||
|
STRIP=$(PREFIX)-strip
|
||||||
|
WINDRES=$(PREFIX)-windres
|
||||||
|
else
|
||||||
|
OBJCOPY=objcopy
|
||||||
|
OBJDUMP=objdump
|
||||||
|
STRIP=strip
|
||||||
|
WINDRES=windres
|
||||||
|
endif
|
||||||
|
|
||||||
|
# because Apple screws with us on this
|
||||||
|
# need to get bintools from homebrew
|
||||||
|
ifdef MACOSX
|
||||||
|
CC=clang
|
||||||
|
CXX=clang
|
||||||
|
OBJCOPY=gobjcopy
|
||||||
|
OBJDUMP=gobjdump
|
||||||
|
endif
|
||||||
|
|
||||||
# Automatically set version flag, but not if one was manually set
|
# Automatically set version flag, but not if one was manually set
|
||||||
ifeq (,$(filter GCC%,$(.VARIABLES)))
|
ifeq (,$(filter GCC%,$(.VARIABLES)))
|
||||||
ifneq (,$(findstring GCC,$(shell $(CC) --version))) # if it's GCC
|
ifneq (,$(findstring GCC,$(shell $(CC) --version))) # if it's GCC
|
||||||
|
@ -500,30 +524,6 @@ ifdef ARCHNAME
|
||||||
BIN:=$(BIN)/$(ARCHNAME)
|
BIN:=$(BIN)/$(ARCHNAME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# gcc or g++
|
|
||||||
ifdef PREFIX
|
|
||||||
CC=$(PREFIX)-gcc
|
|
||||||
CXX=$(PREFIX)-g++
|
|
||||||
OBJCOPY=$(PREFIX)-objcopy
|
|
||||||
OBJDUMP=$(PREFIX)-objdump
|
|
||||||
STRIP=$(PREFIX)-strip
|
|
||||||
WINDRES=$(PREFIX)-windres
|
|
||||||
else
|
|
||||||
OBJCOPY=objcopy
|
|
||||||
OBJDUMP=objdump
|
|
||||||
STRIP=strip
|
|
||||||
WINDRES=windres
|
|
||||||
endif
|
|
||||||
|
|
||||||
# because Apple screws with us on this
|
|
||||||
# need to get bintools from homebrew
|
|
||||||
ifdef MACOSX
|
|
||||||
CC=clang
|
|
||||||
CXX=clang
|
|
||||||
OBJCOPY=gobjcopy
|
|
||||||
OBJDUMP=gobjdump
|
|
||||||
endif
|
|
||||||
|
|
||||||
OBJDUMP_OPTS?=--wide --source --line-numbers
|
OBJDUMP_OPTS?=--wide --source --line-numbers
|
||||||
LD=$(CC)
|
LD=$(CC)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue