2015-03-29 09:34:06 +00:00
|
|
|
--
|
|
|
|
-- Name: android/_preload.lua
|
|
|
|
-- Purpose: Define the Android API's.
|
|
|
|
-- Author: Manu Evans
|
|
|
|
-- Copyright: (c) 2013-2015 Manu Evans and the Premake project
|
|
|
|
--
|
|
|
|
|
|
|
|
local p = premake
|
|
|
|
local api = p.api
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Register the Android extension
|
|
|
|
--
|
|
|
|
|
|
|
|
api.addAllowed("system", p.ANDROID)
|
2019-04-04 16:16:07 +00:00
|
|
|
api.addAllowed("architecture", { "armv5", "armv7", "aarch64", "mips", "mips64", "arm" })
|
2015-03-29 09:34:06 +00:00
|
|
|
api.addAllowed("vectorextensions", { "NEON", "MXU" })
|
2019-04-04 16:16:07 +00:00
|
|
|
api.addAllowed("exceptionhandling", {"UnwindTables"})
|
2015-03-29 09:34:06 +00:00
|
|
|
api.addAllowed("flags", { "Thumb" })
|
2019-04-04 16:16:07 +00:00
|
|
|
api.addAllowed("kind", p.PACKAGING)
|
|
|
|
|
2015-03-29 09:34:06 +00:00
|
|
|
|
2019-04-04 16:16:07 +00:00
|
|
|
premake.action._list["vs2015"].valid_kinds = table.join(premake.action._list["vs2015"].valid_kinds, { p.PACKAGING })
|
|
|
|
premake.action._list["vs2017"].valid_kinds = table.join(premake.action._list["vs2017"].valid_kinds, { p.PACKAGING })
|
|
|
|
premake.action._list["vs2019"].valid_kinds = table.join(premake.action._list["vs2019"].valid_kinds, { p.PACKAGING })
|
2019-03-17 16:03:17 +00:00
|
|
|
|
2017-08-04 00:49:41 +00:00
|
|
|
local osoption = p.option.get("os")
|
|
|
|
if osoption ~= nil then
|
|
|
|
table.insert(osoption.allowed, { "android", "Android" })
|
2015-03-29 09:34:06 +00:00
|
|
|
end
|
|
|
|
|
2017-08-04 00:41:24 +00:00
|
|
|
-- add system tags for android.
|
|
|
|
os.systemTags[p.ANDROID] = { "android", "mobile" }
|
2015-03-29 09:34:06 +00:00
|
|
|
|
|
|
|
--
|
|
|
|
-- Register Android properties
|
|
|
|
--
|
|
|
|
|
|
|
|
api.register {
|
|
|
|
name = "floatabi",
|
|
|
|
scope = "config",
|
|
|
|
kind = "string",
|
|
|
|
allowed = {
|
|
|
|
"soft",
|
|
|
|
"softfp",
|
|
|
|
"hard",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
api.register {
|
|
|
|
name = "androidapilevel",
|
|
|
|
scope = "config",
|
|
|
|
kind = "integer",
|
|
|
|
}
|
2016-11-15 10:57:43 +00:00
|
|
|
|
2017-08-10 18:51:48 +00:00
|
|
|
api.register {
|
|
|
|
name = "toolchainversion",
|
|
|
|
scope = "config",
|
|
|
|
kind = "string",
|
|
|
|
allowed = {
|
|
|
|
"4.6", -- NDK GCC versions
|
|
|
|
"4.8",
|
|
|
|
"4.9",
|
|
|
|
"3.4", -- NDK clang versions
|
|
|
|
"3.5",
|
|
|
|
"3.6",
|
|
|
|
"3.8",
|
2019-04-04 16:16:07 +00:00
|
|
|
"5.0",
|
2017-08-10 18:51:48 +00:00
|
|
|
},
|
|
|
|
}
|
2015-03-29 09:34:06 +00:00
|
|
|
|
2017-08-10 18:51:48 +00:00
|
|
|
api.register {
|
|
|
|
name = "stl",
|
|
|
|
scope = "config",
|
|
|
|
kind = "string",
|
|
|
|
allowed = {
|
|
|
|
"none",
|
2019-04-04 16:16:07 +00:00
|
|
|
"gabi++",
|
|
|
|
"stlport",
|
|
|
|
"gnu",
|
|
|
|
"libc++",
|
2017-08-10 18:51:48 +00:00
|
|
|
},
|
|
|
|
}
|
2015-03-29 09:34:06 +00:00
|
|
|
|
|
|
|
api.register {
|
2015-10-15 13:05:33 +00:00
|
|
|
name = "thumbmode",
|
2015-03-29 09:34:06 +00:00
|
|
|
scope = "config",
|
|
|
|
kind = "string",
|
|
|
|
allowed = {
|
2015-10-15 13:05:33 +00:00
|
|
|
"thumb",
|
|
|
|
"arm",
|
|
|
|
"disabled",
|
2015-03-29 09:34:06 +00:00
|
|
|
},
|
2016-11-15 10:57:43 +00:00
|
|
|
}
|
2017-07-05 21:42:50 +00:00
|
|
|
|
2017-07-10 18:29:59 +00:00
|
|
|
api.register {
|
|
|
|
name = "androidapplibname",
|
|
|
|
scope = "config",
|
|
|
|
kind = "string"
|
|
|
|
}
|
|
|
|
|
2017-07-05 21:42:50 +00:00
|
|
|
return function(cfg)
|
2018-04-05 10:56:55 +00:00
|
|
|
return (cfg.system == p.ANDROID)
|
2017-07-05 21:42:50 +00:00
|
|
|
end
|