-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
executable file
·66 lines (50 loc) · 1.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# -*- coding: utf-8; mode: makefile -*-
# mpirun -np 2 -mca btl tcp,self SEM_p
par = 1
ifeq ($(par),1)
CC = mpic++
MPISRC= mpidata.cpp
PROJECT= SEM_p
CFLAGS1= -DMY_MPI -DMY_OVERLAP
else
# Serial
CC = g++
PROJECT= SEM_s
endif
SRCS= SEM_parallel.cpp fedata.cpp vtk.cpp aux.cpp transient.cpp \
${MPISRC}
SRCS_C= gauss_legendre.c
objects= $(patsubst %.cpp, %.o,$(SRCS)) $(patsubst %.c, %.o,$(SRCS_C))
LINKFLAGS=
CFLAGS= ${CFLAGS1} -Wno-deprecated -g -O2
########
# BLAS #
########
LIBBLAS = -lblas
INCBLAS = -I/usr/include/
#######
# VTK #
#######
LIBVTK = -L/usr/lib/ -lvtkCommon -lvtkIO -lvtkFiltering
INCVTK = -I/usr/include/vtk-5.8
LIBS= ${LIBVTK} ${LIBBLAS} -Llib/ -lelement
INCLUDE = ${INCVTK} ${INCBLAS} -Ilib/
.PHONY: all
all:${PROJECT}
$(shell cd src; etags $(SRCS) $(SRCS_C))
#$(shell ctags -Re)
# regel for exe-filen, dvs link filer
${PROJECT}: $(objects)
$(CC) $(objects) $(LINKFLAGS) $(LIBS) -o ${PROJECT}
%.o: %.cpp
$(CC) $(INCLUDE) $(CFLAGS) -c $< -o $@
%.o: src/%.cpp
$(CC) $(INCLUDE) $(CFLAGS) -c $< -o $@
%.o: src/%.c
$(CC) $(INCLUDE) $(CFLAGS) -c $< -o $@
# special rule for the file containing exodus_ref
.PHONY: clean
clean:
rm -f *.o
rm -f $(PROJECT)
rm -f TAGS