1 | #- |
---|
2 | #- $Id: AA_make 105 2007-07-26 09:46:30Z mafoipsl $ |
---|
3 | #- |
---|
4 | MAKE_NAM = $(MAKE) |
---|
5 | ifneq ($(MAKE_NAM),$(M_K)) |
---|
6 | @$(error You must invoke this Makefile with the $(M_K) command) |
---|
7 | endif |
---|
8 | USER_DIR = $(shell /bin/pwd) |
---|
9 | MAKE_DIR = '??' |
---|
10 | ifneq ($(USER_DIR),$(MAKE_DIR)) |
---|
11 | @$(error You must invoke this Makefile from its directory) |
---|
12 | endif |
---|
13 | #- |
---|
14 | #-Q- sxdkrz F_O = $(F_D) $(F_P) -C vsafe -size_t64 -I $(MODDIR) |
---|
15 | #-Q- eshpux F_O = $(F_D) $(F_P) -C vsafe -I $(MODDIR) |
---|
16 | #--------------------------------------------------------------------- |
---|
17 | #- Create "libioipsl" |
---|
18 | #--------------------------------------------------------------------- |
---|
19 | |
---|
20 | .PRECIOUS : $(MODEL_LIB) |
---|
21 | SXMODEL_LIB = $(MODEL_LIB) |
---|
22 | ifeq ($(L_X),1) |
---|
23 | SXMODEL_LIB = $(LIBDIR)/libsxioipsl.a |
---|
24 | .PRECIOUS : $(SXMODEL_LIB) |
---|
25 | endif |
---|
26 | |
---|
27 | MODS1 = defprec.f90 \ |
---|
28 | errioipsl.f90 \ |
---|
29 | stringop.f90 \ |
---|
30 | mathelp.f90 \ |
---|
31 | getincom.f90 \ |
---|
32 | calendar.f90 \ |
---|
33 | fliocom.f90 \ |
---|
34 | flincom.f90 \ |
---|
35 | histcom.f90 \ |
---|
36 | restcom.f90 \ |
---|
37 | ioipsl.f90 |
---|
38 | OBJSMODS1 = $(MODS1:.f90=.o) |
---|
39 | |
---|
40 | all: $(MODEL_LIB)($(OBJSMODS1)) |
---|
41 | @echo IOIPSL is OK |
---|
42 | |
---|
43 | $(MODEL_LIB)(%.o): %.f90 |
---|
44 | $(F_C) $(F_O) -I$(NCDF_INC) $*.f90 |
---|
45 | $(A_C) $(MODEL_LIB) $*.o |
---|
46 | ifeq ($(L_X),1) |
---|
47 | $(A_X) $(SXMODEL_LIB) $*.o |
---|
48 | endif |
---|
49 | #-Q- sgi6 mv $(shell echo $* | tr '[:lower:]' '[:upper:]').mod $(MODDIR) |
---|
50 | ifeq ($(M_M),1) |
---|
51 | mv $*.mod $(MODDIR) |
---|
52 | endif |
---|
53 | $(RM) $*.o |
---|
54 | |
---|
55 | clean: |
---|
56 | $(RM) $(MODEL_LIB) |
---|
57 | ifeq ($(L_X),1) |
---|
58 | $(RM) $(SXMODEL_LIB) |
---|
59 | endif |
---|
60 | $(RM) *.*~ Makefile~ core *.o *.mod i.*.L *.L i.*.f90 |
---|
61 | $(RM) $(MODDIR)/*.mod $(MODDIR)/*.M *.M |
---|
62 | |
---|
63 | #- Specific dependencies |
---|
64 | |
---|
65 | $(MODEL_LIB)(errioipsl.o): \ |
---|
66 | $(MODEL_LIB)(defprec.o) |
---|
67 | |
---|
68 | $(MODEL_LIB)(stringop.o): \ |
---|
69 | $(MODEL_LIB)(defprec.o) |
---|
70 | |
---|
71 | $(MODEL_LIB)(mathelp.o): \ |
---|
72 | $(MODEL_LIB)(errioipsl.o) \ |
---|
73 | $(MODEL_LIB)(stringop.o) |
---|
74 | |
---|
75 | $(MODEL_LIB)(getincom.o): \ |
---|
76 | $(MODEL_LIB)(stringop.o) |
---|
77 | |
---|
78 | $(MODEL_LIB)(calendar.o): \ |
---|
79 | $(MODEL_LIB)(errioipsl.o) \ |
---|
80 | $(MODEL_LIB)(stringop.o) |
---|
81 | |
---|
82 | $(MODEL_LIB)(fliocom.o): \ |
---|
83 | $(MODEL_LIB)(defprec.o) \ |
---|
84 | $(MODEL_LIB)(errioipsl.o) \ |
---|
85 | $(MODEL_LIB)(stringop.o) \ |
---|
86 | $(MODEL_LIB)(calendar.o) |
---|
87 | |
---|
88 | $(MODEL_LIB)(flincom.o): \ |
---|
89 | $(MODEL_LIB)(errioipsl.o) \ |
---|
90 | $(MODEL_LIB)(stringop.o) \ |
---|
91 | $(MODEL_LIB)(calendar.o) |
---|
92 | |
---|
93 | $(MODEL_LIB)(histcom.o): \ |
---|
94 | $(MODEL_LIB)(errioipsl.o) \ |
---|
95 | $(MODEL_LIB)(stringop.o) \ |
---|
96 | $(MODEL_LIB)(mathelp.o) \ |
---|
97 | $(MODEL_LIB)(calendar.o) \ |
---|
98 | $(MODEL_LIB)(fliocom.o) |
---|
99 | |
---|
100 | $(MODEL_LIB)(restcom.o): \ |
---|
101 | $(MODEL_LIB)(errioipsl.o) \ |
---|
102 | $(MODEL_LIB)(stringop.o) \ |
---|
103 | $(MODEL_LIB)(mathelp.o) \ |
---|
104 | $(MODEL_LIB)(calendar.o) \ |
---|
105 | $(MODEL_LIB)(fliocom.o) |
---|
106 | |
---|
107 | $(MODEL_LIB)(ioipsl.o): \ |
---|
108 | $(MODEL_LIB)(getincom.o) \ |
---|
109 | $(MODEL_LIB)(fliocom.o) \ |
---|
110 | $(MODEL_LIB)(flincom.o) \ |
---|
111 | $(MODEL_LIB)(histcom.o) \ |
---|
112 | $(MODEL_LIB)(restcom.o) |
---|
113 | |
---|