-
Notifications
You must be signed in to change notification settings - Fork 2
/
SConscript
43 lines (30 loc) · 1.07 KB
/
SConscript
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
import sbms
# get env object and clone it
Import('*')
env = env.Clone()
sbms.AddDANA(env)
sbms.AddROOT(env)
#sbms.executable(env)
# Executable name comes from directory name
exename = "hd_vis"
env.PrependUnique(CPPPATH = ['.'])
# Push commonly used libraries to end of list
sbms.ReorderCommonLibraries(env)
# Build program from all source
sources = ["hd_vis.cc", "JEventProcessor_EventReader.cc"]
myobjs = env.Object(sources)
myexe = env.Program(target = exename, source = myobjs)
# Cleaning and installation are restricted to the directory
# scons was launched from or its descendents
CurrentDir = env.Dir('.').srcnode().abspath
if not CurrentDir.startswith(env.GetLaunchDir()):
# Not in launch directory. Tell scons not to clean these targets
env.NoClean([myobjs, myexe])
else:
# We're in launch directory (or descendent) schedule installation
# Installation directories for executable and headers
installdir = env.subst('$INSTALLDIR')
includedir = env.subst('$INCDIR')
bindir = env.subst('$BINDIR')
# Install targets
env.Install(bindir, myexe)