# this is a guideline, not a script - do not execute directly # start in the source dir root SOURCE_DIR=$PWD # create the build dir, only do this once for the entire source dir BUILD_DIR="${SOURCE_DIR}/build" mkdir "$BUILD_DIR" && cd "$BUILD_DIR" && "${SOURCE_DIR}/configure" # from now on work in the build dir cd "$BUILD_DIR" # create configuration, called 'cc' in this document make cc PROMPT= # copy the thorn list for the configuration cp "${SOURCE_DIR}/contrib/critical_collapse/ThornList" configs/cc # the following external libraries are needed LIBS="brilldata teukolskydata mg2d lapacke gfortran" # library object dir LIBDIR="" # header dir INCDIR="
" export PKG_CONFIG_PATH="${LIBDIR}/pkg_config" # compiler flags CFLAGS="-g -std=gnu99 -I${INCDIR}" C_OPTIMISE_FLAGS="-O3" C_OPENMP_FLAGS="-fopenmp" CXXFLAGS="-g -std=c++11" CXX_OPTIMISE_FLAGS="-O3" CXX_OPENMP_FLAGS="-fopenmp" F90FLAGS="-fallow-argument-mismatch" # set build parameters make cc-reconfig \ OPENMP=yes VECTORISE=yes \ MPI_DIR=/usr LIBS="$LIBS" LDFLAGS="$LDFLAGS" \ C_OPTIMISE_FLAGS="$C_OPTIMISE_FLAGS" CXX_OPTIMISE_FLAGS="$CXX_OPTIMISE_FLAGS" \ C_OPENMP_FLAGS="$C_OPENMP_FLAGS" CXX_OPENMP_FLAGS="$CXX_OPENMP_FLAGS" \ CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" F90FLAGS="$F90FLAGS" # build make cc -j8