# To install this package in some permanent location change the
# following macros to suit local conditions and type "make install".
# NOTE: Before installing you should edit the manual page cpintro.l to
# use the pathnames you set here.

# To create readable copies of the man pages in the current directory,
# type "make man".

# pathname of dir in which to install the packages:
MDIR=/u/geom/lib/mathematica/local/Packages

# pathname of dir in which to install the aux files:
AUXDIR=/u/geom/lib/circlepack

# pathname of dir in which to install man pages
MANDIR=/u/geom/man/man1

MFILES = \
    Circle3D.m		\
    CirclePack.m	\
    DrawPacking.m	\
    Hyperbolic.m	\
    Minkowski.m		\
    Normalize.m		\
    Triangulation.m	\
    cpexamples.m

AUXFILES = \
    demo.ma

MANFILES = \
    circlepack.1	\
    triangulation.1	\
    cpintro.1

OTHERFILES = \
    README		\
    COPYING		\
    Makefile

FILES = ${MFILES} ${AUXFILES} ${MANFILES} ${OTHERFILES}

circlepack.tar.Z: tar

tar:
	-/bin/rm -f circlepack.tar.Z
	gnutar cvfZ circlepack.tar.Z ${FILES}

install:
	/bin/cp ${MFILES} ${MDIR}
	/bin/cp ${AUXFILES} ${AUXDIR}
	/bin/cp ${MANFILES} ${MANDIR}

man:	cpintro.man triangulation.man circlepack.man

cpintro.man: cpintro.l
	/bin/rm -f cpintro.man
	nroff -man cpintro.l | col -b > cpintro.man

circlepack.man: circlepack.l
	/bin/rm -f circlepack.man
	nroff -man circlepack.l | col -b > circlepack.man

triangulation.man: triangulation.l
	/bin/rm -f triangulation.man
	nroff -man triangulation.l | col -b > triangulation.man

clean:
	-/bin/rm -f *~ #*#

distclean:
	/bin/rm *.man *~ #*#
