Bell 32V development
[unix-history] / usr / src / cmd / learn / origmakefile
CommitLineData
bbddffb1
TL
1LESSONS = files editor morefiles macros eqn C
2
3FILES = lrndef lrnref \
4 copy.c dounit.c learn.c list.c \
5 makpipe.c maktee.c mem.c mysys.c selsub.c selunit.c \
6 start.c whatnow.c wrapup.c \
7 lcount.c tee.c \
8 makefile ../README
9
10OBJECTS = copy.o dounit.o learn.o list.o mem.o \
11 makpipe.o maktee.o mysys.o selsub.o selunit.o \
12 start.o whatnow.o wrapup.o
13
14CFLAGS = -O
15LIBRARY = -lS
16
17a.out: $(OBJECTS)
18 cc -n $(CFLAGS) $(OBJECTS) $(LIBRARY)
19
20$(OBJECTS): lrnref
21learn.o: lrndef
22
23list:
24 pr $(FILES)
25
26bin:
27 cp a.out /usr/bin/learn
28 strip /usr/bin/learn
29
30lcount tee:
31 cc $(CFLAGS) -s $@.c -o ../lib/$@ $(LIBRARY)
32
33lessons: $(LESSONS)
34
35play log:
36 -rm -r ../lib/$@; mkdir ../lib/$@; chmod +w ../lib/$@
37
38$(LESSONS):
39 -rm -r ../lib/$@
40 mkdir ../lib/$@
41 (cd ../lib/$@; ar x ../$@.a)
42
43everything: a.out bin tee lcount lessons play log check
44
45archives:
46 (cd ../lib/files; ar r ../files.a L*)
47 (cd ../lib/morefiles; ar r ../morefiles.a L*)
48 (cd ../lib/editor; ar r ../editor.a L*)
49 (cd ../lib/macros; ar r ../macros.a L*)
50 (cd ../lib/eqn; ar r ../eqn.a L* tinyms Init)
51 (cd ../lib/C; ar r ../C.a L* get*)
52
53export:
54 : make the directories
55 mkdir export export/source export/lib
56 : copy source files
57 -cp $(FILES) export/source
58 : non-directories in lib
59 -for i in ../lib/*;\
60 do if test -f $$i; then cp $$i export/lib; fi;\
61 done
62
63check:
64 -@test -r ../lib/tee || echo 'tee not present; make tee'
65 -@test -r ../lib/lcount || echo 'lcount not present; make lcount'
66 -@test -r ../lib/play || echo 'play directory not present; make play'
67 -@test -r ../lib/log || echo 'log directory not present; make log'
68 -@for i in $(LESSONS); do test -r ../lib/$$i/L0 || echo $$i not unarchived, make $$i; done