Commit | Line | Data |
---|---|---|
bbddffb1 TL |
1 | LESSONS = files editor morefiles macros eqn C |
2 | ||
3 | FILES = 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 | ||
10 | OBJECTS = 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 | ||
14 | CFLAGS = -O | |
15 | LIBRARY = | |
16 | LLIB = /usr/lib/learn | |
17 | ||
18 | cp: 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 | ||
25 | cmp: all | |
26 | cmp learn /bin/learn | |
27 | cmp tee $(LLIB)/tee | |
28 | cmp lcount $(LLIB)/lcount | |
29 | rm learn tee lcount *.o | |
30 | ||
31 | all: learn tee lcount | |
32 | ||
33 | learn: $(OBJECTS) | |
34 | cc -n -s -o learn $(CFLAGS) $(OBJECTS) $(LIBRARY) | |
35 | ||
36 | $(OBJECTS): lrnref | |
37 | learn.o: lrndef | |
38 | ||
39 | tee: | |
40 | cc $(CFLAGS) -s -n tee.c -o tee $(LIBRARY) | |
41 | ||
42 | lcount: | |
43 | cc $(CFLAGS) -s -n lcount.c -o lcount $(LIBRARY) | |
44 | ||
45 | lessons: $(LESSONS) | |
46 | ||
47 | files: | |
48 | -if test ! -r $(LLIB)/files; then mkdir $(LLIB)/files; fi | |
49 | (cd $(LLIB)/files; ar x ../files.a) | |
50 | ||
51 | morefiles: | |
52 | -if test ! -r $(LLIB)/morefiles; then mkdir $(LLIB)/morefiles; fi | |
53 | (cd $(LLIB)/morefiles; ar x ../morefiles.a) | |
54 | ||
55 | editor: | |
56 | -if test ! -r $(LLIB)/editor; then mkdir $(LLIB)/editor; fi | |
57 | (cd $(LLIB)/editor; ar x ../editor.a) | |
58 | ||
59 | macros: | |
60 | -if test ! -r $(LLIB)/macros; then mkdir $(LLIB)/macros; fi | |
61 | (cd $(LLIB)/macros; ar x ../macros.a) | |
62 | ||
63 | eqn: | |
64 | -if test ! -r $(LLIB)/eqn; then mkdir $(LLIB)/eqn; fi | |
65 | (cd $(LLIB)/eqn; ar x ../eqn.a) | |
66 | ||
67 | C: | |
68 | -if test ! -r $(LLIB)/C; then mkdir $(LLIB)/C; fi | |
69 | (cd $(LLIB)/C; ar x ../C.a) |