Commit | Line | Data |
---|---|---|
1c14ff4d | 1 | # @(#)Makefile 4.3 (Berkeley) 83/06/19 |
7aa40f92 KM |
2 | # |
3 | DESTDIR= | |
4 | ||
5 | LESSONS = files editor morefiles macros eqn C | |
6 | ||
7 | FILES = lrnref.h \ | |
f9a082f0 | 8 | copy.c dounit.c getlesson.c learn.c list.c \ |
7aa40f92 KM |
9 | makpipe.c maktee.c mem.c mysys.c selsub.c selunit.c \ |
10 | start.c whatnow.c wrapup.c \ | |
f9a082f0 | 11 | lcount.c lrntee.c \ |
7aa40f92 KM |
12 | makefile |
13 | ||
f9a082f0 | 14 | OBJECTS = copy.o dounit.o getlesson.o learn.o list.o mem.o \ |
7aa40f92 KM |
15 | makpipe.o maktee.o mysys.o selsub.o selunit.o \ |
16 | start.o whatnow.o wrapup.o | |
17 | ||
18 | CFLAGS = -O | |
19 | LIBRARY = | |
f9a082f0 KM |
20 | LLIB = $(DESTDIR)/usr/lib/learn/bin |
21 | ||
22 | all: learn lrntee lcount | |
7aa40f92 | 23 | |
7aa40f92 | 24 | install: all |
1c14ff4d | 25 | install -c -s learn $(DESTDIR)/usr/bin |
f9a082f0 KM |
26 | install -s learn $(LLIB) |
27 | install -s lrntee $(LLIB) | |
7aa40f92 | 28 | install -s lcount $(LLIB) |
f9a082f0 KM |
29 | |
30 | ccinstall: all | |
31 | cp learn lrntee lcount $(LLIB) | |
32 | chmod 755 $(LLIB)/* | |
33 | strip $(LLIB)/* | |
7aa40f92 KM |
34 | |
35 | clean: | |
f9a082f0 | 36 | rm -f *.o learn lrntee lcount errs |
7aa40f92 KM |
37 | |
38 | cmp: all | |
f9a082f0 KM |
39 | cmp learn $(DESTDIR)/usr/bin/learn |
40 | cmp learn $(LLIB)/learn | |
41 | cmp lrntee $(LLIB)/lrntee | |
7aa40f92 | 42 | cmp lcount $(LLIB)/lcount |
f9a082f0 | 43 | rm learn lrntee lcount *.o |
7aa40f92 KM |
44 | |
45 | learn: $(OBJECTS) | |
46 | cc -o learn $(CFLAGS) $(OBJECTS) $(LIBRARY) | |
47 | ||
48 | $(OBJECTS): lrnref.h | |
49 | ||
f9a082f0 | 50 | lcount lrntee: |
7aa40f92 KM |
51 | cc $(CFLAGS) $@.c -o $@ $(LIBRARY) |
52 | ||
f9a082f0 KM |
53 | log: |
54 | -rm -r $(LLIB)/../log; mkdir $(LLIB)/../log; chmod +w $(LLIB)/../log | |
7aa40f92 KM |
55 | |
56 | check: | |
f9a082f0 | 57 | -@test -r $(LLIB)/lrntee || echo 'lrntee not present; make lrntee' |
7aa40f92 | 58 | -@test -r $(LLIB)/lcount || echo 'lcount not present; make lcount' |
f9a082f0 | 59 | -@test -r $(LLIB)/../log || echo 'log directory not present; make log if you want logging' |