import sbms # get env object and clone it Import('*') env = env.Clone() sbms.AddROOT(env) progs = [] commonsrc = ['nrutil.c', 'rtnewt.c', 'rtsafe.c', 'zbrent.c'] progs.append( env.Program(target='genmu+mu-', source=['genmu+mu-.cc', commonsrc]) ) progs.append( env.Program(target='genpi+pi-', source=['genpi+pi-.cc', commonsrc]) ) progs.append( env.Program(target='genpi', source=['genpi.cc', commonsrc]) ) progs.append( env.Program(target='genpi0', source=['genpi0.cc', commonsrc]) ) # 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 no to clean these targets env.NoClean(progs) else: # We're in launch directory (or descendent) schedule installation # Installation directory for executables bindir = env.subst('$BINDIR') # Install targets env.Install(bindir, progs)