-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·102 lines (78 loc) · 2.15 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#MAKEFILE for modal optics code
#choose options based on compilers
ifeq ($(COMP) , lf95)
#For Lahey compiler
FC = lf95
LDFLAGS =
LDLIBS =
FCFLAGS =
ifeq ($(DEBUG) , y)
FCFLAGS = --chk a,e,s,u --trace --trap -g --O0
endif
NETCDF_INC = /share/apps/netcdf/4.1.3/lahey/8.1/include
NETCDF_LIB = /share/apps/netcdf/4.1.3/lahey/8.1/lib
endif
ifeq ($(COMP) , ifort)
#For Intel compiler
FC = ifort
LDFLAGS =
LDLIBS =
FCFLAGS = -fpp
ifeq ($(DEBUG) , y)
FCFLAGS = -ftz -convert big_endian -fp-model precise -check all -check noarg_temp_created -fpe0 -g -traceback
endif
#hbrown, changed NETCDF paths
NETCDF_INC = /gpfs/u/apps/opt/netcdf-mpi-tdsf/4.3.2/intel/12.1.5/include
NETCDF_LIB = /gpfs/u/apps/opt/netcdf-mpi-tdsf/4.3.2/intel/12.1.5/lib
endif
CPP = cpp
CPPFLAGS = $(mam_modes) -DMODAL_AERO
EXE = optics.exe
#
# Suffix rules...
#
.SUFFIXES : .F .f .F90 .f90 .o
.F90.o:
$(RM) $*.mod ; $(CPP) $(CPPFLAGS) $*.F90 $*.f90 ; $(FC) -c $(FCFLAGS) -I$(NETCDF_INC) -L$(NETCDF_LIB) -lnetcdf -lnetcdff $*.f90
.F.o:
$(RM) $*.mod ; $(FC) -c $(FCFLAGS) -I$(NETCDF_INC) -L$(NETCDF_LIB) -lnetcdf -lnetcdff $*.F
#
# Object lists...
#
OBJ = \
shr_kind_mod.o \
shr_const_mod.o \
physconst.o \
gen_modal_optics_file.o \
modal_aero_data.o \
radconstants.o \
module_optics_support.o \
miesubs.o
#-----------------------------------------------------------------------------
# WARNING: Don't touch anything below this line unless you exactly know it !!!
#-----------------------------------------------------------------------------
#
# Dependancies...
#
$(EXE): $(OBJ)
$(FC) -o $@ $(FCFLAGS) $(LDFLAGS) $(OBJ) $(LDLIBS) -I$(NETCDF_INC) -L$(NETCDF_LIB) -lnetcdf -lnetcdff
modal_aero_data.o: \
radconstants.o
gen_modal_optics_file.o: \
radconstants.o \
shr_kind_mod.o \
module_optics_support.o \
modal_aero_data.o \
miesubs.o \
physconst.o
radconstants.o: \
module_optics_support.o
shr_const_mod.o: \
shr_kind_mod.o
physconst.o: \
shr_kind_mod.o \
shr_const_mod.o
clean:
/bin/rm *.o *.mod *.exe *.f90 fort.*
cleanmod:
/bin/rm *.mod module*.o *.exe