Merge remote-tracking branch 'origin/release-v4.5'
[WRF.git] / hydro / Routing / Subsurface / Makefile
blob8cc63623dd4c1b196201f79bd7042ac99593fac6
1 #simple compilation test for modules in overland routing
3 include ../../macros
5 # Settings for testing with ifort
6 FC=ifort
7 FFLAGS=-c -free -O3
9 # Setting for testing with gfortran
10 #FC=gfortran
11 #FFLAGS=-c --free-form -std=f2003 -O3
13 FLFLAGS=
15 MODFLAG := $(MODFLAG) -I ../../mod
17 .PHONY: all mod test
19 all: mod
21 mod:
22 #Build each sub module then build the module that depends on all sub modules
23 $(COMPILER90) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) module_subsurface_grid_transform.F
24 $(COMPILER90) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) module_subsurface_properties.F
25 $(COMPILER90) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) module_subsurface_state.F
26 $(COMPILER90) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) module_subsurface.F
27 $(COMPILER90) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) module_subsurface_static_data.F
28 $(COMPILER90) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) module_subsurface_output.F
29 $(COMPILER90) $(F90FLAGS) $(LDFLAGS) $(MODFLAG) -I$(NETCDFINC) module_subsurface_input.F
30 ar -r ../../lib/libHYDRO.a module_subsurface_grid_transform.o
31 ar -r ../../lib/libHYDRO.a module_subsurface_properties.o
32 ar -r ../../lib/libHYDRO.a module_subsurface_state.o
33 ar -r ../../lib/libHYDRO.a module_subsurface.o
34 ar -r ../../lib/libHYDRO.a module_subsurface_static_data.o
35 ar -r ../../lib/libHYDRO.a module_subsurface_output.o
36 ar -r ../../lib/libHYDRO.a module_subsurface_input.o
38 cp *.mod ../../mod
39 test:
40 $(COMPILER90) $(F90FLAGS) $(MODFLAG) subsurface_tests.F
41 $(COMPILER90) -o subsurface_tests \
42 module_subsurface_grid_transform.o \
43 module_subsurface_properties.o \
44 module_subsurface_state.o \
45 module_subsurface.o \
46 ../Overland/module_overland.o \
47 ../Overland/module_overland_control.o \
48 ../Overland/module_overland_routing_properties.o \
49 ../Overland/module_overland_mass_balance.o \
50 ../Overland/module_overland_streams_and_lakes.o \
51 ../Overland/module_subsurface_static_data.o \
52 ../Overland/module_subsurface_output.o \
53 ../Overland/module_subsurface_input.o \
54 subsurface_tests.o
55 clean:
56 rm -f *.o
57 rm -f *.mod
58 rm -f subsurface_tests