shithub: riscv

ref: 578af37678b2ea16e29d950cbc352823cd2491ab
dir: /sys/src/cmd/mksyslib/

View raw version
AFLAGS=

all:V:	$LIB

$LIB:V:	$OFILES			# force archive even when not needed
	ar vu $LIB $newprereq

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

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

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

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

install:V: $LIB

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

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

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

clean:V:
	test -d ./test && @{cd test && mk $MKFLAGS clean}
	rm -f *.[$OS] [$OS].out $CLEANFILES

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

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

%.acid:V:
	$CC $CFLAGS -a `{basename $stem .$objtype}^.c >$target

update:V:
	update $UPDATEFLAGS $UPDATE

test:VQ:
	if(test -d ./test)
		cd test && mk $MKFLAGS test
	if not
		status=()