fix includes
[unix-history] / usr / src / usr.bin / learn / Makefile
CommitLineData
1c14ff4d 1# @(#)Makefile 4.3 (Berkeley) 83/06/19
7aa40f92
KM
2#
3DESTDIR=
4
5LESSONS = files editor morefiles macros eqn C
6
7FILES = 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 14OBJECTS = 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
18CFLAGS = -O
19LIBRARY =
f9a082f0
KM
20LLIB = $(DESTDIR)/usr/lib/learn/bin
21
22all: learn lrntee lcount
7aa40f92 23
7aa40f92 24install: 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
30ccinstall: all
31 cp learn lrntee lcount $(LLIB)
32 chmod 755 $(LLIB)/*
33 strip $(LLIB)/*
7aa40f92
KM
34
35clean:
f9a082f0 36 rm -f *.o learn lrntee lcount errs
7aa40f92
KM
37
38cmp: 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
45learn: $(OBJECTS)
46 cc -o learn $(CFLAGS) $(OBJECTS) $(LIBRARY)
47
48$(OBJECTS): lrnref.h
49
f9a082f0 50lcount lrntee:
7aa40f92
KM
51 cc $(CFLAGS) $@.c -o $@ $(LIBRARY)
52
f9a082f0
KM
53log:
54 -rm -r $(LLIB)/../log; mkdir $(LLIB)/../log; chmod +w $(LLIB)/../log
7aa40f92
KM
55
56check:
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'