This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
BUILD.lua
87 lines (77 loc) · 1.75 KB
/
BUILD.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
local cc = require "rules.cc"
-- FIXME: Implicit dependency detection goes a bit overboard on this. Fix this
-- once there is a way to override dependency detection.
rule {
inputs = glob {
"VERSION",
"src/version.h.in",
},
task = {{"./scripts/version.py", "src/version.h.in", "src/version.h"}},
outputs = {"src/version.h"},
}
local ducible = cc.binary {
name = "ducible",
srcs = glob {
"src/util/*.cpp",
"src/util/*.c",
"src/msf/*.cpp",
"src/ducible/*.cpp",
"src/pe/*.cpp",
"src/pdb/*.cpp",
},
src_deps = {
["src/ducible/main.cpp"] = {"src/version.h"},
},
includes = {"src"},
warnings = {"all", "error"},
compiler_opts = {"-g"},
}
local ducible_exe = path.join(".", ducible:path())
--
-- Test ducible
--
rule {
inputs = {ducible:path()},
task = {{ducible_exe, "--help"}},
outputs = {},
}
rule {
inputs = {ducible:path()},
task = {{ducible_exe, "--version"}},
outputs = {},
}
local pdbdump = cc.binary {
name = "pdbdump",
srcs = glob {
"src/pdbdump/*.cpp",
"src/util/*.cpp",
"src/util/*.c",
"src/msf/*.cpp",
"src/pdb/*.cpp",
},
src_deps = {
["src/pdbdump/main.cpp"] = {"src/version.h"},
},
includes = {"src"},
warnings = {"all", "error"},
compiler_opts = {"-g"},
}
local pdbdump_exe = path.join(".", pdbdump:path())
--
-- Test pdbdump
--
rule {
inputs = {pdbdump:path()},
task = {{pdbdump_exe, "--help"}},
outputs = {},
}
rule {
inputs = {pdbdump:path()},
task = {{pdbdump_exe, "--version"}},
outputs = {},
}
rule {
inputs = {pdbdump:path()},
task = {{pdbdump_exe, "vs/vs2015/x64/Debug/test_dll.pdb"}},
outputs = {},
}