1 |
|
2 |
#*********************************************************************** |
3 |
# Makefile for the ECCO off-line large scale optimization. |
4 |
# |
5 |
# started: Patrick Heimbach heimbach@mit.edu 19-Jun-2000 |
6 |
# |
7 |
# changed: |
8 |
# |
9 |
#*********************************************************************** |
10 |
|
11 |
# The optimization routines. |
12 |
SRC = optim_main.F \ |
13 |
optim_sub.F \ |
14 |
optim_numbmod.F \ |
15 |
optim_initmod.F \ |
16 |
optim_readdata.F \ |
17 |
optim_writedata.F \ |
18 |
optim_write_control.F \ |
19 |
simul.F |
20 |
|
21 |
OBJ = optim_main.o \ |
22 |
optim_sub.o \ |
23 |
optim_numbmod.o \ |
24 |
optim_initmod.o \ |
25 |
optim_readdata.o \ |
26 |
optim_writedata.o \ |
27 |
optim_write_control.o \ |
28 |
simul.o |
29 |
|
30 |
EXEDIR = ../exe/ |
31 |
|
32 |
# Location of library for optimization. |
33 |
CPP = cat $< | /usr/ccs/lib/cpp |
34 |
INCLUDEDIRS = -I. \ |
35 |
-I../eesupp/inc/ \ |
36 |
-I../model/inc/ \ |
37 |
-I../diags/inc/ \ |
38 |
-I../pkg/ecco/ \ |
39 |
-I../pkg/ctrl/ |
40 |
|
41 |
LIBDIRS = -L. \ |
42 |
-L../lsopt/ \ |
43 |
-L/opt/SUNWspro/SC4.2/lib/v7 |
44 |
|
45 |
LIBS = -llsopt_ecco \ |
46 |
-lblas1 |
47 |
|
48 |
# OPTMODE is either equal to OFFLINE or ONLINE |
49 |
OPTMODE = OFFLINE |
50 |
EXECUTABLE = $(EXEDIR)optim |
51 |
|
52 |
# The cpp flags. |
53 |
CPPFLAGS = -DREAL_BYTE=8 \ |
54 |
-DMAX_INDEPEND=29804 \ |
55 |
-D_RL='double precision' \ |
56 |
-D$(OPTMODE) |
57 |
|
58 |
# FORTRAN compiler and its flags. |
59 |
FC = f77 |
60 |
FFLAGS = |
61 |
|
62 |
# File removal. |
63 |
RM = rm -f |
64 |
|
65 |
.SUFFIXES: .o .f .F |
66 |
|
67 |
all: $(EXECUTABLE) |
68 |
$(EXECUTABLE): $(OBJ) |
69 |
$(FC) -o $@ $(FFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) |
70 |
depend: |
71 |
makedepend -o .f $(INCLUDEDIRS) $(SRC) |
72 |
|
73 |
# The normal chain of rules is ( .F - .f - .o ) |
74 |
.F.f: |
75 |
$(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@ |
76 |
.f.o: |
77 |
$(FC) $(FFLAGS) -c $< |
78 |
|
79 |
# Cleaning options. |
80 |
clean: |
81 |
$(RM) optim.x $(OBJ) |
82 |
|
83 |
scratch: |
84 |
$(RM) OPWARMD OPWARMI optim.x $(OBJ) |
85 |
|
86 |
# DO NOT DELETE |