#
# Copyright 1990 Network Computing Devices, Inc.  All rights reserved.
#
#ident "@(#)Makefile	13.1	90/07/23"
#
#  This makefile builds the two drivers for NCD connected printers and
#  other assorted utilities.
#
#  ps2ncd is a driver for Apple LaserWriter printers.  After synchronizing
#  with the printer, it sends the PostScript data to the printer while
#  watching for status return strings.  These status messages are logged
#  as they are received.  At the end of the job, the driver resynchronizes
#  with the printer so that when the driver has terminated the jobs is
#  known to have printed and any errors are logged.
#
#  cat2ncd is a driver for "dumb" serial printers.  It simply sends the
#  data to the printer and terminates.  There is no way to be sure the
#  job has been printed or even if the printer is connected.
#
#  chr is a (dumb) utility to make the generation of escape sequences for
#  the HP LaserJet II P printer easier.
#
#  if is the common input filter used with the BSD spooler.  It simply
#  samples the first few characters to determine whether the data looks
#  like PostScript and then, based on arguments supplied, pipes the user's
#  data to the appropriate driver pipeline.

SEP=	%
ALL=	ps2ncd cat2ncd chr if
LIBS=	-ldnet
LIBS=

all:	$(ALL)

dnet:
	make all CFLAGS="$(CFLAGS) -DDNET" LIBS="$(LIBS) -ldnet"

ps2ncd:	ncdprint.c
	$(CC) $(CFLAGS) -DPS -o ps2ncd ncdprint.c $(LIBS)

cat2ncd:	ncdprint.c
	$(CC) $(CFLAGS) -UPS -o cat2ncd ncdprint.c $(LIBS)

chr:	chr.c
	$(CC) $(CFLAGS) -o chr chr.c

if:	if.c
	$(CC) $(CFLAGS) -o if if.c

clean:
	rm -f $(ALL) if$(SEP)*$(SEP)*

lw:
	ln if.sh if$(SEP)lw$(SEP)$(NCD)

ljiip:
	ln if.sh if$(SEP)ljiip$(SEP)$(NCD)
