-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (46 loc) · 1.85 KB
/
Copy pathMakefile
File metadata and controls
64 lines (46 loc) · 1.85 KB
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
# Modified from: http://www.webalice.it/o.drofa/davide/makefile-fortran/makefile-fortran.html
# Create Executable by typing make in command line
# ======================================================================
# Start with the declarations
# ======================================================================
# The compiler
FC = gfortran
# flags for debugging or for maximum performance, comment as necessary
#FCFLAGS = -g -fbounds-check
#FCFLAGS = -O2
# flags forall (e.g. look for system .mod files, required in gfortran)
FCFLAGS += -I/usr/include
# libraries needed for linking
LDFLAGS = -L/usr/local/epd/lib -I/usr/local/epd/include -llapack -lblas
# List of executables to be built within the package
PROGRAMS = HH_run
# "make" builds all
all: $(PROGRAMS)
# ======================================================================
# Rules for programs, modify as needed
# ======================================================================
HH_run.o: ParameterModule.o MT19937.o HH_master.o
HH_run: ParameterModule.o MT19937.o HH_master.o
# ======================================================================
# General rules, should not require modification
# ======================================================================
# General rule for building prog from prog.o; $^ (GNU extension) is
# used in order to list additional object files on which the
# executable depends
%: %.o
$(FC) $(FCFLAGS) -o $@ $^ $(LDFLAGS)
# General rules for building prog.o from prog.f90 or prog.F90; $< is
# used in order to list only the first prerequisite (the source file)
# and not the additional prerequisites such as module or include files
%.o: %.f95
$(FC) $(FCFLAGS) -c $<
%.o: %.f90
$(FC) $(FCFLAGS) -c $<
%.o: %.F90
$(FC) $(FCFLAGS) -c $<
# Utility targets
.PHONY: clean veryclean
clean:
rm -f *.o *.mod *.MOD
veryclean: clean
rm -f *~ $(PROGRAMS)