-
Notifications
You must be signed in to change notification settings - Fork 11
/
_preload.lua
47 lines (35 loc) · 1.16 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
--
-- _preload.lua
-- Generator for ndk-build makefiles
-- Author : Bastien Brunnenstein
--
premake.extensions.androidmk = premake.extensions.androidmk or {}
local androidmk = premake.extensions.androidmk
local make = premake.make
androidmk.CONFIG_OPTION = "PM5_CONFIG"
newaction {
trigger = "androidmk",
shortname = "Android.mk",
description = "Generate Android.mk files for Android NDK",
valid_kinds = {
premake.STATICLIB,
premake.SHAREDLIB,
},
valid_languages = { "C", "C++" },
onSolution = function(sln)
premake.escaper(make.esc)
premake.generate(sln, androidmk.slnApplicationFile(sln), androidmk.generate_applicationmk)
premake.generate(sln, androidmk.slnAndroidFile(sln), androidmk.generate_androidmk)
end,
onProject = function(prj)
premake.escaper(make.esc)
premake.generate(prj, androidmk.prjFile(prj), androidmk.generate_projectmk)
end,
onCleanSolution = function(sln)
premake.clean.file(sln, androidmk.slnApplicationFile(sln))
premake.clean.file(sln, androidmk.slnAndroidFile(sln))
end,
onCleanProject = function(prj)
premake.clean.file(prj, androidmk.prjFile(prj))
end
}