1 | #- |
---|
2 | #- $Id$ |
---|
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 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 | MODS1 = defprec.f90 \ |
---|
21 | errioipsl.f90 \ |
---|
22 | stringop.f90 \ |
---|
23 | mathelp.f90 \ |
---|
24 | getincom.f90 \ |
---|
25 | calendar.f90 \ |
---|
26 | fliocom.f90 \ |
---|
27 | flincom.f90 \ |
---|
28 | histcom.f90 \ |
---|
29 | restcom.f90 \ |
---|
30 | ioipsl.f90 |
---|
31 | OBJSMODS1 = $(MODS1:.f90=.o) |
---|
32 | |
---|
33 | all: $(MODEL_LIB)($(OBJSMODS1)) |
---|
34 | @echo IOIPSL is OK |
---|
35 | |
---|
36 | .PRECIOUS : $(MODEL_LIB) |
---|
37 | #-Q- sxdkrz .PRECIOUS : $(SXMODEL_LIB) |
---|
38 | #-Q- eshpux .PRECIOUS : $(SXMODEL_LIB) |
---|
39 | |
---|
40 | $(MODEL_LIB)(%.o): %.f90 |
---|
41 | $(F_C) $(F_O) -I$(NCDF_INC) $*.f90 |
---|
42 | $(A_C) $(MODEL_LIB) $*.o |
---|
43 | #-Q- sgi6 mv $(shell echo $* | tr '[:lower:]' '[:upper:]').mod $(MODDIR) |
---|
44 | #-Q- sx8brodie mv $*.mod $(MODDIR) |
---|
45 | #-Q- sx8mercure mv $*.mod $(MODDIR) |
---|
46 | #-Q- sxdkrz $(A_X) $(SXMODEL_LIB) $*.o |
---|
47 | #-Q- sxdkrz mv $*.mod $(MODDIR) |
---|
48 | #-Q- eshpux $(A_X) $(SXMODEL_LIB) $*.o |
---|
49 | #-Q- eshpux mv $*.mod $(MODDIR) |
---|
50 | #-Q- solaris mv $*.mod $(MODDIR) |
---|
51 | $(RM) $*.o |
---|
52 | |
---|
53 | clean: |
---|
54 | #-Q- sxdkrz $(RM) $(SXMODEL_LIB) |
---|
55 | #-Q- eshpux $(RM) $(SXMODEL_LIB) |
---|
56 | $(RM) $(MODEL_LIB) |
---|
57 | $(RM) *.*~ Makefile~ core *.o *.mod i.*.L *.L i.*.f90 |
---|
58 | $(RM) $(MODDIR)/*.mod $(MODDIR)/*.M *.M |
---|
59 | |
---|
60 | #- Specific dependencies |
---|
61 | |
---|
62 | $(MODEL_LIB)(errioipsl.o): \ |
---|
63 | $(MODEL_LIB)(defprec.o) |
---|
64 | |
---|
65 | $(MODEL_LIB)(stringop.o): \ |
---|
66 | $(MODEL_LIB)(defprec.o) |
---|
67 | |
---|
68 | $(MODEL_LIB)(mathelp.o): \ |
---|
69 | $(MODEL_LIB)(errioipsl.o) \ |
---|
70 | $(MODEL_LIB)(stringop.o) |
---|
71 | |
---|
72 | $(MODEL_LIB)(getincom.o): \ |
---|
73 | $(MODEL_LIB)(stringop.o) |
---|
74 | |
---|
75 | $(MODEL_LIB)(calendar.o): \ |
---|
76 | $(MODEL_LIB)(errioipsl.o) \ |
---|
77 | $(MODEL_LIB)(stringop.o) |
---|
78 | |
---|
79 | $(MODEL_LIB)(fliocom.o): \ |
---|
80 | $(MODEL_LIB)(defprec.o) \ |
---|
81 | $(MODEL_LIB)(errioipsl.o) \ |
---|
82 | $(MODEL_LIB)(stringop.o) \ |
---|
83 | $(MODEL_LIB)(calendar.o) |
---|
84 | |
---|
85 | $(MODEL_LIB)(flincom.o): \ |
---|
86 | $(MODEL_LIB)(errioipsl.o) \ |
---|
87 | $(MODEL_LIB)(stringop.o) \ |
---|
88 | $(MODEL_LIB)(calendar.o) |
---|
89 | |
---|
90 | $(MODEL_LIB)(histcom.o): \ |
---|
91 | $(MODEL_LIB)(errioipsl.o) \ |
---|
92 | $(MODEL_LIB)(stringop.o) \ |
---|
93 | $(MODEL_LIB)(mathelp.o) \ |
---|
94 | $(MODEL_LIB)(calendar.o) \ |
---|
95 | $(MODEL_LIB)(fliocom.o) |
---|
96 | |
---|
97 | $(MODEL_LIB)(restcom.o): \ |
---|
98 | $(MODEL_LIB)(errioipsl.o) \ |
---|
99 | $(MODEL_LIB)(stringop.o) \ |
---|
100 | $(MODEL_LIB)(mathelp.o) \ |
---|
101 | $(MODEL_LIB)(calendar.o) \ |
---|
102 | $(MODEL_LIB)(fliocom.o) |
---|
103 | |
---|
104 | $(MODEL_LIB)(ioipsl.o): \ |
---|
105 | $(MODEL_LIB)(getincom.o) \ |
---|
106 | $(MODEL_LIB)(fliocom.o) \ |
---|
107 | $(MODEL_LIB)(flincom.o) \ |
---|
108 | $(MODEL_LIB)(histcom.o) \ |
---|
109 | $(MODEL_LIB)(restcom.o) |
---|
110 | |
---|