Bell 32V development
[unix-history] / usr / src / cmd / learn / omakefile
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
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 =
16LLIB = /usr/lib/learn
17
18cp: all
19 cp learn /bin
20 cp tee $(LLIB)
21 cp lcount $(LLIB)
22 rm learn tee lcount *.o
23 @echo "Now do 'make lessons' if you need to extract the lesson archives"
24
25cmp: all
26 cmp learn /bin/learn
27 cmp tee $(LLIB)/tee
28 cmp lcount $(LLIB)/lcount
29 rm learn tee lcount *.o
30
31all: learn tee lcount
32
33learn: $(OBJECTS)
34 cc -n -s -o learn $(CFLAGS) $(OBJECTS) $(LIBRARY)
35
36$(OBJECTS): lrnref
37learn.o: lrndef
38
39tee:
40 cc $(CFLAGS) -s -n tee.c -o tee $(LIBRARY)
41
42lcount:
43 cc $(CFLAGS) -s -n lcount.c -o lcount $(LIBRARY)
44
45lessons: $(LESSONS)
46
47files:
48 -if test ! -r $(LLIB)/files; then mkdir $(LLIB)/files; fi
49 (cd $(LLIB)/files; ar x ../files.a)
50
51morefiles:
52 -if test ! -r $(LLIB)/morefiles; then mkdir $(LLIB)/morefiles; fi
53 (cd $(LLIB)/morefiles; ar x ../morefiles.a)
54
55editor:
56 -if test ! -r $(LLIB)/editor; then mkdir $(LLIB)/editor; fi
57 (cd $(LLIB)/editor; ar x ../editor.a)
58
59macros:
60 -if test ! -r $(LLIB)/macros; then mkdir $(LLIB)/macros; fi
61 (cd $(LLIB)/macros; ar x ../macros.a)
62
63eqn:
64 -if test ! -r $(LLIB)/eqn; then mkdir $(LLIB)/eqn; fi
65 (cd $(LLIB)/eqn; ar x ../eqn.a)
66
67C:
68 -if test ! -r $(LLIB)/C; then mkdir $(LLIB)/C; fi
69 (cd $(LLIB)/C; ar x ../C.a)