#!/bin/sh #------------------------------------------------------------------------------ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License # . # # Script # makeCCMIO # # Description # Build the libccmio library # # ---------------------------------------------- # NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE #------------------------------------------------------------------------------ # Dynamic library endings (default is .so) [ "$(uname -s)" = Darwin ] && SO=dylib || SO=so # Run from third-party directory only cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || { echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR" echo " Check your OpenFOAM environment and installation" exit 1 } [ -n "$FOAM_EXT_LIBBIN" ] || { echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set" echo " Check your OpenFOAM environment and installation" exit 1 } . etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ # libccmio version from OpenFOAM etc/config.sh file: _foamEtc -config ccmio ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1} targetType=lib # Default is static linkage #------------------------------------------------------------------------------ usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done /bin/cat</dev/null # Place static libraries in sub-directory: if [ "$targetType" = lib ] then mkdir -m 0755 -p $libdir 2>/dev/null export FOAM_EXT_LIBBIN=$libdir fi wmake -j $WM_NCOMPPROCS -s $targetType \ && echo "Built: ccmio" \ && install ) || { echo "Error building: ccmio" exit 1 } #------------------------------------------------------------------------------