#
# Makefile for printerunit 
# December 1996, Michael Van Canneyt
#

# Things to configure. Are set in the top-level makefile too.
 
ifndef PP
PP = ppc386
endif
ifndef PPOPTS
PPOPTS = -w -q
endif
ifndef LIBINSTALLDIR
LIBINSTALLDIR = /usr/lib/ppc
endif

help:
	@echo "targets :"
	@echo "  unit   : make printer unit "
	@echo "  test   : make test for unit"
	@echo "  all    : make previous two"
	@echo "  install: Copy printer unit to installdir."
	@echo "  clean  : Clean up the mess."
	@echo "Edit Makefile for some installation defaults."

all: unit test

test: testprn

unit: printer.ppu

install: unit
	cp printer.o printer.ppu $(LIBINSTALLDIR)/linuxunits

clean:
	-rm *.o *.ppu *.s testprn

printer.ppu : printer.pp 
	$(PP) $(PPOPTS) printer.pp

testprn : testprn.pp printer.ppu
	$(PP) $(PPOPTS) testprn
