diff options
| author | ruki <[email protected]> | 2016-03-18 20:05:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-03-18 20:05:25 +0800 |
| commit | 7a67767e0df44d9ef02daab981f7e300c627b95d (patch) | |
| tree | 0b85d57e2658a84d36910270f0023249d38cf6bf /xmake/core/project/target.lua | |
| parent | 7ff5704f835df20b79db4f672204df9a562058aa (diff) | |
add target
Diffstat (limited to 'xmake/core/project/target.lua')
| -rw-r--r-- | xmake/core/project/target.lua | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua new file mode 100644 index 000000000..a1fcda511 --- /dev/null +++ b/xmake/core/project/target.lua @@ -0,0 +1,43 @@ +--!The Automatic Cross-platform Build Tool +-- +-- XMake is free software; you can redistribute it and/or modify +-- it under the terms of the GNU Lesser General Public License as published by +-- the Free Software Foundation; either version 2.1 of the License, or +-- (at your option) any later version. +-- +-- XMake is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public License +-- along with XMake; +-- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a> +-- +-- Copyright (C) 2015 - 2016, ruki All rights reserved. +-- +-- @author ruki +-- @file target.lua +-- + +-- define module +local target = target or {} + +-- load modules +local platform = require("platform/platform") + +-- get the filename from the given name and kind +function target.filename(name, kind) + + -- check + assert(name and kind) + + -- get format + local format = platform.format(kind) or {"", ""} + + -- make it + return format[1] .. name .. format[2] +end + +-- return module +return target |
