-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (38 loc) · 1.33 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
EXE += main
SOURCES += main.cpp mesh.cpp residue.cpp
OBJECTS += main.o conditions.o mesh.o residue.o
#PETSC_ARCH=arch-linux2-cxx-debug
PETSC_ARCH =arch-linux2-cxx-opt
CFLAGS = -g -Wall -Wextra
FFLAGS =
CPPFLAGS = -g -I. -I${FEPIC_DIR} $(FEP_INCLUDE) -Wall -Wextra -fopenmp -m64 -msse2 -L$(FEP_LIBS_DIR) -lfepic $(FEP_LDFLAGS)
FPPFLAGS =
.PHONY: all clean
# tests some variables
ifeq "" "$(wildcard ${FEPIC_DIR})"
$(error variable FEPIC_DIR was not defined or is an invalid directory)
endif
ifeq "" "$(wildcard ${PETSC_DIR})"
$(error variable PETSC_DIR was not defined or is an invalid directory)
endif
ifeq "" "$(wildcard ${PETSC_DIR}/${PETSC_ARCH})"
$(error variable PETSC_ARCH was not defined or is an invalid directory)
endif
ifeq "" "${PETSC_ARCH}"
$(error PETSC_ARCH is was properly defined)
endif
#onde é procurado as bibliotecas
#SLINKER += -Wl,-rpath,/home/felipe/Slibs/smesh -L/home/felipe/Slibs/smesh
# "variables" must be included twice
include ${PETSC_DIR}/conf/variables
include ${PETSC_DIR}/conf/rules
include ${FEPIC_DIR}/conf/variables
PETSC_KSP_LIB += -L$(FEP_LIBS_DIR) -lfepic $(FEP_LDFLAGS)
all: main
main: ${OBJECTS} chkopts
-${CLINKER} -o $(EXE) $(OBJECTS) ${PETSC_KSP_LIB}
conditions.o: conditions.cpp
g++ -c $(FEP_INCLUDE) conditions.cpp -o conditions.o
clean::
${RM} *.o
include ${PETSC_DIR}/conf/test