#%#### makefile AUTOMATICALLY GENERATED ######
#%############### DO NOT EDIT ################
#%### EDIT makefile.src AND make config ######
DEPTH = ../
CONFIG = ../config/urt
HERE = man/
# Configuration file for the URT raster toolkit package.  Modify all 
# entries in this file.

# This file should be the only thing you have to edit to configure the
# toolkit for a new system.  If you are adding capabilities, please
# keep this in mind and be sure to make those capabilities configurable
# from this file.

# The file "makefile.hdr" contains code common to all makefiles.  It
# should not be necessary to edit that file.

# The following define the available "hardware" display configuration.
# Remove one # sign to define a symbol (i.e., leaving #define at the
# beginning of the line.)

# Displays
##define APOLLO         Apollo computer display.
##define BOBCAT         HP "bobcat" 9000 series (with Starbase).
##define CX3D           Chromatics CX3D system.
##define FB             BRL extended frame buffer library.
##define GRINNELL	Grinnell GMR27 frame buffer.
##define HPQCR		Matrix QCR-Z attached to HP series 300.
##define IRIS           Silicon Graphics Iris 2000/3000.
##define IRIS4D         Silicon Graphics Iris/4D.
##define ORION		High-Level Hardware Orion display.
##define SUNTOOLS       For Suns running SunTools.
##define TAAC1		Suns with TAAC-1 board.
##define X10		X10 Window system.
##define X11            X11 Window system.

# Conversion programs
#define ABEKASA60	Abekas A60 conversions.
#define ABEKASA62	Abekas A62 conversions.
#define CUBICOMP	Cubicomp conversions.
#define GIF		GIF image conversions.
#define GRAYFILES	Grayscale conversions.
#define MACPAINT	Macpaint conversions.
##define PBMPLUS	PBMPLUS conversions.
#define POSTSCRIPT	Postscript conversions.
##define SUNRASTER	For Sun raster conversions.
#define TARGA		Targa format conversions.
#define TIFF		TIFF image conversions.
#define WASATCH		Wasatch Paintbox conversions.
#define WAVEFRONT	Wavefront RLA file conversions.

# The dvirle program requires the Maryland MC-TeX library.  See the
# README file in the cnv/tex subdirectory.
##define DVIRLE		Compile dvirle program

# Control C compilation flags.  Define according to your compiler.

##define APOLLOCC	Apollo computer.
##define CRAY2CC		Cray-2 running UNICOS.
##define HPUX300CC	HP 9000/300 running HP-UX.
##define HPUX800CC	HP 9000/800 running HP-UX.
##define IBMR6000CC	IBM RS6000.
##define IRIS4DCC	Silicon Graphics Iris 4D.
##define IRISCC		Silicon Graphics Iris 2400/3000.
##define SUNCC		Sun 3 computers.
##define 386IXCC		SVr3 386/ix 2.2

# You can put any system dependent flags here.
ExtraCFLAGS = 

# System specific or configuration parameters.  Define according to your
# environment and desires.

#define ALL_MAN	Print/install all man pages.
##define CONST_DECL	If your compiler understands 'const' (ANSI)
##define FILE_NAME_14_CHARS	If filenames are limited to 14 characters.
##define NEED_BSTRING	Your libc does not have bcopy or bzero (Sys V probably)
##define NEED_GETOPT	Your libc does not have the getopt function (BSD)
##define NEED_SETLINEBUF	Your stdio does not have setlinebuf (Sys V)
##define NO_MAKE_MAKEFILE	If you don't want a "makefile" action.
##define NO_OPEN_PIPES	If file "names" "|..." and "*.Z" are not special.
##define NO_RANLIB	You don't have the ranlib program (Sys V)
##define NO_TOOLS	Don't build tool directory.
##define STDIO_NEEDS_BINARY	Your fopen() needs "b" specified for binary io
#define SYS_TIME_H	You include sys/time.h, not time.h (BSD)
##define SYS_V_SETPGRP	Your system has the SysV setpgrp() call.
#define USE_L_FLAG	Use -Llibdir -lrle instead of libdir/liblre.a.
#define USE_PROTOTYPES	Declare library functions with ANSI-C prototypes.
#define USE_RANDOM	Your libc has the BSD random() function.
##define USE_STDARG	Use 'stdarg' instead of 'varargs' (ANSI).
#define USE_STDLIB_H	You have "stdlib.h".
#define USE_STRING_H	You have "string.h", not "strings.h"
#define VOID_STAR	Your C compiler understands the 'void *' declaration.
##define XLIBINT_H	You have the include file <X11/Xlibint.h>.

# DEST is where all programs will be put.  Can be overridden for specific
# directories below.
# RI is where the include files live.  You probably shouldn't change this.
# RL is where the tool directories find the RLE library.  You can change
# this, but see the README instructions about making the toolkit in this
# case.

# Path names not starting with a / are relative to this directory.
# Path names starting with a / are absolute.

#defpath DEST	bin
#defpath RI	include
#defpath RL	lib

# Note! LIB_DEST, INC_DEST, and MAN_DEST must be defined for the 
# library, include files, or manual pages, respectively, to be
# installed anywhere.

#defpath MAN_DEST /usr/local/man
#defpath LIB_DEST /usr/local/lib
#defpath GET_DEST /usr/local/bin
#defpath CNV_DEST /usr/local/bin
#defpath TOOLS_DEST /usr/local/bin
#defpath INC_DEST /usr/local/include

# Control of formatting.  If your "roff" program needs to be piped to
# something to print, set ROFFPIPE to (e.g.) "| lpr"
ROFF = nroff
ROFFOPT = -man
ROFFPIPE = | lpr

# Stuff you like to have removed from directories to "make clean"
OTHERJUNK = core *~ #*#

# Files needed for the various options above.
#ifdef BOBCAT
#@LIBBOBCAT = -ldd98700 -ldd98710 -ldd98721 -ldd98731 -ldd98736 -ldd300h -lddbyte -lsb1 -lsb2
#endif

#ifdef CX3D
# Where are the include files for the CX3D
#@INCCX3D = /usr/site/include
#@LIBCX3D = -lcx3d
#endif

#ifdef DVIRLE
#define DVIRLE_LIBSUBDIR	Defined if LIBMCTEX is under cnv/tex directory
# The MC-TeX library.
#@LIBMCTEX = lib/lib.a		# Note! relative to cnv/tex directory
# Where to find the MC-TeX include files.
#@INCMCTEX = h			# Note! relative to cnv/tex directory
# where to find the font description file
#@CONFFILE = /usr/local/lib/tex/fontdesc
#endif

#ifdef FB
#@LIBFB = /usr/brl/lib/libfb.a
#endif

#ifdef GRINNELL
# Library containing GMR27 functions.
#@LIBGRINNELL = -lfb
#endif

#ifdef HPQCR
# HP device io library.
#@LIBHPQCR = -ldvio
#endif

#ifdef IRIS
#@LIBIRIS = -Zg
#endif

#ifdef IRIS4D
#@LIBIRIS4D = -lgl_s
#endif

#ifdef PBMPLUS
# PBMDIR should refer to the root of your PBM source tree.
#@PBMDIR = 
#@INCPBMPLUS = -I$(PBMDIR)/ppm -I$(PBMDIR)/pgm -I$(PBMDIR)/pbm
#@LIBPBMPLUS = $(PBMDIR)/ppm/libppm.a $(PBMDIR)/pgm/libpgm.a \
#@		$(PBMDIR)/pbm/libpbm.a 
#endif

#ifdef SUNRASTER|SUNTOOLS|TAAC1
#@LIBSUNTOOLS_COM = -lsuntool -lsunwindow -lpixrect
#endif

#ifdef SUNRASTER
#@LIBSUNRASTER = $(LIBSUNTOOLS_COM)
#endif

#ifdef SUNTOOLS
#@LIBSUNTOOLS = $(LIBSUNTOOLS_COM)
#endif

#ifdef TAAC1
#@LIBTAAC1 = -ltaac1 $(LIBSUNTOOLS_COM)
#endif

#ifdef TIFF
# Location of tiff library and include files.  Relative to "cnv" directory.
INCTIFF = 
LIBTIFF = -ltiff
#endif

#ifdef X10
#@LIBX10 = -lX
#@INCX10 = 
#endif

#ifdef X11
#@LIBX11 = -lX11
#@INCX11 = 
#endif
################ Beginning of makefile.hdr ################
# Stuff that goes at the beginning of all the makefiles, but is not
# configuration parameters should be in this file.  It is included
# after the configuration file, and before the makefile.src.

# Where the C header files live (RI) and where the library lives (RL)

#emit RI
RI = ../include
#emit RL
RL = ../lib

# Note -- DEST is not emitted here, it is emitted with a #set in the 
# individual makefiles.  This allows each makefile to override DEST with
# a subdirectory-specific value (from, e.g., GET_DEST).

# Reset these here because GNU make exports make variables when
# make recurses.  These should be local.
DIRS =
ALLDIRS =
PGMS =

# Machine dependent libraries
#ifadd CRAY2CC		ExtraLIBS	-lm -lnet
#ifadd IRIS4DCC		ExtraLIBS	-lbsd
#ifadd IRIS4DCC		ExtraLIBS	-lmalloc
#ifadd 386IXCC		ExtraLIBS	-linet
#emit ExtraLIBS
ExtraLIBS = 

#ifdef USE_L_FLAG
LIBS = -L$(RL) -lrle $(DIRLIBS) $(ExtraLIBS)
#else
#@LIBS = $(RL)/librle.a $(DIRLIBS)  ${ExtraLIBS}
#endif

# Machine dependent compiler flags
#ifadd	CRAY2CC		MachFLAGS	-h olevel_1
#ifadd	SUNCC		MachFLAGS	-f68881
#ifadd	IRIS4DCC	MachFLAGS	-G 4 -Olimit 600
#ifadd	HPUX300CC	MachFLAGS	-Dhpux -W c,-Nd2000,-Ns4000
#ifadd	HPUX800CC	MachFLAGS	-Dhpux
#ifadd	IBMR6000CC	MachFLAGS	-Dunix
#emit MachFLAGS
MachFLAGS = 

CFLAGS = -O $(DFLAGS) $(DIRFLAGS) $(ExtraCFLAGS) $(IFLAGS) $(MachFLAGS) 
IFLAGS = -I. -I$(RI)

# System V make pays attention to the SHELL environment variable. Override it.
SHELL = /bin/sh

################ End of makefile.hdr ################

#quiet off
#
# Makefile for Utah Raster Toolkit documentation directory
#

default: all

# Only set DEST if MAN_DEST is defined.
#ifdef MAN_DEST
#set	DEST	MAN_DEST
DEST = /usr/local/man
#endif MAN_DEST

# Destination directories for manual pages
DEST1 = $(DEST)/man1
DEST3 = $(DEST)/man3
DEST5 = $(DEST)/man5
SUFF1 = 1

# Program manual pages, except those configured below.
PAGES1 = \
	man1/applymap.1 \
	man1/avg4.1 \
	man1/crop.1 \
	man1/dvirle.1 \
	man1/fant.1 \
	man1/into.1 \
	man1/mcut.1 \
	man1/mergechan.1 \
	man1/pyrmask.1 \
	man1/rawtorle.1 \
	man1/repos.1 \
	man1/rleClock.1 \
	man1/rleaddcom.1 \
	man1/rleaddeof.1 \
	man1/rlebg.1 \
	man1/rlebox.1 \
	man1/rlecat.1 \
	man1/rlecomp.1 \
	man1/rledither.1 \
	man1/rleflip.1 \
	man1/rlehdr.1 \
	man1/rlehisto.1 \
	man1/rleldmap.1 \
	man1/rlemandl.1 \
	man1/rlenoise.1 \
	man1/rlepatch.1 \
	man1/rleprint.1 \
	man1/rlequant.1 \
	man1/rlescale.1 \
	man1/rleselect.1 \
	man1/rlesetbg.1 \
	man1/rlespiff.1 \
	man1/rlesplice.1 \
	man1/rlesplit.1 \
	man1/rlestereo.1 \
	man1/rleswap.1 \
	man1/rletoascii.1 \
	man1/rletoraw.1 \
	man1/rlezoom.1 \
	man1/smush.1 \
	man1/to8.1 \
	man1/tobw.1 \
	man1/unexp.1 \
	man1/unslice.1 \
	man1/urt.1 \
	$(XPAGES1)

# Installation and printing of manual pages depends on configuration

#ifdef ALL_MAN
#define	CUBICOMP
#define	MACPAINT
#define	ABEKASA60
#define	ABEKASA62
#define TARGA
#define	WASATCH
#define	GRAYFILES
#define GIF
#define TIFF
#define	FB
#define	XWINDOWS
#define APOLLO
#define IRIS
#define IRIS4D
#define BOBCAT
#define SUNTOOLS
#define CX3D
#define X11
#define HPQCR
#define TAAC1
#define WAVEFRONT
#define PBMPLUS
#endif

#ifadd	ABEKASA60	XPAGES1		man1/rletoabA60.1
#ifadd	ABEKASA62	XPAGES1		man1/rletoabA62.1
#ifadd	APOLLO		XPAGES1		man1/getap.1
#ifadd	BOBCAT		XPAGES1		man1/getbob.1 man1/getren.1 
#ifadd	BOBCAT		XPAGES1		man1/read98721.1
#ifadd	CUBICOMP	XPAGES1		man1/cubitorle.1
#ifadd	CX3D		XPAGES1		man1/getcx3d.1
#ifadd	FB		XPAGES1		man1/getfb.1
#ifadd	GIF		XPAGES1		man1/giftorle.1 man1/rletogif.1
#ifadd	GRAYFILES	XPAGES1		man1/graytorle.1 man1/rletogray.1
#ifadd	GRINNELL	XPAGES1		man1/getgmr.1
#ifadd	HPQCR		XPAGES1		man1/getqcr.1
#ifadd	IRIS		XPAGES1		man1/getiris.1 man1/getmex.1
#ifadd	IRIS4D		XPAGES1		man1/get4d.1
#ifadd	MACPAINT	XPAGES1		man1/painttorle.1 man1/rletopaint.1
#ifadd	ORION		XPAGES1		man1/get_orion.1
#ifadd	PBMPLUS		XPAGES1		man1/pgmtorle.1 man1/ppmtorle.1
#ifadd	PBMPLUS		XPAGES1		man1/rletoppm.1
#ifadd	POSTSCRIPT	XPAGES1		man1/rletops.1
#ifadd	SUNRASTER	XPAGES1		man1/rastorle.1 man1/rletorast.1
#ifadd	SUNTOOLS	XPAGES1		man1/getsun.1
#ifadd	TAAC1		XPAGES1		man1/gettaac.1
#ifadd	TARGA		XPAGES1		man1/targatorle.1
#ifadd	TIFF		XPAGES1		man1/rletotiff.1 man1/tifftorle.1
#ifadd	WASATCH		XPAGES1		man1/wasatchrle.1
#ifadd	WAVEFRONT	XPAGES1		man1/rlatorle.1 man1/rletorla.1
#ifadd	X10		XPAGES1		man1/getx10.1
#ifadd	X11		XPAGES1		man1/getx11.1
#emit XPAGES1
XPAGES1 =  man1/rletoabA60.1 man1/rletoabA62.1 man1/getap.1 man1/getbob.1 man1/getren.1 man1/read98721.1 man1/cubitorle.1 man1/getcx3d.1 man1/getfb.1 man1/giftorle.1 man1/rletogif.1 man1/graytorle.1 man1/rletogray.1 man1/getqcr.1 man1/getiris.1 man1/getmex.1 man1/get4d.1 man1/painttorle.1 man1/rletopaint.1 man1/pgmtorle.1 man1/ppmtorle.1 man1/rletoppm.1 man1/rletops.1 man1/getsun.1 man1/gettaac.1 man1/targatorle.1 man1/rletotiff.1 man1/tifftorle.1 man1/wasatchrle.1 man1/rlatorle.1 man1/rletorla.1 man1/getx11.1

# Must list names explicitly, as some are longer than 14 chars, so *.3
# won't work.
PAGES3 = ${MANPAGES3} ${SOPAGES3}

MANPAGES3 = \
	man3/buildmap.3 \
	man3/colorquant.3 \
	man3/dither.3 \
	man3/float_to_exp.3 \
	man3/inv_cmap.3 \
	man3/librle.3 \
	man3/rgb_to_bw.3 \
	man3/rle_addhist.3 \
	man3/rle_cp.3 \
	man3/rle_get_set.3 \
	man3/rle_getraw.3 \
	man3/rle_getrow.3 \
	man3/rle_getskip.3 \
	man3/rle_hdr.3 \
	man3/rle_op.3 \
	man3/rle_open_f.3 \
	man3/rle_put_init.3 \
	man3/rle_putcom.3 \
	man3/rle_puteof.3 \
	man3/rle_putraw.3 \
	man3/rle_putrow.3 \
	man3/rle_raw_free.3 \
	man3/rle_rawtorow.3 \
	man3/rle_row_free.3 \
	man3/rle_skiprow.3

SOPAGES3 = \
	man3/bwdithermap.3 \
	man3/ditherbw.3 \
	man3/dithergb.3 \
	man3/dithermap.3 \
	man3/make_square.3 \
	man3/rle_debug.3 \
	man3/rle_delcom.3 \
	man3/rle_freeraw.3 \
	man3/rle_get_error.3 \
	man3/rle_get_setup.3 \
	${GET_SETUP_OK_PAGE3} \
	man3/rle_getcom.3 \
	man3/rle_open_f_noexit.3 \
	man3/rle_put_setup.3 \
	man3/rle_raw_alloc.3 \
	man3/rle_row_alloc.3

#ifdef FILE_NAME_14_CHARS
#@PAGE3_INSTALL_NAME = \`basename \$$i .3 | sed 's/^\(............\).*/\1/'\`.3
#else
PAGE3_INSTALL_NAME = \`basename \$$i\`
GET_SETUP_OK_PAGE3 = man3/rle_get_setup_ok.3
#endif

PAGES5 = ${MANPAGES5} ${SOPAGES5}

MANPAGES5 = rle.5

SOPAGES5 = RLE.5

# Default action is to print all man pages
all:
	$(ROFF) $(ROFFOPT) `ls $(PAGES1) | sort` $(ROFFPIPE)
	$(ROFF) $(ROFFOPT) `ls $(MANPAGES3) | sort` $(ROFFPIPE)
	$(ROFF) $(ROFFOPT) ${MANPAGES5} $(ROFFPIPE)

# Put the manual pages into a global location
install: install-1 install-3 install-5
	touch install

install-1: $(PAGES1)
	@-sh -c "if test '$(DEST)X' != X ; then \
		for i in $? ; do \
			dpgm=\`basename \$$i .1\`.$(SUFF1) ; \
			echo cp \$$i $(DEST1)/\$$dpgm ; \
			cp \$$i $(DEST1)/\$$dpgm ; \
		done ; \
	else \
		true ; \
	fi"
	touch install-1

install-3: $(PAGES3)
	@-sh -c "if test '$(DEST)X' != X ; then \
		for i in $? ; do \
			dpgm=${PAGE3_INSTALL_NAME} ; \
			echo cp \$$i $(DEST3)/\$$dpgm ; \
			cp \$$i $(DEST3)/\$$dpgm ; \
		done ; \
	else \
		true ; \
	fi"
	touch install-3

install-5: man5/*.5
	@-sh -c "if test $(DEST)X != X; then \
		echo cp $? $(DEST5); \
		cp $? $(DEST5); \
	else true; \
	fi"
	touch install-5

# Clean up installed man pages
pristine:
	-rm -f install*
	@-if test $(DEST)X != X ; then \
	    for i in man1/*.1 ; do \
		echo "rm -f $(DEST1)/`basename $$i .1`.$(SUFF1)" ;\
		rm -f $(DEST1)/`basename $$i .1`.$(SUFF1) ;\
	    done ; \
	    for i in $(PAGES3) ; do \
		eval "echo rm -f $(DEST3)/${PAGE3_INSTALL_NAME}" ; \
		eval "rm -f $(DEST3)/${PAGE3_INSTALL_NAME}" ; \
	    done ; \
	    for i in man5/*.5 ; do \
		echo rm -f $(DEST5)/$$i ; \
		rm -f $(DEST5)/$$i ; \
	    done ; \
	else \
	    true ;\
	fi

# No other actions
clean:


################ Beginning of makefile.tlr ################
# Stuff that goes at the end of all the makefiles, but is not
# configuration parameters should be in this file.  It is included
# after the makefile.src.

subdirs:
	@sh -c "if test 'x$(DIRS)' != x ; then eval \
		'set -e ; for dir in $(DIRS) ; do \
			(cd \$$dir ; echo Make ${HERE}\$$dir ; \
			 	make $(MFLAGS) $(DIRMFLAGS) ) ; \
		done' ; \
	  else \
		true ; \
	  fi"

# Install all programs
install-pgm: $(PGMS)
	@sh -c "if test 'x$?' != x ; then eval \
		'for pgm in $? ; do \
			dpgm=\`basename \$$pgm .out\` ; \
			echo cp \$$pgm $(DEST)/\$$dpgm ; \
			cp \$$pgm $(DEST)/\$$dpgm; \
		done' ; \
	else \
	    true ; \
	fi"
	touch install-pgm

# Install subdirectories
install-subdirs: subdirs
	@sh -c "if test 'x$(DIRS)' != x  ; then eval \
		'for dir in $(DIRS) ; do \
			(cd \$$dir ; echo Install ${HERE}\$$dir ; \
			 make $(MFLAGS) $(DIRMFLAGS) install) ; \
		done' ; \
	  else \
		true ; \
	  fi"

#config reads the configuration file and munches the apropriate make files
config: doit
	${DEPTH}Configure "${CONFIG}" "${DEPTH}" "${HERE}" "${MFLAGS}"

# post-config is for any actions a directory may require following
# configuration or reconfiguration.
post-config: doit

config-subdirs: doit
	@-if test 'x$(ALLDIRS)' != x ; then eval \
	    'for d in $(ALLDIRS) ; do \
		    ( cd $$d ; \
		      echo Configuring ${HERE}$$d ; \
		      ${DEPTH}Configure "${CONFIG}" "${DEPTH}" "${HERE}$$d/" \
				    "${MFLAGS}" ) \
	    done' ; \
	else \
	    true ; \
	fi

doit:


# Clean up installed stuff and binaries
# pristine-pgm target invoked pristine target in dirs that make programs
# pristine target in library directory is different.
# 
pristine-pgm: clean-pgm
	@-if test 'x$(PGMS)' != x ; then eval \
		'for pgm in $(PGMS); do \
			dpgm=`basename $$pgm .out`; \
			echo rm -f $(DEST)/$$dpgm; \
			rm -f $(DEST)/$$dpgm; \
		done' ; \
	else \
	    true ; \
	fi
	@-if test 'x$(ALLDIRS)' != x ; then eval \
	    'for dir in $(ALLDIRS); do \
		if test -d $$dir ; then \
			(cd $$dir; echo Make ${HERE}$$dir pristine ; \
			 make $(MFLAGS) pristine); \
		else \
			true; \
		fi; \
	    done' ; \
	else \
	    true ; \
	fi
	-rm -f install install-pgm

# Clean up binaries on program directories.
clean-pgm:
	-rm -f $(PGMS) install*
	-rm -f *.o *.out *.new
	-rm -f $(OTHERJUNK)
	@-if test 'x$(ALLDIRS)' != x ; then eval \
	    'for dir in $(ALLDIRS); do \
		if test -d $$dir ; then \
			(cd $$dir; echo Clean ${HERE}$$dir ; \
			 make $(MFLAGS) clean); \
		else \
			true; \
		fi; \
	    done' ; \
	else \
	    true ; \
	fi

#ifndef NO_MAKE_MAKEFILE
# Copy config action to here so that GNU make program will work.
makefile:: makefile.src
	${DEPTH}Configure "${CONFIG}" "${DEPTH}" "${HERE}" "${MFLAGS}"
#endif

# Keep people who like to 'make depend' happy.  Allow depend::
# actions in specific makefiles if desired.
depend::

################ End of makefile.tlr ################
