Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
SConscript.py
Go to the documentation of this file.
1
2
3import os
4Import('baseenv')
5
6libname = 'evio'
7
8src = Glob('*.c')
9hdr = Glob('*.h')
10
11evioenv = baseenv.Clone()
12evioenv.Replace(CPPPATH = [], CPPDEFINES = [], LIBS = [], LIBPATH = [], RPATH = [])
13debug = ARGUMENTS.get('debug',0)
14if int(debug):
15 evioenv.Append(CCFLAGS = ['-g', '-O0'])
16else:
17 evioenv.Append(CCFLAGS = '-O')
18
19libname_soname = evioenv.subst('$SHLIBPREFIX')+libname+evioenv.subst('$SHLIBSUFFIX')
20pf = evioenv['PLATFORM']
21if pf == 'posix':
22 evioenv.Append(SHLINKFLAGS = '-Wl,-soname='+libname_soname)
23elif pf == 'darwin':
24 evioenv.Append(SHLINKFLAGS = '-Wl,-install_name,'+'@rpath/'+libname_soname)
25
26eviolib = evioenv.SharedLibrary(target = libname, source = src)
27
28thisdir_fullpath = evioenv.Dir('.').path
29#thisdir = os.path.basename(os.path.normpath(thisdir_fullpath))
30evioenv.Install(os.path.join(evioenv.subst('$INSTALLDIR'),evioenv.subst('$LIBSUBDIR')), eviolib)
31evioenv.Install(os.path.join(evioenv.subst('$INSTALLDIR'),'include'), hdr)
32evioenv.Install(os.path.join(evioenv.subst('$INSTALLDIR'),'src',thisdir_fullpath), src)