Made CC and LD override possible (nw)

This commit is contained in:
Miodrag Milanovic 2015-03-26 14:43:39 +01:00
parent 323d87af33
commit 726de20508
3 changed files with 27 additions and 5 deletions

View File

@ -15,6 +15,16 @@
################# BEGIN USER-CONFIGURABLE OPTIONS #####################
###########################################################################
PARAMS=--distro=$(DISTRO)
ifdef TOOLS
PARAMS+= --with-tools
endif
ifdef CC
PARAMS+= --CC=$(CC)
endif
ifdef LD
PARAMS+= --LD=$(LD)
endif
#-------------------------------------------------
# specify core target: mame, mess, etc.
@ -232,11 +242,6 @@ GENIE=3rdparty/genie/bin/$(OS)/genie
SILENT?=@
PARAMS=--distro=$(DISTRO)
ifdef TOOLS
PARAMS+= --with-tools
endif
all: $(GENIE) $(TARGETOS)_$(ARCHITECTURE)
windows_x64: generate

View File

@ -104,6 +104,16 @@ newoption {
value = "",
}
newoption {
trigger = "CC",
description = "CC replacement",
}
newoption {
trigger = "LD",
description = "LD replacement",
}
local os_version = str_to_version(_OPTIONS["os_version"])
USE_BGFX = 1
if (_OPTIONS["targetos"]=="macosx" and os_version < 100700) then

View File

@ -330,6 +330,13 @@ function toolchain(_buildDir)
end
end
if (_OPTIONS["CC"] ~= nil) then
premake.gcc.cc = _OPTIONS["CC"]
end
if (_OPTIONS["LD"] ~= nil) then
premake.gcc.cxx = _OPTIONS["LD"]
end
configuration {} -- reset configuration