LESSONS = files editor morefiles macros eqn C
copy.c dounit.c learn.c list.c \
makpipe.c maktee.c mem.c mysys.c selsub.c selunit.c \
start.c whatnow.c wrapup.c \
OBJECTS = copy.o dounit.o learn.o list.o mem.o \
makpipe.o maktee.o mysys.o selsub.o selunit.o \
start.o whatnow.o wrapup.o
cc -n $(CFLAGS) $(OBJECTS) $(LIBRARY)
cc $(CFLAGS) -s $@.c -o ../lib/$@ $(LIBRARY)
-rm -r ../lib/$@; mkdir ../lib/$@; chmod +w ../lib/$@
(cd ../lib/$@; ar x ../$@.a)
everything: a.out bin tee lcount lessons play log check
(cd ../lib/files; ar r ../files.a L*)
(cd ../lib/morefiles; ar r ../morefiles.a L*)
(cd ../lib/editor; ar r ../editor.a L*)
(cd ../lib/macros; ar r ../macros.a L*)
(cd ../lib/eqn; ar r ../eqn.a L* tinyms Init)
(cd ../lib/C; ar r ../C.a L* get*)
mkdir export export/source export/lib
-cp $(FILES) export/source
do if test -f $$i; then cp $$i export/lib; fi;\
-@test -r ../lib/tee || echo 'tee not present; make tee'
-@test -r ../lib/lcount || echo 'lcount not present; make lcount'
-@test -r ../lib/play || echo 'play directory not present; make play'
-@test -r ../lib/log || echo 'log directory not present; make log'
-@for i in $(LESSONS); do test -r ../lib/$$i/L0 || echo $$i not unarchived, make $$i; done