:	creat the UNIX io driver library "/usr/sys/lib2"
:	must be called with 40, 45 or 70 argument
echo 
echo /usr/sys/lib2

if $1x != 40x -a $1x != 45x -a $1x != 70x \
sh -c 'echo An argument of 40, 45 or 70 is expected; exit '
chdir ../io1
echo bio.c;	cc -c -O bio.c;	mv -f bio.o ../io2/bio.o
echo cm.c;	cc -c -O cm.c;	mv -f cm.o ../io2/cm.o
echo dc.c;	cc -c -O dc.c;	mv -f dc.o ../io2/dc.o
echo dh.c;	cc -c -O dh.c;	mv -f dh.o ../io2/dh.o
echo dhdm.c;	cc -c -O dhdm.c;	mv -f dhdm.o ../io2/dhdm.o
echo dhfdm.c;	cc -c -O dhfdm.c;	mv -f dhfdm.o ../io2/dhfdm.o
echo dn.c;	cc -c -O dn.c;	mv -f dn.o ../io2/dn.o
echo dp.c;	cc -c -O dp.c;	mv -f dp.o ../io2/dp.o
echo hd.c;	cc -c -O hd.c;	mv -f hd.o ../io2/hd.o
echo hp.c;	cc -c -O hp.c;	mv -f hp.o ../io2/hp.o
echo hs.c;	cc -c -O hs.c;	mv -f hs.o ../io2/hs.o
echo ht.c;	cc -c -O ht.c;	mv -f ht.o ../io2/ht.o
echo kl.c;	cc -c -O kl.c;	mv -f kl.o ../io2/kl.o
echo lp.c;	cc -c -O lp.c;	mv -f lp.o ../io2/lp.o
chdir ../io2
echo malloc.c;	cc -O -c malloc.c;
echo mem.c;	cc -O -c mem.c;
echo partab.c;	cc -O -c partab.c;
echo pc.c;	cc -O -c pc.c;
echo pipe.c;	cc -O -c pipe.c;
echo rf.c;	cc -O -c rf.c;
echo rh.c;	cc -O -c rh.c;
echo rk.c;	cc -O -c rk.c;
echo rp.c;	cc -O -c rp.c;
echo sys.c;	cc -O -c sys.c;
echo tc.c;	cc -O -c tc.c;
echo tm.c;	cc -O -c tm.c;
echo tty.c;	cc -O -c tty.c;

: note:	preserve the relationship dhdm.o dh.o dhfdm.o

ar rv /usr/sys/lib2 \
bio.o \
tty.o \
malloc.o \
pipe.o \
cm.o\
dc.o \
dn.o \
dp.o \
hd.o\
kl.o \
mem.o \
pc.o \
rf.o \
rh.o \
rk.o \
tc.o \
tm.o \
partab.o \
rp.o \
lp.o \
dhdm.o \
dh.o \
dhfdm.o \
hp.o \
ht.o \
hs.o\
sys.o
rm *.o

chmod 644 /usr/sys/lib2
chown bin /usr/sys/lib2
if $1x != 40x exit
echo lib40 insert for 11/40
echo rhf.c;	cc -O -c rhf.c
ar rv /usr/sys/lib40 rhf.o
rm rhf.o
exit
