diff options
| author | ruki <[email protected]> | 2016-07-09 15:08:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-07-09 15:08:28 +0800 |
| commit | 9feb387e4e4e6694b2c9ac3de4d517fb4c4ae44a (patch) | |
| tree | 9581332e5365025b5663c3c48f223a9dfd6f415c /xmake/tools/ar.lua | |
| parent | 460030d64886772601749b874f06fe536f1d3fd5 (diff) | |
fix install directory and modify compiler and linker interfaces
Diffstat (limited to 'xmake/tools/ar.lua')
| -rw-r--r-- | xmake/tools/ar.lua | 14 |
1 files changed, 12 insertions, 2 deletions
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) |
