Commit 447b745b authored by Backofen, Rainer's avatar Backofen, Rainer
Browse files

Shift standard definitions in Makefile needed to compile AMDiS user

programs to a central place in AMDiS directory.
parent 44de7829
......@@ -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 ========================================================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment