Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/cmd/mklib

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


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
	rm -f $LIB

clean:V:
	rm -f *.[$OS] y.tab.? y.output y.error $CLEANFILES

update:V:
	update $UPDATEFLAGS $UPDATE

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.