:	this command file creates the C library "/lib/libc.a"
:	$1 = fpp | nofpp	for fpp hardware or not

echo 
echo /lib/libc.a
if $1x = x	echo nofpp assumed

chdir ../clib1
echo abort.s ;	as abort.s ;		mv a.out ../abort.o
echo abs.s ;	as abs.s ;		mv a.out ../abs.o
echo access.s;	as access.s;		mv a.out ../access.o
echo accnt.s;	as accnt.s;		mv a.out ../accnt.o
echo alarm.s ;	as alarm.s ;		mv a.out ../alarm.o
echo alloc.s ;	as alloc.s ;		mv a.out ../alloc.o
echo area.c ;	cc -O -c area.c ;	mv area.o ../area.o
echo atof.s ;	as atof.s ;		mv a.out ../atof.o
echo atoi.c ;	cc -O -c atoi.c ;	mv atoi.o ../atoi.o
echo cerror.s ;	as cerror.s ;		mv a.out ../cerror.o
echo chdir.s ;	as chdir.s ;		mv a.out ../chdir.o
echo chmod.s ;	as chmod.s ;		mv a.out ../chmod.o
echo chown.s ;	as chown.s ;		mv a.out ../chown.o
echo close.s ;	as close.s ;		mv a.out ../close.o
echo creat.s ;	as creat.s ;		mv a.out ../creat.o
echo croot.s;	as croot.s;		mv a.out ../croot.o
echo crt0.s ;	as crt0.s ;		mv -f a.out /lib/crt0.o
echo csv.s ;	as csv.s ;		mv a.out ../csv.o
echo ctime.c ;	cc -O -c ctime.c ;	mv ctime.o ../ctime.o

chdir ../clib2
echo dup.s ;	as dup.s ;		mv a.out ../dup.o
echo elog.s;	as elog.s;		mv a.out ../elog.o
echo errlst.c ;	cc -O -c errlst.c ;	mv errlst.o ../errlst.o
echo execl.s ;	as execl.s ;		mv a.out ../execl.o
echo exect.s ;	as exect.s ;		mv a.out ../exect.o
echo execv.s ;	as execv.s ;		mv a.out ../execv.o
echo exit.s ;	as exit.s ;		mv a.out ../exit.o
echo fcrt0.s ;	as fcrt0.s ;		mv -f a.out /lib/fcrt0.o
echo ffltpr.s ;	as ffltpr.s ;		mv a.out ../ffltpr.o
echo fltpr.s ;	as fltpr.s ;		mv a.out ../fltpr.o
echo fork.s ;	as fork.s ;		mv a.out ../fork.o
echo fstat.s ;	as fstat.s ;		mv a.out ../fstat.o

chdir ../clib3
echo getc.s ;	as getc.s ;		mv a.out ../getc.o
echo getchr.s ;	as getchr.s ;		mv a.out ../getchr.o
echo getcsw.s ;	as getcsw.s ;		mv a.out ../getcsw.o
echo getgid.s ;	as getgid.s ;		mv a.out ../getgid.o
echo getpid.s ;	as getpid.s ;		mv a.out ../getpid.o
echo getpw.c ;	cc -O -c getpw.c ;	mv getpw.o ../getpw.o
echo getuid.s ;	as getuid.s ;		mv a.out ../getuid.o
echo gtty.s ;	as gtty.s ;		mv a.out ../gtty.o
echo hmul.s ;	as hmul.s ;		mv a.out ../hmul.o
echo hsw.s ;	as hsw.s ;		mv a.out ../hsw.o
if $1x = fppx goto fp1
echo ilongops.s ; as ilongops.s ;		mv a.out ../longops.o
: fp1
echo ioctl.s;	as ioctl.s;		mv a.out ../ioctl.o
echo itol.s ;	as itol.s ;		mv a.out ../itol.o
echo kill.s ;	as kill.s ;		mv a.out ../kill.o
echo ladd.s ;	as ladd.s ;		mv a.out ../ladd.o
echo lcall.s;	as lcall.s;		mv a.out ../lcall.o
echo ldfps.s ;	as ldfps.s ;		mv a.out ../ldfps.o
echo link.s ;	as link.s ;		mv a.out ../link.o
echo lock.s ;	as lock.s ;		mv a.out ../lock.o
echo locv.s ;	as locv.s ;		mv a.out ../locv.o
if $1x != fppx goto nofp1
echo longops.s ; as longops.s ;		mv a.out ../longops.o
: nofp1
echo ltod.s ;	as ltod.s ;		mv a.out ../ltod.o
echo ltoi.s ;	as ltoi.s ;		mv a.out ../ltoi.o

chdir ../clib4
echo lseek.c ;	cc -O -c lseek.c ;	mv lseek.o ../lseek.o
echo mcount.s ;	as mcount.s ;		mv a.out ../mcount.o
echo mcrt0.s ;	as mcrt0.s ;		mv -f a.out /lib/mcrt0.o
echo mknod.s ;	as mknod.s ;		mv a.out ../mknod.o
echo mktemp.c ;	cc -O -c mktemp.c ;	mv mktemp.o ../mktemp.o
echo mon.c ;	cc -O -c mon.c ;	mv mon.o ../mon.o
echo mount.s ;	as mount.s ;		mv a.out ../mount.o
echo msg.s ;  as msg.s ;              mv a.out ../msg.o
echo nargs.s ;	as nargs.s ;		mv a.out ../nargs.o
if $1x = fppx goto fpp
echo nfrin.c ;	cc -O -c nfrin.c ;	 mv nfrin.o ../rin.o
: fpp
echo nice.s ;	as nice.s ;		mv a.out ../nice.o
echo nlist.c ;	cc -O -c nlist.c ;	mv nlist.o ../nlist.o
echo open.s ;	as open.s ;		mv a.out ../open.o

chdir ../clib5
echo perror.c ;	cc -O -c perror.c ;	mv perror.o ../perror.o
echo ptrace.s;	as ptrace.s;		mv a.out ../ptrace.o
echo pipe.s ;	as pipe.s ;		mv a.out ../pipe.o
echo printf.s ;	as printf.s ;		mv a.out ../printf.o
echo prof.s ;	as prof.s ;		mv a.out ../prof.o
echo putc.s ;	as putc.s ;		mv a.out ../putc.o
echo putchr.s ;	as putchr.s ;		mv a.out ../putchr.o
echo qsort.c ;	cc -O -c qsort.c ;	mv qsort.o ../qsort.o
echo read.s ;	as read.s ;		mv a.out ../read.o
echo reset.s ;	as reset.s ;		mv a.out ../reset.o
echo retrn.s ;	as retrn.s ;		mv a.out ../retrn.o
if $1x != fppx goto nofpp
echo rin.c ;	cc -O -c rin.c ;	 mv rin.o ../rin.o
: nofpp
echo rsave.s ;	as rsave.s ;		mv a.out ../rsave.o

chdir ../clib6
echo sbrk.s ;	as sbrk.s ;		mv a.out ../sbrk.o
echo seek.s ;	as seek.s ;		mv a.out ../seek.o
echo setgid.s ;	as setgid.s ;		mv a.out ../setgid.o
echo setuid.s ;	as setuid.s ;		mv a.out ../setuid.o
echo signal.s ;	as signal.s ;		mv a.out ../signal.o
echo sleep.s ;	as sleep.s ;		mv a.out ../sleep.o
echo stat.s ;	as stat.s ;		mv a.out ../stat.o
echo stime.s ;	as stime.s ;		mv a.out ../stime.o
echo stty.s ;	as stty.s ;		mv a.out ../stty.o
echo sync.s ;	as sync.s ;		mv a.out ../sync.o

chdir ../clib7
echo tell.s;	as tell.s;		mv a.out ../tell.o
echo time.s ;	as time.s ;		mv a.out ../time.o
echo times.s ;	as times.s ;		mv a.out ../times.o
echo umount.s ;	as umount.s ;		mv a.out ../umount.o
echo unlink.s ;	as unlink.s ;		mv a.out ../unlink.o
echo vcall.s;	as vcall.s;		mv a.out ../vcall.o
echo wait.s ;	as wait.s ;		mv a.out ../wait.o
echo write.s ;	as write.s ;		mv a.out ../write.o


: note:	preserve the relationship  fltpr.o printf.o ffltpr.o
:	errlst.o must follow perror.o

chdir ..
ar rv /lib/libc.a \
abort.o \
abs.o \
access.o \
accnt.o \
alarm.o \
alloc.o \
area.o \
atof.o \
atoi.o \
chdir.o \
chmod.o \
chown.o \
croot.o \
ctime.o \
dup.o \
elog.o \
execl.o \
fork.o \
fstat.o \
getcsw.o \
getgid.o \
getpw.o \
getuid.o \
gtty.o \
hmul.o \

ar rv /lib/libc.a \
hsw.o \
ioctl.o \
kill.o \
ladd.o \
lcall.o \
ldfps.o \
link.o \
lock.o \
locv.o \
longops.o \
ltod.o \
ltoi.o \
mcount.o \
mknod.o \
mktemp.o \
mon.o \
mount.o \
msg.o \
nice.o \
nlist.o \
itol.o \
open.o \
perror.o \
pipe.o \

ar rv /lib/libc.a \
prof.o \
ptrace.o \
putc.o \
qsort.o \
read.o \
reset.o \
retrn.o \
rin.o \
rsave.o \
sbrk.o \
setgid.o \
setuid.o \
signal.o \
sleep.o \
stat.o \
stime.o \
stty.o \
sync.o \

ar rv /lib/libc.a \
tell.o \
time.o \
times.o \
umount.o \
unlink.o \
vcall.o \
wait.o \
write.o \
creat.o \
close.o \
errlst.o \
exect.o \
execv.o \
exit.o \
fltpr.o \
printf.o \
ffltpr.o \
getc.o \
getchr.o \
getpid.o \
lseek.o \
nargs.o \
putchr.o \
seek.o \
cerror.o \
csv.o \

rm [a-m]*.o
rm *.o
chdir /lib
chmod 644 crt0.o fcrt0.o mcrt0.o libc.a
chown bin crt0.o fcrt0.o mcrt0.o libc.a
