summaryrefslogtreecommitdiff
path: root/xmake/scripts/platform/linux
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-07 17:05:40 +0800
committerruki <[email protected]>2015-06-07 17:05:40 +0800
commitd6275f9e3ae8989dbdca641bfeb077773df1c217 (patch)
tree1fd72544e5f68d863fa5f46817f954d677d1a8d9 /xmake/scripts/platform/linux
parent6e928d29aa3e30b92b6ad5b51edc105ec90b39ad (diff)
add gcc
Diffstat (limited to 'xmake/scripts/platform/linux')
-rw-r--r--xmake/scripts/platform/linux/linux.lua18
1 files changed, 13 insertions, 5 deletions
diff --git a/xmake/scripts/platform/linux/linux.lua b/xmake/scripts/platform/linux/linux.lua
index 9226ee98a..6c68a6f1b 100644
--- a/xmake/scripts/platform/linux/linux.lua
+++ b/xmake/scripts/platform/linux/linux.lua
@@ -41,17 +41,25 @@ function linux.make(configs)
configs.formats.object = {"", ".o"}
configs.formats.shared = {"lib", ".so"}
+ -- init the toolchains
+ configs.tools = {}
+ configs.tools.make = "make"
+ configs.tools.ccache = config.get("__ccache")
+ configs.tools.cc = config.get("cc") or "gcc"
+ configs.tools.cxx = config.get("cxx") or "g++"
+ configs.tools.mm = config.get("mm") or configs.tools.cc
+ configs.tools.mxx = config.get("mxx") or configs.tools.cxx
+ configs.tools.ld = config.get("ld") or "g++"
+ configs.tools.ar = config.get("ar") or "ar"
+ configs.tools.sh = config.get("sh") or "g++"
+
end
-- get the option menu for action: xmake config or global
function linux.menu(action)
-- init config option menu
- linux._MENU_CONFIG = linux._MENU_CONFIG or
- { {}
- , {nil, "ar", "kv", nil, "The Library Creator" }
- , {nil, "arflags", "kv", nil, "The Library Creator Flags" }
- }
+ linux._MENU_CONFIG = linux._MENU_CONFIG or {}
-- init global option menu
linux._MENU_GLOBAL = linux._MENU_GLOBAL or {}