# @(#)Makefile 4.1 (Berkeley) 83/02/24
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
LLIB
= $(DESTDIR
)/usr
/lib
/learn
install -s learn
$(DESTDIR
)/usr
/bin
install -s lcount
$(LLIB
)
@echo
"Then do 'make play; make log' to make playpen and log directories"
rm -f
*.o learn tee lcount errs
cmp learn
$(DESTDIR
)/bin
/learn
cmp lcount
$(LLIB
)/lcount
cc -o learn
$(CFLAGS
) $(OBJECTS
) $(LIBRARY
)
cc $(CFLAGS
) $@.c
-o
$@
$(LIBRARY
)
(cd
$(LLIB
)/$@
; ar x ..
/$@.a
)
-rm -r
$(LLIB
)/$@
; mkdir
$(LLIB
)/$@
; chmod
+w
$(LLIB
)/$@
-@
test -r
$(LLIB
)/tee || echo
'tee not present; make tee'
-@
test -r
$(LLIB
)/lcount || echo
'lcount not present; make lcount'
-@
test -r
$(LLIB
)/play || echo
'play directory not present; make play'
-@
test -r
$(LLIB
)/log || echo
'log directory not present; make log'
-@for i in
$(LESSONS
); do
test -r
$(LLIB
)/$$i/L0 || echo
$$i not unarchived
, make
$$i; done