diff options
| author | ruki <[email protected]> | 2017-06-26 22:26:33 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-06-26 22:26:33 +0800 |
| commit | 08423656d08715670959b69c64957e9e9b1b3db1 (patch) | |
| tree | 8739a1ef0ed686ab83239910681b70c0dea858ad /xmake/plugins/project/makefile/makefile.lua | |
| parent | f57db3954d227c29d15b68316e9b18838a55c3d4 (diff) | |
modify compiler and linker args
Diffstat (limited to 'xmake/plugins/project/makefile/makefile.lua')
| -rw-r--r-- | xmake/plugins/project/makefile/makefile.lua | 10 |
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 |
