-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakefile
60 lines (39 loc) · 1.33 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
# EXE OPTIONS:
#
# make
# make all (same as make)
# make clean
# make veryclean
# Edit to adjust for Fortran compiler and flags.
# Intel Fortran
FC = ifort
#FCFLAGS = -I${MKLROOT}/include -g -traceback -check all -debug all -qopenmp -O0
#FLFLAGS = -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -qopenmp -ldl -g -traceback -check all -debug all -O0
FCFLAGS = -I${MKLROOT}/include -qopenmp
FLFLAGS = -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -qopenmp -ldl
# GNU Fortran
#FC = gfortran
#FCFLAGS = -I${MKLROOT}/include -fopenmp -g -fbacktrace -ffpe-summary=none
#FLFLAGS = -L${MKLROOT}/lib/intel64 -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -fopenmp -ldl -g -fbacktrace -ffpe-summary=none
# ~~~ Do not edit after that line ~~~
# Check env variables
ifndef MKLROOT
$(error: MKLROOT enviriment variable is not set. Please check your MKL setup.)
endif
PROGRAM = mstar
# source files and objects
SRCS = $(patsubst %.f90, %.o, $(wildcard *.f90)) \
$(patsubst %.h, %.mod, $(wildcard *.h))
all: $(PROGRAM)
$(PROGRAM): $(SRCS)
$(FC) $(FLFLAGS) $(FLINK) -o $@ $^
%.o: %.f90
$(FC) $(FCFLAGS) $(FOPT) -c $<
#%.mod: %.h
# $(FC) $(FCFLAGS) -o $@ $<
# Utility targets
.PHONY: clean veryclean
clean:
rm -f *.o *.mod *.MOD
veryclean: clean
rm -f *~ $(PROGRAMS)