# ----------------------------------------------------------------------------
#
# Copyright (C) Columbia University, 1994. All Rights Reserved.
# Sameer A. Nene, Shree K. Nayar, Hiroshi Murase
#
# See file LICENSE for details of software license agreement.
#
# ----------------------------------------------------------------------------
#
# Makefile
#
# Author:               Sameer Nene
# Date:                 09/21/94
# Version:              1.0.0
# Modification History:
#
# Notes:
#   
# ----------------------------------------------------------------------------

# Convinience Definitions

EIGEN_FILES = eigen.o errorscope.o stringary.o parser.o fileiter.o registry.o \
ioutil.o vector.o matrix.o naming.o reporter.o handle.o

PROJECT_FILES = project.o errorscope.o stringary.o parser.o fileiter.o \
registry.o ioutil.o vector.o dataset.o reporter.o handle.o naming.o

FITBSPL_FILES = fitbspl.o errorscope.o stringary.o parser.o registry.o \
ioutil.o vector.o dataset.o bspline.o bsplinecurve.o bsplinesurface.o \
bsplinevolume.o handle.o persinterp.o

SAMPLE_FILES = sample.o errorscope.o registry.o parser.o stringary.o ioutil.o \
vector.o dataset.o bspline.o bsplinecurve.o bsplinesurface.o bsplinevolume.o \
handle.o persinterp.o

GSO_FILES = gso.o errorscope.o registry.o stringary.o ioutil.o vector.o \
parser.o handle.o

MKEXHAUSTIVESRCH_FILES = fullsearch.o errorscope.o registry.o stringary.o \
ioutil.o vector.o mkexhaustivesrch.o parser.o dataset.o handle.o persinterp.o \
persscheme.o

MKHEURISTICSRCH_FILES = partialsearch.o errorscope.o registry.o stringary.o \
ioutil.o vector.o mkheuristicsrch.o parser.o dataset.o handle.o persinterp.o \
persscheme.o

MKBINARYSRCH_FILES = binarysearch.o errorscope.o registry.o stringary.o \
ioutil.o vector.o mkbinarysrch.o parser.o dataset.o handle.o persinterp.o \
reporter.o persscheme.o

XSLAM_FILES = xslam.o xslamcb.o

XIMGTOOL_FILES = ximgtool.o ximgtoolcb.o ximgtoolut.o errorscope.o fileiter.o \
stringary.o image.o imageutil.o vector.o registry.o ioutil.o list.o naming.o \
handle.o xreporter.o

XEIGEN_FILES = xeigen.o xeigenut.o xeigencb.o fileinfo.o fileiter.o naming.o \
stringary.o vector.o registry.o ioutil.o errorscope.o list.o handle.o \
xreporter.o matrix.o

XMKSRCHTBL_FILES = xmksrchtbl.o xmksrchtblut.o xmksrchtblcb.o fileinfo.o \
stringary.o vector.o registry.o ioutil.o errorscope.o list.o handle.o \
xreporter.o dataset.o parser.o persscheme.o fullsearch.o partialsearch.o \
binarysearch.o

XMANIFOLD_FILES = xmanifold.o xmanifoldut.o xmanifoldcb.o fileiter.o naming.o \
stringary.o vector.o dataset.o bspline.o bsplinecurve.o bsplinesurface.o \
bsplinevolume.o registry.o ioutil.o errorscope.o list.o persinterp.o handle.o \
postscript.o xreporter.o ninterpolation.o ndataset.o

LIBEIGEN_FILES = errorscope.o registry.o stringary.o naming.o parser.o \
fileiter.o reporter.o handle.o ioutil.o image.o imageutil.o vector.o matrix.o \
dataset.o persinterp.o bspline.o bsplinecurve.o bsplinesurface.o \
bsplinevolume.o persscheme.o fullsearch.o partialsearch.o binarysearch.o \
searchutil.o

# Source -> Object Rule

.SUFFIXES:
.SUFFIXES: .o .C .h

.C.o:
	$(CC) -c $(CFLAGS) $<

# Object -> Executable Dependencies

all: $(SLAM_BINARIES) $(SLAM_LIBS)

clean:
	rm -f *.o $(SLAM_BINARIES) $(SLAM_LIBS)

eigen: $(EIGEN_FILES)
	$(CC) $(LDFLAGS) -o $@ $(EIGEN_FILES) $(LIBPATH) $(DEFAULT_LIBS)

project: $(PROJECT_FILES)
	$(CC) $(LDFLAGS) -o $@ $(PROJECT_FILES) $(LIBPATH) $(DEFAULT_LIBS)

fitbspl: $(FITBSPL_FILES)
	$(CC) $(LDFLAGS) -o $@ $(FITBSPL_FILES) $(LIBPATH) $(DEFAULT_LIBS)

sample: $(SAMPLE_FILES)
	$(CC) $(LDFLAGS) -o $@ $(SAMPLE_FILES) $(LIBPATH) $(DEFAULT_LIBS)

gso: $(GSO_FILES)
	$(CC) $(LDFLAGS) -o $@ $(GSO_FILES) $(LIBPATH) $(DEFAULT_LIBS)

mkexhaustivesrch: $(MKEXHAUSTIVESRCH_FILES)
	$(CC) $(LDFLAGS) -o $@ $(MKEXHAUSTIVESRCH_FILES) $(LIBPATH) $(DEFAULT_LIBS)

mkheuristicsrch: $(MKHEURISTICSRCH_FILES)
	$(CC) $(LDFLAGS) -o $@ $(MKHEURISTICSRCH_FILES) $(LIBPATH) $(DEFAULT_LIBS)

mkbinarysrch: $(MKBINARYSRCH_FILES)
	$(CC) $(LDFLAGS) -o $@ $(MKBINARYSRCH_FILES) $(LIBPATH) $(DEFAULT_LIBS)

xslam: $(XSLAM_FILES)
	$(CC) $(LDFLAGS) -o $@ $(XSLAM_FILES) $(LIBPATH) $(MOTIF_LIBS) $(XT_LIBS) $(X_LIBS) $(DEFAULT_LIBS)

ximgtool: $(XIMGTOOL_FILES)
	$(CC) $(LDFLAGS) -o $@ $(XIMGTOOL_FILES) $(LIBPATH) $(MOTIF_LIBS) $(XT_LIBS) $(X_LIBS) $(DEFAULT_LIBS)

xeigen: $(XEIGEN_FILES)
	$(CC) $(LDFLAGS) -o $@ $(XEIGEN_FILES) $(LIBPATH) $(MOTIF_LIBS) $(XT_LIBS) $(X_LIBS) $(DEFAULT_LIBS)

xmksrchtbl: $(XMKSRCHTBL_FILES)
	$(CC) $(LDFLAGS) -o $@ $(XMKSRCHTBL_FILES) $(LIBPATH) $(MOTIF_LIBS) $(XT_LIBS) $(X_LIBS) $(DEFAULT_LIBS)

xmanifold: $(XMANIFOLD_FILES)
	$(CC) $(LDFLAGS) -o $@ $(XMANIFOLD_FILES) $(LIBPATH) $(MOTIF_LIBS) $(XT_LIBS) $(PEX_LIBS) $(XMU_LIBS) $(X_LIBS) $(DEFAULT_LIBS)

# Object -> Library Dependencies

libeigen.a: $(LIBEIGEN_FILES)
	ar ru $@ $(LIBEIGEN_FILES); ranlib $@

# Source -> Object Dependencies
eigen.o: errorscope.h vector.h matrix.h parser.h fileiter.h ioutil.h \
reporter.h stringary.h
project.o: errorscope.h vector.h dataset.h parser.h fileiter.h ioutil.h \
reporter.h stringary.h
fitbspl.o: errorscope.h parser.h dataset.h bsplinecurve.h bsplinesurface.h \
bsplinevolume.h ioutil.h stringary.h
sample.o: errorscope.h parser.h dataset.h ioutil.h handle.h interpolation.h \
persinterp.h stringary.h
gso.o: errorscope.h vector.h stringary.h parser.h ioutil.h
mkexhaustivesrch.o: errorscope.h parser.h vector.h dataset.h ioutil.h \
stringary.h fullsearch.h mkexhaustivesrch.C
mkheuristicsrch.o: errorscope.h parser.h vector.h dataset.h ioutil.h \
stringary.h partialsearch.h mkheuristicsrch.C
mkbinarysrch.o: errorscope.h parser.h vector.h dataset.h handle.h \
interpolation.h persinterp.h ioutil.h stringary.h binarysearch.h \
mkbinarysrch.C
errorscope.o: errorscope.h errorscope.C
registry.o: registry.h registry.C
stringary.o: stringary.h stringary.C
naming.o: stringary.h naming.h naming.C
parser.o: errorscope.h stringary.h parser.h parser.C
fileiter.o: errorscope.h stringary.h naming.h fileiter.h fileiter.C
reporter.o: reporter.h reporter.C
handle.o: persistent.h handle.h handle.C
ioutil.o: errorscope.h registry.h persistent.h handle.h ioutil.h handle.C
image.o: image.h image.C
imageutil.o: imageutil.h imageutil.C errorscope.h vector.h image.h
vector.o: errorscope.h persistent.h registry.h vector.h vector.C
matrix.o: errorscope.h persistent.h registry.h vector.h matrix.h matrix.C
dataset.o: errorscope.h persistent.h registry.h dataset.h dataset.C
persinterp.o: persinterp.h persinterp.C persistent.h interpolation.h
bspline.o: vector.h bspline.h bspline.C persinterp.h persistent.h \
interpolation.h
bsplinecurve.o: bsplinecurve.h bsplinecurve.C errorscope.h interpolation.h \
persistent.h registry.h vector.h
bsplinesurface.o: bsplinesurface.h bsplinesurface.C errorscope.h \
interpolation.h persistent.h registry.h vector.h
bsplinevolume.o: bsplinevolume.h bsplinevolume.C errorscope.h \
interpolation.h persistent.h registry.h vector.h
persscheme.o: persscheme.h persscheme.C persistent.h
fullsearch.o: fullsearch.h fullsearch.C errorscope.h registry.h persistent.h \
vector.h dataset.h persscheme.h
partialsearch.o: partialsearch.h partialsearch.C errorscope.h registry.h \
persistent.h vector.h dataset.h persscheme.h
binarysearch.o: binarysearch.h binarysearch.C errorscope.h registry.h \
persistent.h vector.h dataset.h persscheme.h interpolation.h
searchutil.o: searchutil.h searchutil.C errorscope.h ioutil.h vector.h \
persscheme.h
ndataset.o: ndataset.h ndataset.C dataset.h xmanifold.h
ninterpolation.o: ninterpolation.h ninterpolation.C interpolation.h vector.h \
xmanifold.h
list.o: list.h list.C
fileinfo.o: fileinfo.h fileinfo.C
postscript.o: postscript.h postscript.C
xreporter.o: xreporter.h xreporter.C
xeigen.o: xeigen.h xeigen.C fileinfo.h
xeigencb.o: xeigen.h xeigencb.C errorscope.h fileiter.h ioutil.h list.h \
xreporter.h vector.h matrix.h stringary.h fileinfo.h
xeigenut.o: xeigen.h xeigenut.C fileiter.h list.h naming.h fileinfo.h
ximgtool.o: ximgtool.h ximgtool.C fileiter.h image.h imageutil.h vector.h \
ximgtool.h
ximgtoolcb.o: ximgtool.h ximgtoolcb.C errorscope.h naming.h ioutil.h \
fileiter.h vector.h image.h imageutil.h ximgtool.h xreporter.h
ximgtoolut.o: ximgtool.h naming.h fileiter.h ioutil.h list.h image.h \
imageutil.h vector.h
xmanifold.o: xmanifold.h xmanifold.C errorscope.h fileiter.h list.h vector.h \
ndataset.h ninterpolation.h
xmanifoldcb.o: xmanifold.h errorscope.h fileiter.h handle.h ioutil.h list.h \
vector.h dataset.h interpolation.h persinterp.h bsplinecurve.h \
bsplinesurface.h bsplinevolume.h postscript.h xreporter.h ndataset.h \
ninterpolation.h
xmanifoldut.o: errorscope.h fileiter.h naming.h list.h vector.h dataset.h \
interpolation.h ninterpolation.h ndataset.h xmanifold.h
xmksrchtbl.o: xmksrchtbl.h fileinfo.h
xmksrchtblcb.o: errorscope.h fileiter.h persscheme.h fullsearch.h \
partialsearch.h binarysearch.h ioutil.h list.h xreporter.h vector.h dataset.h \
stringary.h xmksrchtbl.h fileinfo.h parser.h
xmksrchtblut.o: list.h fileinfo.h
