/*
 * NB: mplib PINC must appear after the SCOTCH_ARCH_PATH/include/FOAM_MPI
 * to ensure we do not accidentally get a ptscotch header from the
 * mpi distribution.
 */
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(DEFAULT_RULES)/mplib$(WM_MPLIB)

EXE_INC = \
    -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \
    -I$(SCOTCH_INC_DIR) \
    $(PFLAGS) $(PINC) \
    -I../decompositionMethods/lnInclude

/*
 * The '-lscotch' is a slight hack:
 * ptscotch 6 requires scotch linked in, but does not declare the dependency
 */
LIB_LIBS = \
    -L$(SCOTCH_LIB_DIR) \
    -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) \
    -L$(FOAM_EXT_LIBBIN) \
    -lptscotch -lptscotcherrexit \
    -lscotch

/* May require librt, but scotch does not declare the dependency */
ifeq ("$(SO)","so")
    LIB_LIBS += -lrt
endif
