-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
61 lines (49 loc) · 1.2 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
55
56
57
58
59
60
61
#
# G E N C L
#
# ------------------------------------------------
# Modern fortran version of the gencsl(f)
#
# Jon Grumer
#
# Development version -- use with caution!
# ------------------------------------------------
# ... Compilation setup
FC = gfortran
F08FLAGS = -fcheck=all
F08FLAGS += -fbacktrace
F08FLAGS += -ffpe-trap=zero,overflow,underflow
F08FLAGS += -Wall -Wextra -Wconversion
F08FLAGS += -Wno-unused -Wno-unused-dummy-argument
F08FLAGS += -pedantic
F77FLAGS =
# ... Bin directory
BINDIR = .
# ... Object files
F08_OBJ = m_parameters.o \
m_globals.o \
m_tools.o \
m_io.o \
m_generate.o \
gencl_main.o
F77_OBJ = gencl77.o
# ... Make all
all: gencl90 gencl77
# ... Make clean (dSYM's are sometime generated in Mac environments)
clean:
@rm -rf *.o *.mod gencl90.dSYM gencl77.dSYM core
# ... Make cleanall
cleanall:
@rm -rf *.o *.mod gencl90.dSYM gencl77.dSYM core $(BINDIR)/gencl90 $(BINDIR)/gencl77
# ... Rules
gencl90: $(F08_OBJ)
$(FC) $(F08FLAGS) $^ -o $@
gencl77: $(F77_OBJ)
$(FC) $(FFLAGS) $^ -o $@
%.mod: %.o
$(FC) $(F08FLAGS) -c $<
%.o: %.f08
$(FC) $(F08FLAGS) -c $<
%.o: %.f
$(FC) $(FFLAGS) -c $<