--- MITgcm/optim/Makefile 2003/05/28 21:53:58 1.1.2.2 +++ MITgcm/optim/Makefile 2006/07/20 00:27:47 1.5 @@ -16,35 +16,19 @@ optim_readdata.F \ optim_writedata.F \ optim_write_control.F \ + xerbla.F \ simul.F -OBJ = optim_main.o \ - optim_sub.o \ - optim_numbmod.o \ - optim_initmod.o \ - optim_readdata.o \ - optim_writedata.o \ - optim_write_control.o \ - simul.o - EXEDIR = ./ # Location of cpp preprocessor # default is (Linux) -CPP = cat $< | /lib/cpp +CPP = cat $< | /lib/cpp -P -traditional # on SUNOS # CPP = cat $< | /usr/ccs/lib/cpp INCLUDEDIRS = -I. \ - -I../bin/ \ - -# the following ones should not be used as they -# may not contain the specific configuration headers. -# -I../eesupp/inc/ \ -# -I../model/inc/ \ -# -I../diags/inc/ \ -# -I../pkg/ecco/ \ -# -I../pkg/ctrl/ + -I../verification/natl_box_adjoint/build/ LIBDIRS = -L. \ -L../lsopt/ @@ -57,15 +41,20 @@ EXECUTABLE = $(EXEDIR)optim.x # The cpp flags. -CPPFLAGS = -DREAL_BYTE=4 \ - -DMAX_INDEPEND=1000000 \ - -D_RL='double precision' \ - -D$(OPTMODE) +CPPFLAGS = -DREAL_BYTE=4 \ + -DMAX_INDEPEND=1000000 \ + -D_RL='double precision' \ + -D$(OPTMODE) +# -DMAX_INDEPEND=293570968 \ # FORTRAN compiler and its flags. # default is (Linux) FC = f77 -FFLAGS = + +# SGI o3k IRIX64 +#FC = f77 +#FFLAGS = -extend_source -bytereclen -mips4 -r8 -static + # AER cluster #FC = /opt/mpich/bin/mpif77 #FFLAGS = -byteswapio -r8 -Mnodclchk -Mextend @@ -73,17 +62,23 @@ # File removal. RM = rm -f +SMALLF = $(SRC:.F=.f) +OBJECTS = $(SRC:.F=.o) + .SUFFIXES: .o .f .F all: $(EXECUTABLE) -$(EXECUTABLE): $(OBJ) - $(FC) -o $@ $(FFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) +$(EXECUTABLE): $(OBJECTS) + $(FC) -o $@ $(FFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS) + depend: makedepend -o .f $(INCLUDEDIRS) $(SRC) # The normal chain of rules is ( .F - .f - .o ) .F.f: $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@ +xerbla.f: xerbla.F + $(CPP) $(INCLUDEDIRS) > $@ .f.o: $(FC) $(FFLAGS) -c $< @@ -96,17 +91,3 @@ # DO NOT DELETE -optim_main.f: blas1.h -optim_sub.f: ../bin/EEPARAMS.h ../bin/SIZE.h ../bin/ecco.h ../bin/ctrl.h -optim_sub.f: optim.h -optim_numbmod.f: ../bin/EEPARAMS.h ../bin/SIZE.h ../bin/ecco.h ../bin/ctrl.h -optim_numbmod.f: optim.h minimization.h -optim_initmod.f: ../bin/EEPARAMS.h ../bin/SIZE.h ../bin/ecco.h ../bin/ctrl.h -optim_initmod.f: optim.h -optim_readdata.f: ../bin/EEPARAMS.h ../bin/SIZE.h ../bin/ecco.h ../bin/ctrl.h -optim_readdata.f: optim.h minimization.h -optim_writedata.f: ../bin/EEPARAMS.h ../bin/SIZE.h ../bin/ecco.h -optim_writedata.f: ../bin/ctrl.h optim.h minimization.h -optim_write_control.f: ../bin/EEPARAMS.h ../bin/SIZE.h ../bin/ecco.h -optim_write_control.f: ../bin/ctrl.h optim.h -simul.f: ../bin/EEPARAMS.h ../bin/SIZE.h ../bin/ctrl.h