forked from Lua-cURL/Lua-cURLv3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlakefile
41 lines (33 loc) · 1.02 KB
/
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
PROJECT = 'cURL'
INITLAKEFILE()
DEFINES = L{DEFINES,
IF(WINDOWS, 'DLL_EXPORT', '');
IF(DEBUG, 'LCURL_RESET_NULL_LUA', '');
}
cURL = c.shared{'lcurl',
base = 'src',
src = '*.c',
needs = {LUA_NEED, 'libcurl', IF(WINDOWS, 'winsock2', 'sockets')},
defines = DEFINES,
dynamic = DYNAMIC,
strip = true,
}
target('build', cURL)
install = target('install', {
file.group{odir=LIBDIR; src = cURL };
file.group{odir=LIBDIR; src = J("src", "lua") ; recurse = true };
file.group{odir=J(ROOT, 'examples'); src = 'examples'; recurse = true };
file.group{odir=TESTDIR; src = 'test'; recurse = true };
})
target('test', install, function()
run_test('test_easy.lua')
run_test('test_safe.lua')
run_test('test_form.lua')
run_test('test_pause02.c.lua')
run_test('test_curl.lua')
run_test('test_multi_callback.lua')
run_test('test_multi_nested_callback.lua')
if not test_summary() then
quit("test fail")
end
end)