# Set all of the configuration specific variables here. # Copyright (C) 2006 California Institute of Technology # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA import os import sys Import('env') env['CC']='mpicc' env['LINK']='mpicc' env.Append(CPPFLAGS=['-DVERSION=\\"CIG\\"','-DHAVE_PETSC','-DNOEXPERIMENT']) if '': env.Append(CCFLAGS=Split('')) if '': env.Append(CPPFLAGS=Split('')) env.Append(SHLINKFLAGS=Split('-dynamiclib -single_module -undefined dynamic_lookup -multiply_defined suppress')) with_shared=True if not '': with_shared=False env.Append(CPPFLAGS=['-DNOSHARED']) # Add in the size of long env.Append(CPPFLAGS=['-DSYSTEM_SIZEOF_LONG=4']) # Add in the MPI paths for path in Split(''): if(path[0]=='/'): env.Append(CPPPATH=[path]) else: env.Append(CPPPATH=['#/'+path]) env.Append(LIBS=Split('')) for path in Split(''): env.Append(LIBPATH=['#/'+path]) env.Append(RPATH=Split('')) mpirun='mpiexec' # Add in the libxml2 paths for path in Split('/usr/include/libxml2'): if(path[0]=='/'): env.Append(CPPPATH=[path]) else: env.Append(CPPPATH=['#/'+path]) env.Append(LIBS=Split('xml2')) for path in Split(''): if(path[0]=='/'): env.Append(LIBPATH=[path]) else: env.Append(LIBPATH=['#/'+path]) env.Append(RPATH=Split('')) # Add in the petsc paths for path in Split('/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/include /Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/bmake/darwin9.6.0-c-debug'): if(path[0]=='/'): env.Append(CPPPATH=[path]) else: env.Append(CPPPATH=['#/'+path]) env.Append(LIBS=Split('petscksp petscdm petscmat petscvec petsc ')) for path in Split('/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/lib/darwin9.6.0-c-debug'): if(path[0]=='/'): env.Append(LIBPATH=[path]) else: env.Append(LIBPATH=['#/'+path]) env.Append(RPATH=Split('/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/lib/darwin9.6.0-c-debug')) env.ParseConfig('echo "-I/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/externalpackages/mpich2-1.0.4p1/darwin9.6.0-c-debug/include -Wl,-rpath,/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/externalpackages/mpich2-1.0.4p1/darwin9.6.0-c-debug/lib -L/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/externalpackages/mpich2-1.0.4p1/darwin9.6.0-c-debug/lib -lmpich -lpmpich -Wl,-rpath,/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/externalpackages/fblaslapack/darwin9.6.0-c-debug -L/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/externalpackages/fblaslapack/darwin9.6.0-c-debug -lflapack -Wl,-rpath,/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/externalpackages/fblaslapack/darwin9.6.0-c-debug -L/Users/oeit/Documents/NdLp_CUDA/PETSc/petsc-2.3.2-p10/externalpackages/fblaslapack/darwin9.6.0-c-debug -lfblas -lcrt1.10.5.o -Wl,-rpath,/usr/lib/i686-apple-darwin9/4.0.1 -L/usr/lib/i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1 -L/usr/lib/gcc/i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1 -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../.. -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../.. -ldl -lgcc_s.10.5 -lSystem -lgfortranbegin -lgfortran -Wl,-rpath,/usr/local/gfortran/libexec/gcc/i386-apple-darwin8.10.1/4.4.0/ -L/usr/local/gfortran/libexec/gcc/i386-apple-darwin8.10.1/4.4.0/ -Wl,-rpath,/usr/local/gfortran/libexec/gcc/i386-apple-darwin8.10.1/ -L/usr/local/gfortran/libexec/gcc/i386-apple-darwin8.10.1/ -Wl,-rpath,/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.4.0/ -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.4.0/ -Wl,-rpath,/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/ -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/ -Wl,-rpath,/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.4.0/../../../ -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.4.0/../../../ -Wl,-rpath,/usr/lib/ -L/usr/lib/ -Wl,-rpath,/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.4.0 -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.4.0 -Wl,-rpath,/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.4.0/../../.. -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.4.0/../../.. -Wl,-rpath,/usr/lib/i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../.. -lcrt1.10.5.o -Wl,-rpath,/usr/lib/i686-apple-darwin9/4.0.1 -L/usr/lib/i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1 -L/usr/lib/gcc/i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1 -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1 -Wl,-rpath,/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../.. -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../.. -ldl -lgcc_s.10.5 -lSystem -ldl -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -PIC -Wall -Wwrite-strings -Wno-long-double -Wno-strict-aliasing -g3 -PIC -Wall -Wwrite-strings -Wno-long-double -Wno-strict-aliasing -g3"') # CPP and linker flags cppflags='' if len(cppflags)!=0: env.Append(CPPFLAGS=Split('')) ldflags='' if len(ldflags)!=0: env.Append(LINKFLAGS=Split('')) extra_libs="-ldl " ## Figure out where everything is going to be put once it is built. import re outer_environ=os.environ if outer_environ.has_key('prefix'): prefix=outer_environ['prefix'] else: prefix="/Users/oeit/Documents/NdLp_CUDA/Gale/Gale-1_3_0" exec_prefix="${prefix}" bin_dir="${exec_prefix}/bin" lib_dir="${exec_prefix}/lib" include_dir="${exec_prefix}/include" if outer_environ.has_key('mandir'): man_dir=outer_environ['mandir']+"/man1" else: man_dir="${exec_prefix}/man"+"/man1" exec_prefix=re.sub(r"\$\{prefix\}",prefix,exec_prefix) bin_dir=re.sub(r"\$\{exec_prefix\}",exec_prefix,bin_dir) lib_dir=re.sub(r"\$\{exec_prefix\}",exec_prefix,lib_dir) man_dir=re.sub(r"\$\{exec_prefix\}",exec_prefix,man_dir) include_dir=re.sub(r"\$\{exec_prefix\}",exec_prefix,include_dir) env["prefix"]=prefix env["exec_prefix"]=exec_prefix env["bin_dir"]=bin_dir env["lib_dir"]=lib_dir env["man_dir"]=man_dir env["include_dir"]=include_dir # Select static or shared objects def libs(shared_lib_objects,static_lib_objects): if '': return shared_lib_objects return static_lib_objects Export('env','with_shared','mpirun','extra_libs','libs')