diff --git a/AMDiS/other/include/Makefile_AMDiS.mk b/AMDiS/other/include/Makefile_AMDiS.mk new file mode 100644 index 0000000000000000000000000000000000000000..cdb7bb9c4dc7c2cd642f6098a9a7e0cdade6294a --- /dev/null +++ b/AMDiS/other/include/Makefile_AMDiS.mk @@ -0,0 +1,136 @@ +# +# standard definition and rules to compile AMDiS user programms +# +# ============================================================================ +# !!! Do not edit after this line !!! +# ============================================================================ + + + +PARMETIS_DIR = $(AMDIS_DIR)/lib/ParMetis-3.1 + +# ============================================================================ +# ===== includes pathes ====================================================== +# ============================================================================ + +AMDIS_INCLUDE = -I$(AMDIS_DIR)/src -I$(AMDIS_DIR)/compositeFEM/src -I$(AMDIS_DIR)/lib/mtl4 +MPCCI_INCLUDE = -I$(MPCCI_DIR)/include +PARMETIS_INCLUDE = -I$(PARMETIS_DIR) +PARALLEL_INCLUDE = -I$(AMDIS_DIR)/src/parallel + +INCLUDES = -I. $(AMDIS_INCLUDE) $(MPCCI_INCLUDE) $(PARALLEL_INCLUDE) + +# ============================================================================ +# ===== libraries ============================================================ +# ============================================================================ + +AMDIS_LIB = -L$(AMDIS_DIR)/lib -lamdis +PNG_LIB = -lpng + +UMFPACK_LIB = -L$(AMDIS_DIR)/lib/AMD/Lib -L$(AMDIS_DIR)/lib/UMFPACK/Lib +ifeq ($(strip $(USE_SERVER)), mars) + UMFPACK_LIB += -lmkl -lumfpack -lamd +else + ifeq ($(strip $(USE_SERVER)), themisto) + UMFPACK_LIB += $(MKL_LIB) -lmkl -lguide -lpthread -lumfpack -lamd + else + ifeq ($(strip $(USE_SERVER)), deimos) + MPI_DIR = /licsoft/libraries/openmpi/1.2.6/64bit + UMFPACK_LIB += -lumfpack -lamd -L/licsoft/libraries/goto -lgoto -lpthread + else + UMFPACK_LIB += -lblas -lumfpack -lamd + endif + endif +endif + +MPCCI_LIB = -L$(MPCCI_DIR)/lib/linux-x86-glibc22 -lmpcci +PARMETIS_LIB = -L$(PARMETIS_DIR) -lparmetis -lmetis + +LIBS = $(AMDIS_LIB) $(PNG_LIB) +LIBS += -lboost_iostreams -lboost_filesystem + +ifeq ($(strip $(USE_UMFPACK)), 1) + LIBS += $(UMFPACK_LIB) +endif + +ifeq ($(strip $(USE_MKL)), 1) + ifeq ($(strip $(USE_SERVER)), themisto) + LIBS += $(MKL_LIB) + else + LIBS += -L$(MKL_LIB) + endif + + LIBS += -lmkl -lmkl_solver -lguide -lpthread +endif + +ifeq ($(strip $(USE_MPCCI)), 1) + LIBS += $(MPCCI_LIB) +endif + + +# ============================================================================ +# ===== parallel or sequential ? ============================================= +# ============================================================================ + +ifeq ($(strip $(USE_PARALLEL_AMDIS)), 1) + ifeq ($(strip $(USE_SERVER)), mars) + ifeq ($(strip $(USE_COMPILER)), gcc) + COMPILE = g++ + else + COMPILE = icpc + endif + else + COMPILE = $(MPI_DIR)/bin/mpiCC + endif + + LIBS += $(PARMETIS_LIB) -lmpi +else + ifeq ($(strip $(USE_COMPILER)), gcc) + COMPILE = g++ + else + COMPILE = icpc + endif +endif + +# ============================================================================ +# ===== compile flags ======================================================== +# ============================================================================ + +ifeq ($(strip $(DEBUG)), 0) + CPPFLAGS = -O2 +else + CPPFLAGS = -g -O0 +endif + +ifeq ($(strip $(USE_OPENMP)), 1) + ifeq ($(strip $(USE_COMPILER)), gcc) + CPPFLAGS += -fopenmp + else + CPPFLAGS += -openmp + endif +endif + + +# ============================================================================ +# ===== libtool linking ====================================================== +# ============================================================================ + +LIBTOOL = $(AMDIS_DIR)/libtool +LINK = $(LIBTOOL) --mode=link $(COMPILE) + +# ============================================================================ +# ===== rules ================================================================ +# ============================================================================ + +all : + make $(PROGRAMS) + +clean: + -rm -rf *.o + -rm -rf $(PROGRAMS) + +.cc.o: $*.cc + $(COMPILE) $(DEFS) $(INCLUDES) $(CPPFLAGS) -c -o $*.o $^ + + +