AFLAGS=

all:V:	$LIB.a$O

$LIB.a$O:	$OFILES			# force archive even when not needed
	ar vu $LIB.a$O $newprereq

&.a$O:n:	&.$O
	ar vu $LIB.a$O $stem.$O

%.$O:	$HFILES			# don't combine with following %.$O rules

%.$O:	%.c
	$CC $CFLAGS $stem.c

%.$O:	%.s
	$AS $AFLAGS $stem.s

%.all:V:
	for(objtype in $CPUS) mk $stem

%.installall:V:
	for(objtype in $CPUS) mk $stem

%.clean:V:
	rm -f $stem.[$OS] [$OS].$stem $stem.acid $stem

install:V: $LIB.a$O
	cp $LIB.a$O $LIBDIR/$LIB.a

installall:V:
	for(objtype in $CPUS) mk install

clean:V:
	rm -f *.o *.a *.a[$OS] *.[$OS] [$OS].out $CLEANFILES

install.clean:V: install
	rm -f *.o *.a *.[$OS] [$OS].out $CLEANFILES || true

test.clean:V: test
	rm -f *.o *.a *.[$OS] [$OS].out $CLEANFILES || true

testshort.clean:V: testshort
	rm -f *.o *.a *.[$OS] [$OS].out $CLEANFILES || true

nuke:V:
	rm -f *.[$OS] [$OS].out $CLEANFILES $LIB

%.acid: %.$O $HFILES
	$CC $CFLAGS -a $stem.c >$stem.acid

update:V:
	update $UPDATEFLAGS $UPDATE

