Commit | Line | Data |
---|---|---|
7aa40f92 | 1 | # |
ba710df4 KB |
2 | # Copyright (c) 1987 Regents of the University of California. |
3 | # All rights reserved. The Berkeley software License Agreement | |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
b0998160 | 6 | # @(#)Makefile 4.9 (Berkeley) %G% |
ba710df4 KB |
7 | # |
8 | # Flag BSD4_2 means 4.2 or later. | |
9 | CFLAGS= -O -DBSD4_2 | |
10 | LIBC= /lib/libc.a | |
11 | LLIB= ${DESTDIR}/usr/lib/learn/bin | |
12 | SRCS= copy.c dounit.c getlesson.c learn.c list.c mem.c makpipe.c maktee.c \ | |
13 | mysys.c selsub.c selunit.c start.c whatnow.c wrapup.c | |
14 | OBJS= copy.o dounit.o getlesson.o learn.o list.o mem.o makpipe.o maktee.o \ | |
15 | mysys.o selsub.o selunit.o start.o whatnow.o wrapup.o | |
7aa40f92 | 16 | |
af33acf0 | 17 | all: learn lrntee lcount getline.o getnum.o |
7aa40f92 | 18 | |
ba710df4 KB |
19 | learn: ${OBJS} ${LIBC} |
20 | ${CC} -o $@ ${CFLAGS} ${OBJS} | |
7aa40f92 | 21 | |
ba710df4 KB |
22 | lcount: lcount.c ${LIBC} |
23 | ${CC} ${CFLAGS} -o $@ lcount.c | |
f9a082f0 | 24 | |
ba710df4 KB |
25 | lrntee: lrntee.c ${LIBC} |
26 | ${CC} ${CFLAGS} -o $@ lrntee.c | |
7aa40f92 | 27 | |
ba710df4 | 28 | clean: FRC |
af33acf0 | 29 | rm -f ${OBJS} core learn lrntee lcount getline.o getnum.o |
f9a082f0 | 30 | |
ba710df4 | 31 | depend: FRC |
af33acf0 | 32 | mkdep ${CFLAGS} ${SRCS} lcount.c lrntee.c getline.c getnum.c |
7aa40f92 | 33 | |
ba710df4 KB |
34 | install: FRC |
35 | install -c -s -o bin -g bin -m 755 learn ${DESTDIR}/usr/bin/learn | |
36 | install -s -o bin -g bin -m 755 learn ${LLIB}/learn | |
37 | install -s -o bin -g bin -m 755 lrntee ${LLIB}/lrntee | |
38 | install -s -o bin -g bin -m 755 lcount ${LLIB}/lcount | |
af33acf0 JK |
39 | install -o bin -g bin -m 644 getline.o ${LLIB}/getline.o |
40 | install -o bin -g bin -m 644 getnum.o ${LLIB}/getnum.o | |
41 | cd ${LLIB}; rm -f ../C/get*.o; ln getline.o getnum.o ../C | |
b0998160 KB |
42 | install -c -o bin -g bin -m 644 getline.c ${LLIB}/../C/getline.c |
43 | install -c -o bin -g bin -m 644 getnum.c ${LLIB}/../C/getnum.c | |
b1077c94 | 44 | chmod 755 ${LLIB}/../*/Init |
7aa40f92 | 45 | |
ba710df4 KB |
46 | lint: FRC |
47 | lint ${CFLAGS} ${SRCS} | |
48 | lint ${CFLAGS} lcount.c | |
49 | lint ${CFLAGS} lrntee.c | |
af33acf0 | 50 | lint ${CFLAGS} getline.c getnum.c |
7aa40f92 | 51 | |
ba710df4 KB |
52 | tags: FRC |
53 | ctags ${SRCS} | |
54 | ctags -a lcount.c | |
55 | ctags -a lrntee.c | |
af33acf0 | 56 | ctags -a getline.c getnum.c |
ba710df4 | 57 | sort -o tags tags |
7aa40f92 | 58 | |
ba710df4 | 59 | FRC: |
7aa40f92 | 60 | |
ba710df4 KB |
61 | # DO NOT DELETE THIS LINE -- mkdep uses it. |
62 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
7aa40f92 | 63 | |
ba710df4 KB |
64 | copy.o: copy.c /usr/include/stdio.h /usr/include/signal.h lrnref.h |
65 | dounit.o: dounit.c /usr/include/stdio.h lrnref.h | |
66 | getlesson.o: getlesson.c /usr/include/stdio.h lrnref.h | |
67 | learn.o: learn.c /usr/include/stdio.h lrnref.h /usr/include/signal.h | |
68 | list.o: list.c /usr/include/stdio.h lrnref.h /usr/include/signal.h | |
69 | mem.o: mem.c /usr/include/stdio.h lrnref.h | |
70 | makpipe.o: makpipe.c /usr/include/stdio.h | |
71 | maktee.o: maktee.c /usr/include/stdio.h /usr/include/signal.h lrnref.h | |
72 | mysys.o: mysys.c /usr/include/stdio.h /usr/include/signal.h | |
73 | selsub.o: selsub.c /usr/include/stdio.h /usr/include/sys/types.h | |
74 | selsub.o: /usr/include/sys/stat.h lrnref.h /usr/include/sys/dir.h | |
75 | selunit.o: selunit.c /usr/include/stdio.h lrnref.h | |
76 | start.o: start.c /usr/include/stdio.h lrnref.h /usr/include/sys/types.h | |
77 | start.o: /usr/include/sys/dir.h | |
78 | whatnow.o: whatnow.c /usr/include/stdio.h lrnref.h | |
79 | wrapup.o: wrapup.c /usr/include/signal.h /usr/include/stdio.h lrnref.h | |
80 | lcount.o: lcount.c /usr/include/stdio.h | |
81 | lrntee.o: lrntee.c | |
a8629c9c | 82 | |
ba710df4 | 83 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |