-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_preload.lua
110 lines (96 loc) · 2.71 KB
/
_preload.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
-- premake-androidndk - a multi-ABI, multi-language ndk-build Android.mk generator for Premake.
-- Originally written by Vitaliy <Triang3l> Kuzmin.
-- See README.md for detailed usage and design information.
-- Available under the Unlicense (see UNLICENSE.txt) or the BSD 3-Clause "New" or "Revised" License (see LICENSE.txt).
local p = premake;
p.api.addAllowed("system", p.ANDROID);
-- NEON is enabled by default, like in NDK r21.
-- Similar to how Premake defines "IA32" for x86, use "ARMv7" to disable NEON (and use the .neon suffix where needed).
p.api.addAllowed("vectorextensions", { "ARMv7", "NEON", "SSE4.2" });
if os.systemTags[p.ANDROID] == nil then
os.systemTags[p.ANDROID] = { "android", "posix", "mobile" };
end
p.api.register({
name = "armisa",
scope = "config",
kind = "string",
allowed = {
p.DEFAULT,
"A32",
"T32",
},
});
p.api.register({
name = "cppstl",
scope = "config",
kind = "string",
allowed = {
p.DEFAULT,
-- As of NDK r18, only none, c++ and system are available, with the latter being deprecated.
-- Supporting the older STLs is trivial, however.
"c++",
"gabi++",
"gnustl",
"none",
"stlport",
"system",
},
});
p.api.register({
name = "formatstringchecks",
scope = "config",
kind = "boolean",
});
p.api.register({
name = "renderscriptcompatibility",
scope = "config",
kind = "boolean",
});
p.api.register({
name = "renderscriptincludedirsoverride",
scope = "config",
kind = "boolean",
});
p.api.register({
name = "shortcommands",
scope = "config",
kind = "boolean",
});
p.api.register({
name = "thinarchive",
scope = "config",
kind = "boolean",
});
p.api.register({
name = "undefinedsymbols",
scope = "config",
kind = "boolean",
});
-- Whether this static library project should be linked as a whole, even if not specified in `wholelibs` of dependent projects.
p.api.register({
name = "wholelib",
scope = "config",
kind = "boolean",
});
-- Subset of `links` which need to be linked as a whole regardless of their `wholelib` setting.
p.api.register({
name = "wholelibs",
scope = "config",
kind = "list:mixed",
tokens = true,
});
newaction({
trigger = "androidndk",
shortname = "Android ndk-build",
description = "Generate Android ndk-build makefiles",
targetos = p.ANDROID,
valid_kinds = { p.CONSOLEAPP, p.SHAREDLIB, p.STATICLIB },
valid_languages = { p.C, p.CPP },
-- Premake workspace and project names can include periods, so using suffixes for both.
onWorkspace = p.modules.androidndk.onWorkspace,
onProject = p.modules.androidndk.onProject,
});
-- Decide when the full module should be loaded.
return function(config)
return _ACTION == "androidndk";
end;