From 9feb387e4e4e6694b2c9ac3de4d517fb4c4ae44a Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 9 Jul 2016 15:08:28 +0800 Subject: fix install directory and modify compiler and linker interfaces --- xmake/tools/ar.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'xmake/tools/ar.lua') diff --git a/xmake/tools/ar.lua b/xmake/tools/ar.lua index 6445c332b..79d3cdc58 100644 --- a/xmake/tools/ar.lua +++ b/xmake/tools/ar.lua @@ -44,8 +44,8 @@ function get(name) return _g[name] end --- make the link flag -function link(lib) +-- make the linklib flag +function linklib(lib) end -- make the linkdir flag @@ -59,6 +59,16 @@ function linkcmd(objectfiles, targetfile, flags) return format("%s %s %s %s", _g.shellname, flags, targetfile, objectfiles) end +-- link the target file +function link(objectfiles, targetfile, flags) + + -- ensure the target directory + os.mkdir(path.directory(targetfile)) + + -- link it + os.run(linkcmd(objectfiles, targetfile, flags)) +end + -- extract the static library to object directory function extract(libraryfile, objectdir) -- cgit v1.3.1