From 447b745bb8f70a4885b1a33055c7c3df6eeb5cb1 Mon Sep 17 00:00:00 2001 From: Rainer Backofen <rainer.backofen@tu-dresden.de> Date: Thu, 5 Nov 2009 05:05:35 +0000 Subject: [PATCH] Shift standard definitions in Makefile needed to compile AMDiS user programs to a central place in AMDiS directory. --- demo/Makefile | 135 +------------------------------------------------- 1 file changed, 2 insertions(+), 133 deletions(-) diff --git a/demo/Makefile b/demo/Makefile index 99e7ac32..25a61d98 100644 --- a/demo/Makefile +++ b/demo/Makefile @@ -18,139 +18,8 @@ AMDIS_DIR = ../AMDiS MPI_DIR = # on mars, deimos or themisto, leave this field blank MPCCI_DIR = - - -# ============================================================================ -# !!! 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 $^ - +#==== standard definitions and rules to compile AMDiS user programs ========== +include $(AMDIS_DIR)/other/include/Makefile_AMDiS.mk # ============================================================================ # ===== user programs ======================================================== -- GitLab