-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile.TEMPLATE
68 lines (53 loc) · 2.35 KB
/
Makefile.TEMPLATE
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
68
PROG=test_ftnunit
SRCS = buffer.f90 fft_type.f90 filtering.f90 ftnunit.f90 \
global_parameters.f90 inv_mesh.f90 kernel.f90 mc_integration.f90 \
random_tetrahedron.f90 test_buffer.f90 test_fft_type.f90 \
test_filter.f90 test_ftnunit.f90 test_inv_mesh.f90 test_kernel.f90 \
test_mc.f90 test_tetrahedra.f90 type_parameter.f90
OBJS = buffer.o fft_type.o filtering.o ftnunit.o global_parameters.o \
inv_mesh.o kernel.o mc_integration.o random_tetrahedron.o \
test_buffer.o test_fft_type.o test_filter.o test_ftnunit.o \
test_inv_mesh.o test_kernel.o test_mc.o test_tetrahedra.o \
type_parameter.o
#Example to include specific netcdf libraries:
LIBS = -lm -lfftw3 -lfftw3f -L $(HOME)/local/lib -lnetcdff -Wl,-rpath,$(HOME)/local/lib
# set unc to compile with netcdf:
#F90FLAGS = -Dunc
CC = gcc
CFLAGS = -O3 -DF_UNDERSCORE
F90 = mpif90 -O3 -fbacktrace -g
FC = gfortran -O3 -fbacktrace -g
# to include local built of netcdf you might want to use sth like this:
INCLUDE = -I $(HOME)/local/include -I /usr/include
# cancel m2c implicit rule
%.o : %.mod
all: $(PROG)
$(PROG): $(OBJS)
$(F90) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(PROG) $(OBJS) *.M *.mod *.d *.il core
.SUFFIXES: $(SUFFIXES) .f90 .F90
.f90.o:
$(F90) $(F90FLAGS) -c $(INCLUDE) $<
.F90.o:
$(F90) $(F90FLAGS) -c $(INCLUDE) $<
buffer.o: global_parameters.o Makefile
fft_type.o: global_parameters.o Makefile
filtering.o: global_parameters.o Makefile
ftnunit.o: Makefile
global_parameters.o: Makefile
inv_mesh.o: global_parameters.o type_parameter.o Makefile
kernel.o: global_parameters.o Makefile
mc_integration.o: global_parameters.o Makefile
random_tetrahedron.o: global_parameters.o Makefile
test_buffer.o: buffer.o ftnunit.o global_parameters.o Makefile
test_fft_type.o: fft_type.o ftnunit.o global_parameters.o Makefile
test_filter.o: fft_type.o filtering.o ftnunit.o global_parameters.o Makefile
test_ftnunit.o: ftnunit.o test_buffer.o test_fft_type.o test_filter.o \
test_inv_mesh.o test_kernel.o test_mc.o test_tetrahedra.o Makefile
test_inv_mesh.o: ftnunit.o global_parameters.o inv_mesh.o Makefile
test_kernel.o: ftnunit.o global_parameters.o kernel.o Makefile
test_mc.o: ftnunit.o global_parameters.o mc_integration.o \
random_tetrahedron.o Makefile
test_tetrahedra.o: ftnunit.o global_parameters.o random_tetrahedron.o Makefile
type_parameter.o: global_parameters.o Makefile