forked from srdgame/librs232
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlakefile
More file actions
40 lines (32 loc) · 1.03 KB
/
lakefile
File metadata and controls
40 lines (32 loc) · 1.03 KB
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
PROJECT = 'rs232'
INITLAKEFILE()
DEFINES = L{DEFINES, 'RS232_EXPORT'}
luars232 = c.shared{'core',
src = {
J('src', 'rs232.c'),
J('src', IF(WINDOWS, 'rs232_windows.c', 'rs232_posix.c')),
J('bindings', 'lua', 'luars232.c'),
},
incdir = 'include',
needs = LUA_NEED,
defines = DEFINES,
dynamic = DYNAMIC,
strip = true,
}
target('build', luars232)
install = target('install', {
file.group{odir=J(LIBDIR, 'rs232'); src = luars232 };
file.group{odir=LIBDIR; src = J('bindings', 'lua', 'rs232.lua'), recurse = true };
file.group{odir=TESTDIR; src = J('bindings', 'lua', 'test'), recurse = true };
})
target('test', install, function()
if spawn(J(TESTDIR, 'testsrv.lua'), TESTDIR) then
run_test(TESTDIR, J(TESTDIR, 'utestcli.lua'))
end
if spawn(J(TESTDIR, 'testsrv_rs232.lua'), TESTDIR) then
run_test(TESTDIR, J(TESTDIR, 'utestcli_rs232.lua'))
end
if not test_summary() then
quit("test fail")
end
end)