#
# 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: bounty:/archive/src/a2ps/Last/Makefile
# Created: Fri Nov 5 8:15:00 1993 by miguel@bounty.imag.fr (Miguel Santana)
# Version: 4.3
#

# Copyright (c) 1993, 1994, Miguel Santana, M.Santana@frgu.bull.fr
#
# Permission is granted to use, copy, and distribute this software for
# non commercial use, provided that the above copyright notice appear in
# all copies and that both that copyright notice and this permission
# notice appear in supporting documentation.
#
# Permission to modify the software is granted, but not the right to
# distribute the modified code. Please report bugs and changes to
# M.Santana@frgu.bull.fr
# 
# This software is provided "as is" without express or implied warranty.

# 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 -DLPR_PRINT
# Default values for HEIGHT, WIDTH, MARGIN and DIR_SEP (11.64, 8.27, 1.2, '/').
# Default values for LPR_COMMAND and LPR_OPT ("lpr", "-l")
# No values for TWOSIDED_DFLT, ONESIDED and TWOSIDED
OBJS	      = a2ps.o

all:		xa2ps

xa2ps:		a2ps.o
		@echo "Linking a2ps ... "
		$(CC) -o $D/xa2ps a2ps.o

a2ps.o:		a2ps.c
		@echo "Compiling a2ps ... "
		$(CC) -c $(CFLAGS) a2ps.c

install:	xa2ps
		@echo "Installing a2ps ..."
		cp xa2ps $(BINDIR)/a2ps
		chmod a+rx $(BINDIR)/a2ps

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

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

tar:;		tar cvf a2ps.tar README Makefile a2ps.c a2ps.1

clean:;		rm -f $(OBJS) xa2ps core *~ *O
