#
#    Makefile    for minimization test routines
#
# define logicals:
#    FCFLAGS = flags for compilation
#    LNKFLAG = flag for link/load
#    BINDIR  = binary output directory 
#    UTILDIR = utility directory
#    NRDIR   = numerical recipes directory
#
FFLAGS  = -O3 -Nl50 -pipe -xl
LNKFLAG = -L/mb1.real/lib
BINDIR  = /mb1.real/bin
NRDIR   = /mb1.real/nr
UTILDIR = /home/mb1/util
#
# minen
#
minen:  minen.o  \
	optim.o  sampl.o  plot.o   \
	grids.o  monte.o  powll.o  smplx.o  \
	siman.o  simmu.o  simpo.o  simpu.o  \
	getop.o  iniop.o  putop.o  \
	econf.o  \
        brent.o  linmin.o mnbrak.o \
	strlen.o strupc.o
	f77 $(LNKFLAG)    minen.o  \
		          optim.o  sampl.o  plot.o   \
			  grids.o  monte.o  powll.o  smplx.o  \
			  siman.o  simmu.o  simpo.o  simpu.o  \
			  getop.o  iniop.o  putop.o  \
			  econf.o  \
			  brent.o  linmin.o mnbrak.o \
			  strlen.o strupc.o \
			  -lmongo -o minen
#
# My string-handling routines
#
strlen.o:   $(UTILDIR)/strlen.f
	f77 $(FFLAGS) -sun4 -c $(UTILDIR)/strlen.f
strupc.o:   $(UTILDIR)/strupc.f
	f77 $(FFLAGS) -sun4 -c $(UTILDIR)/strupc.f
#
# clean
#
clean: 
	rm *.o
