-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
65 lines (53 loc) · 1.9 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
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
import os
import sys
kekcc = os.environ.get("HOSTNAME","").find("kek.jp")>=0
tools = ['default', 'output', 'inkscape', 'pdf']
if kekcc:
tools = ['default','output']
env = Environment(
tools=tools,
ENV=os.environ,
CXX="mpic++",
CXXFLAGS=["-O3", "-Wall", "-std=gnu++0x", "-Wno-unused-variable"],
#LINKFLAGS=["-Wl,--as-needed","-Wl,--strip-all"],
RPATH = "$LIBPATH",
CPPPATH=["#include","."],
LIBS=[
"boost_mpi", "boost_serialization", "boost_program_options", "boost_regex", "boost_random",
"Minuit2"
],
)
env.Quiet()
#env.AppendUnique(LINKFLAGS= "-Wl,--strip-all")
try:
env.ParseConfig("root-config --libs --cflags --ldflags")
except OSError:
print "Could not find root-config, please make sure ROOT is set up correctly"
sys.exit(1)
#Belle library
belle_top_dir = os.environ.get("BELLE_TOP_DIR","/belle/belle/b20090127_0910")
belle_inc_dir = os.path.join(belle_top_dir, "include")
belle_run_dir = os.environ.get("BELLE_RUN_DIR",os.path.join(belle_top_dir,"x86_64-unknown-linux-gnu/opt"))
belle_lib_dir = os.path.join(belle_run_dir, "lib", "so")
belle_cern = os.path.join(os.environ.get("CERN_ROOT","/belle/cern/2006"), "lib64")
if not os.path.exists(belle_top_dir):
print "Could not find the belle library"
sys.exit(1)
env.Append(
CPPPATH=[belle_inc_dir],
LIBPATH=[belle_lib_dir, belle_cern],
LIBS=["tatami", "tables", "belleutil", "packlib", "mathlib"],
)
#Path to boost installation if neccessary
for libpath in ("/remote/pcbelle03/ritter/local/","/home/belle/veronika/local/"):
if os.path.exists(libpath):
env.AppendUnique(LIBPATH=os.path.join(libpath,"lib"))
env.AppendUnique(CPPPATH=os.path.join(libpath,"include"))
#Disable SCCS and RCS checks
env.SourceCode('.',None)
#Add build dir
VariantDir('build','.',duplicate=0)
#Export environment
Export('env','kekcc')
#Run SConscript files
SConscript('build/SConscript')