Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / hydro / arc / Makefile.Noah
blob7909f453db44a90d99e174ab9fe310952cb5fe27
1 # Makefile 
2 CMD = Run/wrf_hydro.exe
4 all: $(CMD)
6 $(CMD):
7         @if [ ! -d "Run" ]; then \
8                 (mkdir Run);\
9         fi
10         (rm -f Run/wrf_hydro.exe   )
11         (make -f Makefile.comm BASIC)
12         @if [ -d "LandModel_cpl" ]; then \
13         (cd LandModel_cpl; make) \
14         fi
15         if [ $(WRF_HYDRO_RAPID) -eq 1 ]; then \
16                 (cd lib;rm -f librapid.a); \
17         fi
18         if [ $(WRF_HYDRO_RAPID) -eq 1 ]; then \
19                 (cd Rapid_routing; make -f makefile.cpl rapid); \
20         fi
22         @if [ -d "LandModel" ]; then \
23         (cd LandModel; make ) \
24         fi
26 debug:: 
27         @echo 'F90FLAGS := $$(DEBUGFLAGS) $$(F90FLAGS)' >> ./macros 
28         @echo 'F90FLAGS := $$(DEBUGFLAGS) $$(F90FLAGS)' >> ./LandModel/user_build_options
29 debug:: $(CMD)
31 install:
32         -rm -f ./Run/wrf_hydro.exe; \
33         mv ./Run/Noah_hrldas_beta ./Run/wrf_hydro.exe
34 test:
35         @echo "No libraries or utilities are built, skip testing." 
36 clean:
37         @if [ -d "LandModel_cpl" ]; then \
38         (cd LandModel_cpl; make clean) \
39         fi
40         (make -f Makefile.comm clean)
41         @if [ -d "LandModel" ]; then \
42         (cd LandModel; make clean) \
43         fi
44         if [ $(WRF_HYDRO_RAPID) -eq 1 ]; then \
45                 (cd Rapid_routing; make -f makefile.cpl clean); \
46         fi
47         (rm -f */*.mod */*.o lib/*.a Run/wrf_hydro.exe)