#!/bin/sh #------------------------------------------------------------------------------ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | www.openfoam.com # \\/ M anipulation | #------------------------------------------------------------------------------ # Copyright (C) 2011-2016 OpenFOAM Foundation # Copyright (C) 2016-2021 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Script # makeCCMIO # # Description # Build the libccmio library # # ---------------------------------------------- # NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE #------------------------------------------------------------------------------ if : # Run from third-party directory then cd "${0%/*}" || exit 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 } fi . "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions #------------------------------------------------------------------------------ # libccmio version from OpenFOAM etc/config.sh file: _foamConfig ccmio PACKAGE="${ccmio_version:-libccmio-2.6.1}" targetType=lib # Default is static linkage #------------------------------------------------------------------------------ printVersions() { listPackageVersions ccmio libccmio; exit 0; } printHelp() { cat</dev/null # Static libraries in sub-directory export CCMIO_LIB_DIR="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH" # Dynamic libraries directly into FOAM_EXT_LIBBIN if [ "$targetType" = libso ] then CCMIO_LIB_DIR="$FOAM_EXT_LIBBIN" fi mkdir -m 0755 -p "$CCMIO_LIB_DIR" 2>/dev/null wmake -j $WM_NCOMPPROCS -s $targetType \ && echo "Built: $PACKAGE" \ && install ) || { echo "Error building: $PACKAGE" exit 1 } #------------------------------------------------------------------------------