plan9fox/sys/src/cmd/mklib
Ori Bernstein 101312c1d7 mklib, upas/common: clean up libcommon properly (thanks mikan)
Despite pervious efforts, mk clean still doesn't remove libcommon.a*
files from cmd/upas/common/. To fix this, let's tell cmd/mklib to do
the job instead.
2021-02-03 08:10:11 -08:00

49 lines
711 B
Plaintext

AFLAGS=
YFLAGS=-d
LIBOBJ=${OFILES:%=$LIB(%)}
LIBDIR=.
default:V: $LIB
all:V: $LIB
$LIB: $LIBOBJ
ar vu $LIB $newmember
%.$O: $HFILES # don't combine with following %.$O rules
%.$O: %.c
$CC $CFLAGS $stem.c
%.$O: %.s
$AS $AFLAGS $stem.s
y.tab.h y.tab.c: $YFILES
yacc $YFLAGS $prereq
$LIB(%.$O):N: %.$O
install:VQ: $LIB
~ $LIBDIR '.' || cp $LIB $LIBDIR/$LIB
installall:V:
for (objtype in $CPUS)
mk install
%.all:V:
for (objtype in $CPUS)
mk $stem
nuke:V:
rm -f *.[$OS] y.tab.? y.output y.error $CLEANFILES $LIB
clean:V:
rm -f *.[$OS] *.a[$OS] y.tab.? y.output y.error $CLEANFILES
%.acid:V:
$CC $CFLAGS -a `{basename $stem .$objtype}^.c >$target
update:V:
update $UPDATEFLAGS $UPDATE