-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmakefile
More file actions
70 lines (56 loc) · 1.96 KB
/
Copy pathmakefile
File metadata and controls
70 lines (56 loc) · 1.96 KB
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
67
#export SLEPC_DIR=/home/guido/libs/slepc-3.7.1
#export PETSC_DIR=/home/guido/libs/petsc-3.7.2
#export PETSC_ARCH=arch-linux2-c-opt
PWD:= $(shell pwd)
SRC_DIR=./src
OBJ_DIR=./obj
DEP_DIR=${PWD}/inc
CFLAGS=-g -O0
DEPS = ${DEP_DIR}/fermi.h \
${DEP_DIR}/gmsh.h \
${DEP_DIR}/mesh.h \
${DEP_DIR}/fem.h \
${DEP_DIR}/fun.h \
${DEP_DIR}/list.h \
${DEP_DIR}/types.h \
${DEP_DIR}/global.h \
${DEP_DIR}/utils.h
OBJ = ${OBJ_DIR}/fer_main.o \
${OBJ_DIR}/mesh.o \
${OBJ_DIR}/list.o \
${OBJ_DIR}/gmsh.o \
${OBJ_DIR}/fem.o \
${OBJ_DIR}/fun.o \
${OBJ_DIR}/fer_assm.o \
${OBJ_DIR}/fer_init.o \
${OBJ_DIR}/fer_finish.o \
${OBJ_DIR}/fer_boun.o \
${OBJ_DIR}/fer_step.o \
${OBJ_DIR}/fer_elem.o \
${OBJ_DIR}/fer_solv.o \
${OBJ_DIR}/fer_power.o \
${OBJ_DIR}/fer_rods.o \
${OBJ_DIR}/lst2msh.o \
${OBJ_DIR}/utils.o \
${OBJ_DIR}/fer_output.o \
${OBJ_DIR}/fer_parser.o
.PHONY: clean_
COMMDOM=0
ifneq ($(COMMDOM), 0)
ROOT = $(shell pwd)
LIBPLEPP = $(ROOT)/lib/PLEPP/LIBPLEPP/
LIBPLE = $(ROOT)/lib/PLEPP/LIBPLE/
CFLAGS += -DCOMMDOM=$(COMMDOM)
CFLAGS += -I$(LIBPLEPP)/Include/
CFLAGS += -I$(LIBPLEPP)/Wrappers/CC/
LIBS = $(LIBPLEPP)/Wrappers/CC/libcommdom.a
LIBS += $(LIBPLE)/Execs/lib/libple.a
endif
all: ${OBJ}
mpicc -o fermi $(LIBS) $^ ${SLEPC_EPS_LIB}
${OBJ_DIR}/%.o: ${SRC_DIR}/%.c $(DEPS)
${PETSC_COMPILE} -c ${CFLAGS} -o $@ $< -I${DEP_DIR}
clean_:
rm -f $(OBJ) fermi
include ${PETSC_DIR}/lib/petsc/conf/variables
include ${SLEPC_DIR}/lib/slepc/conf/slepc_common