-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (31 loc) · 814 Bytes
/
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
target = poisson3d
.SUFFIXES:
.SUFFIXES: .f90 .o
CC = gcc
FC = gfortran
FFLAGS = -O3 -ffast-math -funroll-loops -fopenmp
OBJS = poisson3d.o precision.o m_init.o m_linspace.o m_alloc.o poisson_methods.o m_gldat.o
LIBS =
.PHONY: all
all: $(target)
.PHONY: new
new: clean $(target)
.PHONY: clean realclean
clean:
@/bin/rm -f $(OBJS) *.mod
realclean: clean
@/bin/rm -f $(target)
# linking: the target depends on the objects
$(target): $(OBJS)
$(FC) $(FFLAGS) $(OBJS) -o $(target)
.f90.o:
$(FC) -c $(FFLAGS) $<
.c.o:
$(CC) -c $<
# dependencies:
poisson3d.o: precision.o poisson_methods.o write_vtk.o m_alloc.o m_gldat.o m_init.o
poisson_methods.o: precision.o m_gldat.o m_alloc.o
m_init.o: precision.o m_gldat.o m_linspace.o
m_alloc.o: precision.o
m_linspace.o: precision.o
m_gldat.o: precision.o