/*
 * NB: mplib PINC must appear after PTSCOTCH_INC_DIR 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$(PTSCOTCH_INC_DIR) \
    -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$(FOAM_LIBBIN) -ldecompositionMethods \
    -L$(PTSCOTCH_LIB_DIR) \
    -L$(SCOTCH_LIB_DIR) \
    -lscotch \
    -lptscotch

/* Combined into libptscotch for windows compile */
ifneq ($(WM_OSTYPE),MSwindows)
    LIB_LIBS += -lptscotcherrexit
endif

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