source: CPL/oasis3/trunk/src/mod/oasis3/src/Makefile_1 @ 1677

Last change on this file since 1677 was 1677, checked in by aclsce, 12 years ago

Imported oasis3 (tag ipslcm5a) from cvs server to svn server (igcmg project).

File size: 2.4 KB
Line 
1SRCS1 = $(shell find ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC)) -name '*.F90' -print)
2OBJS1 = $(patsubst ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC))/%.F90,  %.o, $(SRCS1))
3
4SRCS2 =  $(shell find ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC)) -name '*.f90' -print)
5OBJS2 =  $(patsubst ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC))/%.f90, %.o, $(SRCS2))
6
7SRCS3 =  $(shell find ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC)) -name '*.F' -print)
8OBJS3 =  $(patsubst ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC))/%.F, %.o, $(SRCS3))
9
10SRCS4 =  $(shell find ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC)) -name '*.f' -print)
11OBJS4 =  $(patsubst ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC))/%.f, %.o, $(SRCS4))
12
13SRCS5 =  $(shell find ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC)) -name '*.c' -print)
14OBJS5 =  $(patsubst ../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC))/%.c, %.o, $(SRCS5))
15
16VPATH = .:../../../../src/mod/$(MODEL_DIR)/$(strip $(SRC)):\
17          ../../../../src/mod/$(MODEL_DIR)/include:\
18          ../../lib/clim.${CHAN}:\
19          ../../../lib/$(MODEL_DIR):\
20          ../../../lib:\
21          $(NETCDF_INCLUDE):$(MPI_INCLUDE):$(SYS_INCLUDE):\
22          ../../../../src/mod/$(MODEL_DIR)/make_dummies
23
24LIBRARY = ../../../lib/$(MODEL_DIR)/lib$(MODLIB).a
25
26PROG =  ../../../bin/$(EXEC).x
27
28INCLS   = -I../../../../src/mod/$(MODEL_DIR)/include \
29          -${I4mods}../../lib/clim.${CHAN}
30
31INCLSC  = -I../../../../src/mod/$(MODEL_DIR)/include
32
33clean:
34        rm -f $(LIBRARY)
35        rm -f i.* *.o *.mod
36        rm -f Top_Makefile_*
37
38all: $(PROG)
39
40lib: $(LIBRARY)
41
42$(PROG): $(DEPLIBS) $(LIBRARY)
43        $(F90) $(LDFLAGS) -o $@ $(MAINPRG).o $(LIBS) $(LIBS)
44
45$(LIBRARY): $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5)
46        $(AR) $(ARFLAGS) $(LIBRARY) *.o
47        $(AR) $(ARFLAGS) $(LIBRARY) \
48        ../../lib/clim.${CHAN}/mod_kinds_oasis.o   \
49        ../../lib/clim.${CHAN}/mod_parameter.o  \
50        ../../lib/clim.${CHAN}/mod_timestep.o  \
51        ../../lib/clim.${CHAN}/mod_string.o  \
52        ../../lib/clim.${CHAN}/mod_unitncdf.o  \
53        ../../lib/clim.${CHAN}/mod_kinds_oasis.o  \
54        ../../lib/clim.${CHAN}/mod_hardware.o  \
55        ../../lib/clim.${CHAN}/mod_calendar.o  \
56        ../../lib/clim.${CHAN}/mod_label.o
57
58.SUFFIXES:
59.SUFFIXES: .o .c .f .F .f90 .F90
60
61%.o: %.F90
62        $(F90) $(F90FLAGS) $(INCLS)  -c   $<
63
64%.o: %.f90
65        $(f90) $(f90FLAGS) $(INCLS)  -c   $<
66
67%.o: %.F
68        $(F) $(FFLAGS) $(INCLS)  -c   $<
69
70%.o: %.f
71        $(f) $(fFLAGS) $(INCLS)  -c   $<
72
73%.o: %.c
74        $(CC) $(CCFLAGS) $(INCLSC) -c   $<
75
76#
77# All dependencies ...
78#
79# Dont add anything behind this line
Note: See TracBrowser for help on using the repository browser.