-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
53 lines (43 loc) · 1.45 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
################################################
# Change this part
NETCDF=/opt/netcdf4-serial
FC = ifort
################################################
################################################
# Do not edit part
# (unless you know what you are doing)
# Program Name
PROG = csi.exe
# Scr folder
VPATH = ./src/
# Compiler Flags
FFLAGS = -I$(NETCDF)/include
FLINK = -O3 -L$(NETCDF)/lib -lnetcdf -lnetcdff
# LINKER = $(FC) -traceback -o
LINKER = $(FC) -o
# Object files
OBJS = gaussian_filter.o module_globals.o module_io.o module_csi.o csi.o
LPT: $(PROG)
# Create the LPT
$(PROG): $(OBJS)
@echo "--------------------------------------"
@echo "Creating the executable for the CSI"
@echo "--------------------------------------"
$(LINKER) $(PROG) $(OBJS) $(FLINK)
mv *.o *.mod $(VPATH)
%.o: %.f90
@echo "--------------------------------------"
@echo "Compiling $<"
@echo "--------------------------------------"
$(FC) -c $(FFLAGS) $<
# Clean up everything
clean:
@echo "--------------------------------------"
@echo "Cleaning everything up in the CSI"
@echo "--------------------------------------"
rm -f $(VPATH)*.o $(VPATH)*.mod $(VPATH)*.exe $(PROG)
gaussian_filter.o : gaussian_filter.f90
module_globals.o : module_globals.f90
module_io.o : module_io.f90 module_globals.o
module_csi.o : module_globals.o gaussian_filter.o
csi.o : csi.f90 module_io.o module_csi.o