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
|
local lm = require 'luamake'
local platform = require "bee.platform"
lm.arch = 'x64'
lm:import '3rd/bee.lua/make.lua'
lm.rootdir = '3rd/'
lm:shared_library 'lni' {
deps = platform.OS == "Windows" and "lua54" or "lua",
sources = {
'lni/src/main.cpp',
},
links = {
platform.OS == "Linux" and "stdc++",
},
visibility = 'default',
}
lm:shared_library 'lpeglabel' {
deps = platform.OS == "Windows" and "lua54" or "lua",
sources = 'lpeglabel/*.c',
visibility = 'default',
defines = {
'MAXRECLEVEL=1000',
},
ldflags = platform.OS == "Windows" and "/EXPORT:luaopen_lpeglabel",
}
if platform.OS == "Windows" then
lm:executable 'rcedit' {
sources = 'rcedit/src/*.cc',
defines = {
'_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING'
},
flags = {
'/wd4477',
'/wd4244',
'/wd4267',
}
}
end
lm:build 'install' {
'$luamake', 'lua', 'make/install.lua', lm.plat,
deps = {
'lua',
'lni',
'lpeglabel',
'bee',
'bootstrap',
platform.OS == "Windows" and "rcedit"
}
}
lm:build 'unittest' {
'$luamake', 'lua', 'make/unittest.lua', lm.plat,
deps = {
'install',
}
}
lm:default {
'install',
'test',
'unittest',
}
|