#
# Makefile for linuxunit 

ifndef PP
PP = ppc386
endif
ifndef PPOPTS
PPOPTS = -w -q
endif
ifndef LIBINSTALLDIR
LIBINSTALLDIR = /usr/lib/ppc
endif

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

all: unit test

test: test1 test2 test3 test4 test5 test7 test8 test9 test10 test11 test12 \
     test13 test14 test15 test17 test18 test19 test20 test21

unit: linux.ppu

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

clean:
	-rm *.o *.ppu *.s test? test??
	-rm -r linux

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

test1 : test1.pp linux.ppu
	$(PP) $(PPOPTS) test1

test2 : test2.pp linux.ppu
	$(PP) $(PPOPTS) test2

test3 : test3.pp linux.ppu
	$(PP) $(PPOPTS) test3

test4 : test4.pp linux.ppu
	$(PP) $(PPOPTS) test4

test5 : test5.pp linux.ppu
	$(PP) $(PPOPTS) test5

test6 : test6.pp linux.ppu
	$(PP) $(PPOPTS) test6

test7 : test7.pp linux.ppu
	$(PP) $(PPOPTS) test7

test8 : test8.pp linux.ppu
	$(PP) $(PPOPTS) test8

test9 : test9.pp linux.ppu
	$(PP) $(PPOPTS) test9

test10 : test10.pp linux.ppu 
	$(PP) $(PPOPTS) test10

test11 : test11.pp linux.ppu
	$(PP) $(PPOPTS) test11

test12 : test12.pp linux.ppu 
	$(PP) $(PPOPTS) test12

test13 : test13.pp linux.ppu
	$(PP) $(PPOPTS) test13

test14 : test14.pp linux.ppu
	$(PP) $(PPOPTS) test14

test15 : test15.pp linux.ppu
	$(PP) $(PPOPTS) test15

test16 : test16.pp linux.ppu
	$(PP) $(PPOPTS) test16

test17 : test17.pp linux.ppu
	$(PP) $(PPOPTS) test17

test18 : test18.pp linux.ppu
	$(PP) $(PPOPTS) test18

test19 : test19.pp linux.ppu
	$(PP) $(PPOPTS) test19

test20 : test20.pp linux.ppu
	$(PP) $(PPOPTS) test20

test21 : test21.pp linux.ppu
	$(PP) $(PPOPTS) test21
