#
# Makefile for unit CRT and related things
# Michael Van Canneyt

# Some things you can configure. The are set in the top-level makefile
ifndef PP
PP=ppc386
endif
ifndef PPOPTS
PPOPTS= -w -q
endif
ifndef LIBINSTALLDIR
LIBINSTALLDIR = /usr/lib/ppc
endif

help : 
	@echo 'Possible targets :'
	@echo '     unit    : Compile the crt unit.'
	@echo '     test    : Compile test program for unit.'
	@echo '     all     : Compile both.'
	@echo '     install : Copy unit to installation directory.' 
	@echo '     clean   : Clean up the mess'

all: unit test

unit: crt.ppu

test: testcrt

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

testcrt: testcrt.pp crt.ppu
	$(PP) $(PPOPTS) testcrt.pp

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

clean:
	-rm crt.ppu testcrt *.o *.s
