standard WRF version 3.0.1.1
[wrffire.git] / wrfv2_fire / external / esmf_time_f90 / Makefile
blobb8d96bdb609689802b8d68b2ed9da460a17e55a4
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
19 OBJS = ESMF_Alarm.o ESMF_BaseTime.o ESMF_Clock.o ESMF_Time.o \
20 Meat.o ESMF_Base.o ESMF_Calendar.o ESMF_Fraction.o \
21 ESMF_TimeInterval.o ESMF_Stubs.o ESMF_Mod.o \
22 module_symbols_util.o \
23 module_utility.o ESMF_AlarmClock.o
25 default: libesmf_time.a
27 tests: Test1_ESMF.exe Test1_WRFU.exe
29 libesmf_time.a : $(OBJS)
30 $(RM) libesmf_time.a
31 if [ "$(AR)" != "lib.exe" ] ; then \
32 $(AR) ru libesmf_time.a $(OBJS) ; \
33 else \
34 $(AR) /out:libesmf_time.a $(OBJS) ; \
36 $(RANLIB) libesmf_time.a
38 Test1_ESMF.f : Test1.F90
39 $(RM) Test1_ESMF.b Test1_ESMF.f
40 cp Test1.F90 Test1_ESMF.b
41 $(CPP) -C -P -I. Test1_ESMF.b > Test1_ESMF.f
43 Test1_ESMF.exe : libesmf_time.a Test1_ESMF.o
44 $(FC) -o Test1_ESMF.exe Test1_ESMF.o libesmf_time.a
46 Test1_WRFU.f : Test1.F90
47 $(RM) Test1_WRFU.b Test1_WRFU.f
48 sed -e "s/ESMF_Mod/module_utility/g" -e "s/ESMF_/WRFU_/g" Test1.F90 > Test1_WRFU.b
49 $(CPP) -C -P -I. Test1_WRFU.b > Test1_WRFU.f
51 Test1_WRFU.exe : libesmf_time.a Test1_WRFU.o
52 $(FC) -o Test1_WRFU.exe Test1_WRFU.o libesmf_time.a
54 .F90.o :
55 $(RM) $@
56 $(SED_FTN) $*.F90 > $*.b
57 $(CPP) -C -P -I. $*.b > $*.f
58 $(RM) $*.b
59 $(FC) -o $@ -c $*.f
61 .F90.f :
62 $(RM) $@
63 $(SED_FTN) $*.F90 > $*.b
64 $(CPP) -C -P -I. $*.b > $*.f
65 $(RM) $*.b
67 .f.o :
68 $(RM) $@
69 $(RM) $*.b
70 $(FC) -c $*.f
72 clean : testclean
74 testclean:
75 $(RM) *.b *.f *.o *.obj *.i libesmf_time.a *.mod Test1*.exe
77 superclean: testclean
78 $(RM) Test1*.out make_tests.out
80 # DEPENDENCIES : only dependencies after this line
82 #$$$ update dependencies!
84 ESMF_Alarm.o : ESMF_BaseTime.o ESMF_Time.o ESMF_TimeInterval.o
85 ESMF_BaseTime.o : ESMF_Base.o
86 ESMF_Clock.o : ESMF_BaseTime.o ESMF_Time.o ESMF_TimeInterval.o
87 ESMF_AlarmClock.o : ESMF_Alarm.o ESMF_Clock.o
88 ESMF_Time.o : ESMF_BaseTime.o ESMF_TimeInterval.o ESMF_Calendar.o \
89 ESMF_Stubs.o
90 ESMF_Base.o :
91 ESMF_Calendar.o : ESMF_BaseTime.o
92 ESMF_Fraction.o : ESMF_BaseTime.o
93 ESMF_TimeInterval.o : ESMF_BaseTime.o ESMF_Calendar.o ESMF_Fraction.o
94 ESMF_Mod.o : ESMF_Alarm.o ESMF_BaseTime.o ESMF_Clock.o ESMF_Time.o \
95 ESMF_Base.o ESMF_Calendar.o ESMF_Fraction.o \
96 ESMF_TimeInterval.o Meat.o ESMF_Stubs.o ESMF_AlarmClock.o
97 Meat.o : ESMF_Alarm.o ESMF_BaseTime.o ESMF_Clock.o ESMF_Time.o \
98 ESMF_Base.o ESMF_Calendar.o ESMF_Fraction.o \
99 ESMF_TimeInterval.o
100 ESMF_Stubs.o : ESMF_Base.o ESMF_Calendar.o
101 module_utility.o : ESMF_Mod.o module_symbols_util.o
102 module_symbols_util.o : ESMF_Mod.o
103 Test1.o : module_utility.o