Ticket #38752: makefile

File makefile, 846 bytes (added by kingcrimson@…, 12 years ago)

example makefile

Line 
1PETSC_DIR  = /opt/local/lib/petsc
2PETSC_ARCH = 
3
4ALL: 1_petsc_hello 2_petsc_vec 3_petsc_mat
5#ALL: 3_petsc_mat
6
7#CFLAGS   = -g -O0
8CFLAGS =
9CPPFLAGS = 
10
11CLEANFILES = 1_petsc_hello 2_petsc_vec 3_petsc_mat
12
13include ${PETSC_DIR}/conf/variables
14include ${PETSC_DIR}/conf/rules
15
161_petsc_hello: 1_petsc_hello.o  chkopts
17        @echo "--> Linking the executable...  <--"
18        -${CLINKER} -o 1_petsc_hello 1_petsc_hello.o  ${PETSC_KSP_LIB}
19        ${RM} 1_petsc_hello.o
20        @echo "-->...done.  <--"
21
222_petsc_vec: 2_petsc_vec.o  chkopts
23        @echo "--> Linking the executable...  <--"
24        -${CLINKER} -o 2_petsc_vec 2_petsc_vec.o  ${PETSC_KSP_LIB}
25        ${RM} 2_petsc_vec.o
26        @echo "-->...done.  <--"
27
283_petsc_mat: 3_petsc_mat.o  chkopts
29        @echo "--> Linking the executable...  <--"
30        -${CLINKER} -o 3_petsc_mat 3_petsc_mat.o  ${PETSC_KSP_LIB}
31        ${RM} 3_petsc_mat.o
32        @echo "-->...done.  <--"