summaryrefslogtreecommitdiff
path: root/xmake/plugins/project/makefile/makefile.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-06-26 22:26:33 +0800
committerruki <[email protected]>2017-06-26 22:26:33 +0800
commit08423656d08715670959b69c64957e9e9b1b3db1 (patch)
tree8739a1ef0ed686ab83239910681b70c0dea858ad /xmake/plugins/project/makefile/makefile.lua
parentf57db3954d227c29d15b68316e9b18838a55c3d4 (diff)
modify compiler and linker args
Diffstat (limited to 'xmake/plugins/project/makefile/makefile.lua')
-rw-r--r--xmake/plugins/project/makefile/makefile.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/plugins/project/makefile/makefile.lua b/xmake/plugins/project/makefile/makefile.lua
index dadaaba1c..2efe09cea 100644
--- a/xmake/plugins/project/makefile/makefile.lua
+++ b/xmake/plugins/project/makefile/makefile.lua
@@ -103,10 +103,10 @@ function _make_object(makefile, target, sourcefile, objectfile)
local program = platform.tool(sourcekind)
-- get complier flags
- local compflags = compiler.compflags(sourcefile, target, sourcekind)
+ local compflags = compiler.compflags(sourcefile, {target = target, sourcekind = sourcekind})
-- make command
- local command = compiler.compcmd(sourcefile, objectfile, target)
+ local command = compiler.compcmd(sourcefile, objectfile, {target = target})
-- replace compflags to $(XX)
local p, e = command:find(compflags, 1, true)
@@ -164,10 +164,10 @@ function _make_single_object(makefile, target, sourcekind, sourcebatch)
local program = platform.tool(sourcekind)
-- get complier flags
- local compflags = compiler.compflags(sourcefiles, target, sourcekind)
+ local compflags = compiler.compflags(sourcefiles, {target = target, sourcekind = sourcekind})
-- make command
- local command = compiler.compcmd(sourcefiles, objectfiles, target, sourcekind)
+ local command = compiler.compcmd(sourcefiles, objectfiles, {target = target, sourcekind = sourcekind})
-- replace compflags to $(XX)
local p, e = command:find(compflags, 1, true)
@@ -346,7 +346,7 @@ function _make_all(makefile)
for targetname, target in pairs(project.targets()) do
if not target:isphony() then
for sourcekind, sourcebatch in pairs(target:sourcebatches()) do
- makefile:print("%s_%s=%s", targetname, sourcekind:upper(), compiler.compflags(sourcebatch.sourcefiles, target, sourcekind))
+ makefile:print("%s_%s=%s", targetname, sourcekind:upper(), compiler.compflags(sourcebatch.sourcefiles, {target = target, sourcekind = sourcekind}))
end
makefile:print("%s_%s=%s", targetname, target:linker():get("kind"):upper(), target:linkflags())
end