-
Notifications
You must be signed in to change notification settings - Fork 4
/
lakefile
47 lines (38 loc) · 887 Bytes
/
lakefile
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
PROJECT = 'pdh'
INITLAKEFILE()
WINVER = "0x0" .. IF(WINDOWS, WINVER or '502', '')
lake.define_need('pdh', function()
return {
libs = {'pdh'};
}
end)
lake.define_need('psapi', function()
return {
libs = {'psapi', 'advapi32'};
}
end)
pdh = c.shared{'core',
base = 'src',
src = {'*.c'},
needs = {LUA_NEED, 'pdh', 'psapi'},
def = 'lpdh.def',
defines = L{
DEFINES;
IF(WINDOWS,{
"WINVER=" .. WINVER;
"_WIN32_WINNT=" .. WINVER;
});
},
dynamic = DYNAMIC,
strip = true,
}
target('build', pdh)
install = target('install', {
file.group{odir = LIBDIR; src = J('lua','*'); recurse=true};
file.group{odir = J(LIBDIR, PROJECT); src = pdh};
file.group{odir = J(ROOT, 'examples'); src = J('examples','*'); recurse=true};
})
target('test', install, function()
run_test("test.lua")
end)
default('build')