import os def loadevio(env) : OSENV = os.environ if(OSENV.has_key('EVIOROOT') and os.path.exists(OSENV['EVIOROOT'])==True): rootDir = OSENV['EVIOROOT'] elif(OSENV.has_key('EVIO') and os.path.exists(OSENV['EVIO'])==True): rootDir = OSENV['EVIO'] elif(OSENV.has_key('CODA') and os.path.exists(OSENV['CODA'])==True): rootDir = OSENV['CODA'] + '/Linux' else: print "?Neither EVIOROOT nor EVIO env variables are set...using -DNO_EVIOROOT" env.Append(CPPDEFINES = {'NO_EVIOROOT':None}) return if env['SHOWENV'] == "1": print "Loading EVIO software from ", rootDir # include files evioincs = [] evioincs.append(rootDir + '/include') env.AppendUnique(CPPPATH=evioincs) # library directories evioldir = [] evioldir.append(rootDir + '/lib') evioldir.append(rootDir + '/lib64') env.AppendUnique(LIBPATH = evioldir) # libraries eviolibs = [] eviolibs.append('evioxx') eviolibs.append('evio') eviolibs.append('codaChannels') eviolibs.append('pthread') eviolibs.append('rt') if env['PLATFORM'] == 'posix': eviolibs.append('z') eviolibs.append('expat') if env['PLATFORM'] == 'darwin': eviolibs.append('z') eviolibs.append('expat') # Assuming we have boost, installed with FINK env.AppendUnique(CPPPATH = ['/sw/include']) if env['PLATFORM'] == 'win32': MSSDK = OSENV['MSSdk'] EXPAT = OSENV['EXPAT'] env.AppendUnique(CPPPATH = [EXPAT + '/Source/lib']) env.AppendUnique(CPPPATH = [MSSDK + '/Include']) env.AppendUnique(LIBPATH = [EXPAT + '/bin']) env.AppendUnique(LIBS = eviolibs) # dependencies on other packages # ...this is a kludge until the DAQ group solves their package inter-dependency problems if(OSENV.has_key('ETROOT') or OSENV.has_key('ET')): from loadet import loadet loadet(env)