#
# Description: Makefile to construct and install a2ps. Don't forget
# to give your own values to define the variable name of compiler
# (see OPTIONS).
#
# File: imag:/users/local/src/a2ps/Makefile
# Created: Mon Nov 13 14:57:08 1990 by miguel@imag (Miguel Santana)
# Version: 4.0
#

# Copyright (c) 1990, Miguel Santana, miguel@imag.imag.fr
#
# Permission is granted to copy and distribute this file in modified
# or unmodified form, whether for noncommercial or commercial use,
# provided (a) this copyright notice is preserved, (b) no attempt is
# made to restrict redistribution of this file, and (c) this file is
# not distributed as part of any collection whose redistribution is
# restricted by a compilation copyright.
#

# stupid a**holes who add non-compatible "features"
SHELL	=/bin/sh

CC	=cc

D	=.
O	=.

BINDIR	=/usr/local/bin

MANDIR	=/usr/man/mann
MANEXT	=n

CFLAGS	= -DBSD -O
# Default values for HEIGHT, WIDTH, MARGIN and DIR_SEP (11.64, 8.27, 1.2, '/').
# Also default values for LPR_PRINT, LPR_COMMAND and LPR_OPT (TRUE, "lpr", "-l")

OBJS	      = a2ps.o

all:		a2ps

a2ps:		a2ps.o
		@echo "Compiling and linking a2ps ... "
		cc -o $D/a2ps a2ps.o
		@echo "done"

a2ps.o:		a2ps.c
		cc -c $(CFLAGS) a2ps.c

install:	a2ps
		@echo "Installing a2ps ..."
		cp a2ps $(BINDIR)/a2ps
		chmod a+rx $(BINDIR)/a2ps
		@echo "done"
		@echo "Installing a2ps man page ..."
		cp a2ps.1 $(MANDIR)/a2ps.$(MANEXT)
		chmod a+r $(MANDIR)/a2ps.$(MANEXT)
		@echo "done"

shar:;		shar -b -oa2ps.shar README Makefile a2ps.1 a2ps.c

clean:;		rm -f $(OBJS) a2ps
