-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
40 lines (27 loc) · 1.11 KB
/
SConstruct
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
import eol_scons
from SCons.Script import Environment, Export
def labjack(env):
env.Append(LIBS=['LabJackM'])
# not actually needed
# env.Append(CPPPATH=['/usr/local/include'])
Export('labjack')
env = Environment(tools=['default', 'buildmode', 'nidas', 'gitinfo',
'labjack'])
if env.get('REPO_REVISION') != 'unknown':
env.Append(CPPDEFINES=["REPO_REVISION=\\\"${REPO_REVISION}\\\""])
env.Append(CPPDEFINES=["REPO_HASH=\\\"${REPO_HASH}\\\""])
env.Append(CXXFLAGS=['-std=c++11', '-Wno-deprecated', '-fpic', '-fPIC',
'-rdynamic'])
env.Append(LINKFLAGS=['-fpic', '-fPIC', '-rdynamic'])
hotfilm = env.Program('hotfilm.cc')
env.Default(hotfilm)
dest = env.Install("$NIDAS_PATH/bin", hotfilm)
env['SETCAP'] = '/sbin/setcap'
# The cap_net_admin prevents some warning messages about calls to
# cap_set_proc() which technically are not needed to set the scheduling
# priority.
setcap = env.Command('setcap', None,
f"$SETCAP cap_net_admin,cap_sys_nice=pe {dest[0]}")
env.AlwaysBuild(setcap)
env.Alias('install.root', [dest, setcap])
env.SetHelp()