# Makefile for CIL Stereo Dataset
#
#	These routines compute the World Coordinate to Image Coordinate
#  (and vice versa) transformations for the CIL Stereo Dataset.  They apply
#  the camera model to the computed parameters (files named c-DDDDLL.par).
#
#	To compile these routines, you must have access to the IMSL library
#  routine called   dumiah_   (or equivalent).  This routine performs a
#  nonlinear optimization over a double precision, multivariate function
#  using a modified Newton's method and a user-supplied Hessian.
#
LIBS = -lmath -lF77 -lm
CFLAGS = -O4


all:	world-to-image image-to-world


world-to-image:	world-to-image.o coords.o
	cc $(CFLAGS) -o world-to-image world-to-image.o coords.o $(LIBS)

world-to-image.o:	world-to-image.c coords.h
	cc $(CFLAGS) -c world-to-image.c

coords.o : coords.c coords.h
	cc $(CFLAGS) -c coords.c

image-to-world:	image-to-world.o coords.o
	cc $(CFLAGS) -o image-to-world image-to-world.o coords.o $(LIBS)

image-to-world.o:	image-to-world.c coords.h
	cc $(CFLAGS) -c image-to-world.c

clean:
	rm -f world-to-image image-to-world world-to-image.o image-to-world.o coords.o *.BAK *.CKP *~
