#!/bin/sh
cd "${0%/*}" || exit 1    # Run from this directory

# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments

# Perform various checks
wmakeCheckPwd -quiet "$WM_PROJECT_SITE/$WM_PROJECT_VERSION/src" ||
{
    echo "Allwmake error: Current directory is not"
    echo "    \${WM_PROJECT_SITE}/\${WM_PROJECT_VERSION}/src"
    echo "    The environment variables are inconsistent with the installation."
    echo "    Check the OpenFOAM entries in your dot-files and source them."
    exit 1
}

[ -n "$FOAM_EXT_LIBBIN" ] || {
    echo "Allwmake error: FOAM_EXT_LIBBIN not set"
    echo "    Check the OpenFOAM entries in your dot-files and source them."
    exit 1
}

wmake $targetType finiteVolume

thermophysicalModels/Allwmake $targetType $*

MomentumTransportModels/Allwmake $targetType $*

wmake $targetType fvMotionSolver

functionObjects/Allwmake $targetType $*

wmakeLnInclude performance


#------------------------------------------------------------------------------
