summaryrefslogtreecommitdiff
path: root/xmake/plugins/project/makefile/makefile.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-11-11 21:23:57 +0800
committerruki <[email protected]>2017-11-11 21:23:57 +0800
commitf50cc8971ad01966cb5bfbcd2bef354fdef42cd8 (patch)
tree69c6f0123120175998b581d362a568b3999f9f1b /xmake/plugins/project/makefile/makefile.lua
parentd8c3db4f8bd8a63eb1748bf1e0fd90001e318668 (diff)
improve project plugin
Diffstat (limited to 'xmake/plugins/project/makefile/makefile.lua')
-rw-r--r--xmake/plugins/project/makefile/makefile.lua21
1 files changed, 10 insertions, 11 deletions
diff --git a/xmake/plugins/project/makefile/makefile.lua b/xmake/plugins/project/makefile/makefile.lua
index 7f50d569a..d4061359f 100644
--- a/xmake/plugins/project/makefile/makefile.lua
+++ b/xmake/plugins/project/makefile/makefile.lua
@@ -306,16 +306,13 @@ function _make_target(makefile, target)
-- build source batches
for sourcekind, sourcebatch in pairs(target:sourcebatches()) do
-
- -- compile source files to single object at the same time?
- if type(sourcebatch.objectfiles) == "string" then
-
- -- make single object
- _make_single_object(makefile, target, sourcekind, sourcebatch)
- else
-
- -- make each objects
- _make_each_objects(makefile, target, sourcekind, sourcebatch)
+ if not sourcebatch.rulename then
+ -- compile source files to single object at once
+ if type(sourcebatch.objectfiles) == "string" then
+ _make_single_object(makefile, target, sourcekind, sourcebatch)
+ else
+ _make_each_objects(makefile, target, sourcekind, sourcebatch)
+ end
end
end
end
@@ -359,7 +356,9 @@ 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(), os.args(compiler.compflags(sourcebatch.sourcefiles, {target = target, sourcekind = sourcekind})))
+ if not sourcebatch.rulename then
+ makefile:print("%s_%s=%s", targetname, sourcekind:upper(), os.args(compiler.compflags(sourcebatch.sourcefiles, {target = target, sourcekind = sourcekind})))
+ end
end
makefile:print("%s_%s=%s", targetname, target:linker():kind():upper(), os.args(target:linkflags()))
end