updated top-level README and version_decl for V4.4.2 (#1795)
[WRF.git] / external / esmf_time_f90 / Makefile
blob54de7ed00318b2463744ca903579668379e15cdd
1 # To build this by itself, use the make target esmf_time_f90_only
2 # from the top-level WRF Makefile.
3 # > cd ../..
4 # configure
5 # make esmf_time_f90_only
7 .SUFFIXES: .F90 .o .f
9 # get rid of single quotes after comments
10 # WARNING: This will break if a quoted string is followed by a comment that has
11 # a single quote.
12 SED_FTN = sed -e "/\!.*'/s/'//g"
14 RM = /bin/rm -f
15 AR = ar
16 #RANLIB = ranlib
17 RANLIB = echo
18 FGREP = fgrep -iq
20 OBJS = ESMF_Alarm.o ESMF_BaseTime.o ESMF_Clock.o ESMF_Time.o \
21 Meat.o ESMF_Base.o ESMF_Calendar.o ESMF_Fraction.o \
22 ESMF_TimeInterval.o ESMF_Stubs.o ESMF_Mod.o \
23 module_symbols_util.o \
24 module_utility.o ESMF_AlarmClock.o
26 default: libesmf_time.a
28 tests: Test1_ESMF.exe Test1_WRFU.exe
30 libesmf_time.a : $(OBJS)
31 $(RM) libesmf_time.a
32 if [ "$(AR)" != "lib.exe" ] ; then \
33 $(AR) ru libesmf_time.a $(OBJS) ; \
34 else \
35 $(AR) /out:libesmf_time.a $(OBJS) ; \
37 $(RANLIB) libesmf_time.a
39 Test1_ESMF.f : Test1.F90
40 $(RM) Test1_ESMF.b Test1_ESMF.f
41 cp Test1.F90 Test1_ESMF.b
42 $(CPP) -I. Test1_ESMF.b > Test1_ESMF.f
44 Test1_ESMF.exe : libesmf_time.a Test1_ESMF.o
45 $(FC) -o Test1_ESMF.exe Test1_ESMF.o libesmf_time.a
47 Test1_WRFU.f : Test1.F90
48 $(RM) Test1_WRFU.b Test1_WRFU.f
49 sed -e "s/ESMF_Mod/module_utility/g" -e "s/ESMF_/WRFU_/g" Test1.F90 > Test1_WRFU.b
50 $(CPP) -I. Test1_WRFU.b > Test1_WRFU.f
52 Test1_WRFU.exe : libesmf_time.a Test1_WRFU.o
53 $(FC) -o Test1_WRFU.exe Test1_WRFU.o libesmf_time.a
55 .F90.o :
56 $(RM) $@
57 $(SED_FTN) $*.F90 > $*.b
58 $(CPP) -I. $*.b > $*.f
59 $(RM) $*.b
60 @ if echo $(CPP) | $(FGREP) 'DVAR4D'; then \
61 echo COMPILING $*.F90 for 4DVAR ; \
62 $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f > $*.f.tmp ; \
63 mv $*.f.tmp $*.f ; \
65 $(FC) -o $@ -c $*.f
67 .F90.f :
68 $(RM) $@
69 $(SED_FTN) $*.F90 > $*.b
70 $(CPP) -I. $*.b > $*.f
71 $(RM) $*.b
72 @ if echo $(CPP) | $(FGREP) 'DVAR4D'; then \
73 echo COMPILING $*.F90 for 4DVAR ; \
74 $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f > $*.f.tmp ; \
75 mv $*.f.tmp $*.f ; \
78 .f.o :
79 $(RM) $@
80 $(RM) $*.b
81 $(FC) -c $*.f
83 clean : testclean
85 testclean:
86 @$(RM) *.b *.f *.o *.obj *.i libesmf_time.a *.mod Test1*.exe
88 superclean: testclean
89 @$(RM) Test1*.out make_tests.out
91 # DEPENDENCIES : only dependencies after this line
93 #$$$ update dependencies!
95 ESMF_Alarm.o : ESMF_Base.o ESMF_Time.o ESMF_TimeInterval.o
96 ESMF_BaseTime.o : ESMF_Base.o
97 ESMF_Clock.o : ESMF_Base.o ESMF_Time.o ESMF_TimeInterval.o ESMF_Alarm.o
98 ESMF_AlarmClock.o : ESMF_Alarm.o ESMF_Clock.o ESMF_Time.o ESMF_TimeInterval.o
99 ESMF_Time.o : ESMF_Base.o ESMF_BaseTime.o ESMF_TimeInterval.o ESMF_Calendar.o \
100 ESMF_Stubs.o
101 ESMF_Base.o :
102 ESMF_Calendar.o : ESMF_Base.o ESMF_BaseTime.o
103 ESMF_Fraction.o :
104 ESMF_TimeInterval.o : ESMF_Base.o ESMF_BaseTime.o ESMF_Calendar.o ESMF_Fraction.o
105 ESMF_Mod.o : ESMF_Alarm.o ESMF_BaseTime.o ESMF_Clock.o ESMF_Time.o \
106 ESMF_Base.o ESMF_Calendar.o ESMF_Fraction.o \
107 ESMF_TimeInterval.o ESMF_Stubs.o ESMF_AlarmClock.o
108 Meat.o : ESMF_Alarm.o ESMF_BaseTime.o ESMF_Clock.o ESMF_Time.o \
109 ESMF_Base.o ESMF_Calendar.o ESMF_Fraction.o \
110 ESMF_TimeInterval.o
111 ESMF_Stubs.o : ESMF_Base.o ESMF_Calendar.o
112 module_utility.o : module_symbols_util.o
113 module_symbols_util.o : ESMF_Mod.o
114 Test1.o : module_utility.o