Forward CFLAGS and LDFLAGS to the compiler (Closes DDRace/teeworlds#212)

This commit is contained in:
Ravomavain 2013-02-03 15:34:41 +01:00 committed by Shereef Marzouk
parent 9e3cd78369
commit 956532d7cd

View file

@ -144,6 +144,15 @@ function build(settings)
--settings.objdir = Path("objs") --settings.objdir = Path("objs")
settings.cc.Output = Intermediate_Output settings.cc.Output = Intermediate_Output
cflags = os.getenv("CFLAGS")
if cflags then
settings.cc.flags:Add(cflags)
end
ldflags = os.getenv("LDFLAGS")
if ldflags then
settings.link.flags:Add(ldflags)
end
if config.compiler.driver == "cl" then if config.compiler.driver == "cl" then
settings.cc.flags:Add("/wd4244") settings.cc.flags:Add("/wd4244")
settings.cc.flags:Add("/wd4291") settings.cc.flags:Add("/wd4291")