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 |
---|
6 | |
---|
7 | .SUFFIXES: .F90 .o .f |
---|
8 | |
---|
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" |
---|
13 | |
---|
14 | RM = /bin/rm -f |
---|
15 | AR = ar |
---|
16 | #RANLIB = ranlib |
---|
17 | RANLIB = echo |
---|
18 | |
---|
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 |
---|
24 | |
---|
25 | default: libesmf_time.a |
---|
26 | |
---|
27 | tests: Test1_ESMF.exe Test1_WRFU.exe |
---|
28 | |
---|
29 | libesmf_time.a : $(OBJS) |
---|
30 | $(RM) libesmf_time.a |
---|
31 | $(AR) ru libesmf_time.a $(OBJS) |
---|
32 | $(RANLIB) libesmf_time.a |
---|
33 | |
---|
34 | Test1_ESMF.f : Test1.F90 |
---|
35 | $(RM) Test1_ESMF.b Test1_ESMF.f |
---|
36 | cp Test1.F90 Test1_ESMF.b |
---|
37 | $(CPP) -P -I. Test1_ESMF.b > Test1_ESMF.f |
---|
38 | |
---|
39 | Test1_ESMF.exe : libesmf_time.a Test1_ESMF.o |
---|
40 | $(FC) -o Test1_ESMF.exe Test1_ESMF.o libesmf_time.a |
---|
41 | |
---|
42 | Test1_WRFU.f : Test1.F90 |
---|
43 | $(RM) Test1_WRFU.b Test1_WRFU.f |
---|
44 | sed -e "s/ESMF_Mod/module_utility/g" -e "s/ESMF_/WRFU_/g" Test1.F90 > Test1_WRFU.b |
---|
45 | $(CPP) -P -I. Test1_WRFU.b > Test1_WRFU.f |
---|
46 | |
---|
47 | Test1_WRFU.exe : libesmf_time.a Test1_WRFU.o |
---|
48 | $(FC) -o Test1_WRFU.exe Test1_WRFU.o libesmf_time.a |
---|
49 | |
---|
50 | .F90.o : |
---|
51 | $(RM) $@ |
---|
52 | $(SED_FTN) $*.F90 > $*.b |
---|
53 | $(CPP) -P -I. $*.b > $*.f |
---|
54 | $(RM) $*.b |
---|
55 | $(FC) -c $*.f |
---|
56 | |
---|
57 | .F90.f : |
---|
58 | $(RM) $@ |
---|
59 | $(SED_FTN) $*.F90 > $*.b |
---|
60 | $(CPP) -P -I. $*.b > $*.f |
---|
61 | $(RM) $*.b |
---|
62 | |
---|
63 | .f.o : |
---|
64 | $(RM) $@ |
---|
65 | $(RM) $*.b |
---|
66 | $(FC) -c $*.f |
---|
67 | |
---|
68 | clean : testclean |
---|
69 | |
---|
70 | testclean: |
---|
71 | $(RM) *.b *.f *.o libesmf_time.a *.mod Test1*.exe |
---|
72 | |
---|
73 | superclean: testclean |
---|
74 | $(RM) Test1*.out make_tests.out |
---|
75 | |
---|
76 | # DEPENDENCIES : only dependencies after this line |
---|
77 | |
---|
78 | #$$$ update dependencies! |
---|
79 | |
---|
80 | ESMF_Alarm.o : ESMF_BaseTime.o ESMF_Time.o ESMF_TimeInterval.o |
---|
81 | ESMF_BaseTime.o : ESMF_Base.o |
---|
82 | ESMF_Clock.o : ESMF_BaseTime.o ESMF_Time.o ESMF_TimeInterval.o |
---|
83 | ESMF_AlarmClock.o : ESMF_Alarm.o ESMF_Clock.o |
---|
84 | ESMF_Time.o : ESMF_BaseTime.o ESMF_TimeInterval.o ESMF_Calendar.o \ |
---|
85 | ESMF_Stubs.o |
---|
86 | ESMF_Base.o : |
---|
87 | ESMF_Calendar.o : ESMF_BaseTime.o |
---|
88 | ESMF_Fraction.o : ESMF_BaseTime.o |
---|
89 | ESMF_TimeInterval.o : ESMF_BaseTime.o ESMF_Calendar.o ESMF_Fraction.o |
---|
90 | ESMF_Mod.o : ESMF_Alarm.o ESMF_BaseTime.o ESMF_Clock.o ESMF_Time.o \ |
---|
91 | ESMF_Base.o ESMF_Calendar.o ESMF_Fraction.o \ |
---|
92 | ESMF_TimeInterval.o Meat.o ESMF_Stubs.o ESMF_AlarmClock.o |
---|
93 | Meat.o : ESMF_Alarm.o ESMF_BaseTime.o ESMF_Clock.o ESMF_Time.o \ |
---|
94 | ESMF_Base.o ESMF_Calendar.o ESMF_Fraction.o \ |
---|
95 | ESMF_TimeInterval.o |
---|
96 | ESMF_Stubs.o : ESMF_Base.o ESMF_Calendar.o |
---|
97 | module_utility.o : ESMF_Mod.o module_symbols_util.o |
---|
98 | module_symbols_util.o : ESMF_Mod.o |
---|
99 | Test1.o : module_utility.o |
---|
100 | |
---|