Rev | Line | |
---|
[1082] | 1 | import os,glob,shutil
|
---|
| 2 |
|
---|
| 3 | # import root environment
|
---|
| 4 | Import( "env" )
|
---|
| 5 | myenv = env.Copy()
|
---|
| 6 |
|
---|
| 7 | # casa includes
|
---|
| 8 | casaincd = [os.path.join(myenv['CASAROOT'], 'code/include'), \
|
---|
| 9 | os.path.join(myenv['CASAROOT'], 'code/casa')]
|
---|
| 10 |
|
---|
| 11 | myenv.Append( CPPPATH = casaincd )
|
---|
| 12 |
|
---|
| 13 | # libaries and objects
|
---|
| 14 | # myabe use glob here
|
---|
| 15 | # ASAP
|
---|
| 16 | cpps = """
|
---|
| 17 | Logger.cpp
|
---|
| 18 | MathUtils.cpp
|
---|
| 19 | MathUtils2.cpp
|
---|
| 20 | RowAccumulator.cpp
|
---|
| 21 | STAsciiWriter.cpp
|
---|
| 22 | STAttr.cpp
|
---|
| 23 | STFiller.cpp
|
---|
| 24 | STFit.cpp
|
---|
| 25 | STFitEntry.cpp
|
---|
| 26 | STFitter.cpp
|
---|
| 27 | STFocus.cpp
|
---|
| 28 | STFrequencies.cpp
|
---|
| 29 | STHeader.cpp
|
---|
| 30 | STHistory.cpp
|
---|
| 31 | STLineFinder.cpp
|
---|
| 32 | STMath.cpp
|
---|
| 33 | STMolecules.cpp
|
---|
| 34 | STPol.cpp
|
---|
| 35 | STPolLinear.cpp
|
---|
| 36 | STPolStokes.cpp
|
---|
| 37 | STSelector.cpp
|
---|
| 38 | STSubTable.cpp
|
---|
| 39 | STTcal.cpp
|
---|
| 40 | STWeather.cpp
|
---|
| 41 | STWriter.cpp
|
---|
| 42 | Scantable.cpp
|
---|
| 43 | Templates.cpp
|
---|
| 44 | """.split()
|
---|
| 45 |
|
---|
| 46 | pycpps = """
|
---|
| 47 | python_Fitter.cpp
|
---|
| 48 | python_Logger.cpp
|
---|
| 49 | python_STFiller.cpp
|
---|
| 50 | python_STFitEntry.cpp
|
---|
| 51 | python_STLineFinder.cpp
|
---|
| 52 | python_STMath.cpp
|
---|
| 53 | python_STSelector.cpp
|
---|
| 54 | python_STWriter.cpp
|
---|
| 55 | python_Scantable.cpp
|
---|
| 56 | python_asap.cpp
|
---|
| 57 | """.split()
|
---|
| 58 |
|
---|
| 59 | # CASA
|
---|
| 60 | casalibs = """
|
---|
| 61 | casav
|
---|
| 62 | atnf images ms components coordinates
|
---|
| 63 | lattices fits measures measures_f
|
---|
| 64 | tables scimath scimath_f casa
|
---|
| 65 | wcs
|
---|
| 66 | rpfits
|
---|
| 67 | """.split()
|
---|
| 68 |
|
---|
| 69 | # OTHER
|
---|
| 70 | genlibs = """
|
---|
| 71 | g2c stdc++ lapack blas
|
---|
| 72 | """.split()
|
---|
| 73 |
|
---|
| 74 | myenv.Append( LIBS = casalibs )
|
---|
| 75 | myenv.Append( LIBS = ['cfitsio_lfs'] )
|
---|
| 76 | myenv.Append( LIBS = genlibs )
|
---|
| 77 |
|
---|
| 78 | # Explicit templates in casa
|
---|
| 79 | myenv.Append( CPPFLAGS = ['-DAIPS_NO_TEMPLATE_SRC'] )
|
---|
| 80 |
|
---|
| 81 | casalibd = os.path.join(myenv['CASAROOT'],myenv['CASAARCH'],'lib')
|
---|
| 82 | # location of libcasav.a
|
---|
| 83 | myenv.Append( LIBPATH = ['#/build', casalibd] )
|
---|
| 84 | myenv.Install('#build', os.path.join(casalibd, 'libwcs.a'))
|
---|
| 85 | myenv['SHLIBPREFIX']="" #gets rid of lib prefix
|
---|
| 86 |
|
---|
| 87 | # need to create library here to fool scons linker
|
---|
| 88 | casav = myenv.StaticLibrary(target = "casav", source = os.path.join(casalibd, 'version.o'))
|
---|
| 89 | # Finally create the library for the module
|
---|
| 90 | so = myenv.SharedLibrary( target = "_asap", source = cpps+pycpps )
|
---|
| 91 | Return("so")
|
---|
Note:
See
TracBrowser
for help on using the repository browser.