-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwscript
62 lines (43 loc) · 1.5 KB
/
wscript
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
#!/usr/bin/env waf
import sys
from waflib.Utils import to_list
sys.path.append('tools')
pkg_deps = ['libzmq','libczmq','protobuf','ptmp']
def options(opt):
opt.load('compiler_c compiler_cxx')
opt.load('utests')
for pkg in pkg_deps:
opt.load(pkg)
opt.add_option('--cxxflags', default='-O2 -ggdb3')
def configure(cfg):
cfg.load('compiler_c compiler_cxx')
cfg.load('utests')
for pkg in pkg_deps:
cfg.load(pkg)
cfg.env.CXXFLAGS += to_list(cfg.options.cxxflags)
def build(bld):
bld.load('utests')
uses = [p.upper() for p in pkg_deps]
rpath = [bld.env["PREFIX"] + '/lib']
for u in uses:
p = bld.env["LIBPATH_%s"%u]
if p: rpath += p
src = bld.path.ant_glob("src/*.cc")
# https://github.com/dlast44/ProtoDuneTrigger
pdt = bld.path.find_node("pdt")
src += [pdt.find_node("AdjacencyAlgorithms.cpp"),
pdt.find_node("TriggerCandidate.cpp"),
pdt.find_node("ModuleTrigger.cpp")]
# https://github.com/IrisP25/MichelElectronTriggering
met = bld.path.find_node("met")
src += [met.find_node("MichelFinder.cc"),
met.find_node("MichelCalculation.cpp")]
bld.shlib(features='c cxx',
includes='inc include .',
rpath = rpath,
source = src,
target='ptmp-tcs',
use=uses)
bld.install_files('${PREFIX}/include/ptmp-tcs',
bld.path.ant_glob("inc/ptmp-tcs/*.h"))
bld.utesting('ptmp-tcs', uses)