Commit | Line | Data |
---|---|---|
b871160b | 1 | # |
74a91c86 KB |
2 | # Copyright (c) 1987 The Regents of the University of California. |
3 | # All rights reserved. | |
670bae64 | 4 | # |
74a91c86 KB |
5 | # Redistribution and use in source and binary forms are permitted |
6 | # provided that the above copyright notice and this paragraph are | |
7 | # duplicated in all such forms and that any documentation, | |
8 | # advertising materials, and other materials related to such | |
9 | # distribution and use acknowledge that the software was developed | |
10 | # by the University of California, Berkeley. The name of the | |
11 | # University may not be used to endorse or promote products derived | |
12 | # from this software without specific prior written permission. | |
13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
17 | # @(#)Makefile 4.11 (Berkeley) %G% | |
670bae64 | 18 | # |
a4ed7001 | 19 | CFLAGS= -O |
670bae64 KB |
20 | LIBC= /lib/libc.a |
21 | DLSRCS= deliv1.c deliv2.c | |
22 | DLOBJS= deliv1.o deliv2.o | |
23 | HTSRCS= deliv2.c glue4.c glue5.c hunt1.c hunt2.c hunt3.c hunt5.c hunt6.c \ | |
24 | hunt7.c hunt8.c hunt9.c refer3.c shell.c tick.c | |
25 | HTOBJS= deliv2.o glue4.o glue5.o hunt1.o hunt2.o hunt3.o hunt5.o hunt6.o \ | |
26 | hunt7.o hunt8.o hunt9.o refer3.o shell.o tick.o | |
27 | INSRCS= inv1.c inv2.c inv3.c inv5.c inv6.c deliv2.c | |
28 | INOBJS= inv1.o inv2.o inv3.o inv5.o inv6.o deliv2.o | |
29 | MKSRCS= mkey1.c mkey2.c mkey3.c deliv2.c | |
30 | MKOBJS= mkey1.o mkey2.o mkey3.o deliv2.o | |
31 | RFSRCS= deliv2.c glue1.c glue2.c glue3.c glue4.c glue5.c hunt2.c hunt3.c \ | |
32 | hunt5.c hunt6.c hunt7.c hunt8.c hunt9.c mkey3.c refer0.c refer1.c \ | |
33 | refer2.c refer4.c refer5.c refer6.c refer7.c refer8.c shell.c | |
34 | RFOBJS= deliv2.o glue1.o glue2.o glue3.o glue4.o glue5.o hunt2.o hunt3.o \ | |
35 | hunt5.o hunt6.o hunt7.o hunt8.o hunt9.o mkey3.o refer0.o refer1.o \ | |
36 | refer2.o refer4.o refer5.o refer6.o refer7.o refer8.o shell.o | |
37 | WHSRCS= what1.c what2.c what3.c what4.c shell.c mkey3.c | |
38 | WHOBJS= what1.o what2.o what3.o what4.o shell.o mkey3.o | |
74a91c86 KB |
39 | SRCS= ${DLSRCS} ${HTSRCS} ${INSRCS} ${MKSRCS} ${RFSRCS} ${WHSRCS} |
40 | OBJS= ${DLOBJS} ${HTOBJS} ${INOBJS} ${MKOBJS} ${RFOBJS} ${WHOBJS} \ | |
41 | addbib.o lookbib.o sortbib.o | |
42 | MAN= addbib.0 lookbib.0 refer.0 roffbib.0 sortbib.0 | |
670bae64 | 43 | |
74a91c86 | 44 | all: addbib deliv hunt inv lookbib mkey refer sortbib whatabout |
b871160b | 45 | |
74a91c86 KB |
46 | addbib lookbib sortbib: ${LIBC} |
47 | ${CC} ${CFLAGS} -o $@ $@.c | |
b871160b | 48 | |
670bae64 KB |
49 | deliv: ${DLOBJS} ${LIBC} |
50 | ${CC} ${CFLAGS} ${DLOBJS} -o $@ | |
0c13beff | 51 | |
670bae64 KB |
52 | hunt: ${HTOBJS} ${LIBC} |
53 | ${CC} ${CFLAGS} ${HTOBJS} -o $@ | |
0c13beff | 54 | |
670bae64 KB |
55 | inv: ${INOBJS} ${LIBC} |
56 | ${CC} ${CFLAGS} ${INOBJS} -o $@ | |
b871160b | 57 | |
670bae64 KB |
58 | mkey: ${MKOBJS} ${LIBC} |
59 | ${CC} ${CFLAGS} ${MKOBJS} -o $@ | |
0c13beff | 60 | |
670bae64 KB |
61 | refer: ${RFOBJS} ${LIBC} |
62 | ${CC} ${CFLAGS} ${RFOBJS} -o $@ | |
63 | ||
64 | # refpart doesn't compile | |
65 | # | |
66 | #RPSRCS= deliv2.c glue4.c glue5.c mkey3.c refer0.c refer1.c refer2.c \ | |
67 | # refer3.c refer4.c refer5.c refer6.c refer7.c refer8.c | |
68 | #RPOBJS= deliv2.o glue4.o glue5.o mkey3.o refer0.o refer1.o refer2.o \ | |
69 | # refer3.o refer4.o refer5.o refer6.o refer7.o refer8.o | |
70 | #refpart: ${RPOBJS} ${LIBC} | |
71 | # ${CC} ${CFLAGS} ${RPOBJS} -o $@ | |
0c13beff | 72 | |
670bae64 KB |
73 | whatabout: ${WHOBJS} ${LIBC} |
74 | ${CC} ${CFLAGS} ${WHOBJS} -o $@ | |
75 | ||
74a91c86 | 76 | clean: |
670bae64 KB |
77 | rm -f ${OBJS} core addbib deliv hunt inv lookbib mkey refer \ |
78 | refpart sortbib whatabout | |
79 | ||
74a91c86 KB |
80 | cleandir: clean |
81 | rm -f ${MAN} tags .depend | |
82 | ||
83 | depend: ${SRCS} | |
84 | mkdep -p ${CFLAGS} addbib.c sortbib.c lookbib.c | |
670bae64 KB |
85 | mkdep ${CFLAGS} ${SRCS} |
86 | ||
74a91c86 | 87 | install: ${MAN} |
c0118b03 | 88 | -[ -d ${DESTDIR}/usr/lib/refer ] || mkdir ${DESTDIR}/usr/lib/refer |
74a91c86 KB |
89 | install -s -o bin -g bin -m 755 mkey inv hunt ${DESTDIR}/usr/lib/refer |
90 | install -s -o bin -g bin -m 755 addbib lookbib sortbib refer \ | |
91 | ${DESTDIR}/usr/bin | |
670bae64 KB |
92 | install -c -o bin -g bin -m 755 roffbib.sh ${DESTDIR}/usr/bin/roffbib |
93 | install -c -o bin -g bin -m 755 indxbib.sh ${DESTDIR}/usr/bin/indxbib | |
94 | install -c -o bin -g bin -m 755 tmac.bib ${DESTDIR}/usr/lib/tmac | |
74a91c86 KB |
95 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 |
96 | rm -f ${DESTDIR}/usr/man/cat1/indxbib.0 | |
97 | ln ${DESTDIR}/usr/man/cat1/lookbib.0 ${DESTDIR}/usr/man/cat1/indxbib.0 | |
a4ed7001 | 98 | (cd /usr/dict/papers; /bin/sh runinv) |
0c13beff | 99 | |
670bae64 KB |
100 | lint: FRC |
101 | lint ${CFLAGS} ${DLSRCS} | |
102 | lint ${CFLAGS} ${HTSRCS} | |
103 | lint ${CFLAGS} ${INSRCS} | |
104 | lint ${CFLAGS} ${MKSRCS} | |
105 | lint ${CFLAGS} ${RFSRCS} | |
106 | # lint ${CFLAGS} ${RPSRCS} | |
107 | lint ${CFLAGS} ${WHSRCS} | |
108 | ||
109 | tags: FRC | |
110 | ctags ${DLSRCS} | |
111 | ctags -a ${HTSRCS} | |
112 | ctags -a ${INSRCS} | |
113 | ctags -a ${MKSRCS} | |
114 | ctags -a ${RFSRCS} | |
115 | # ctags -a ${RPSRCS} | |
116 | ctags -a ${WHSRCS} | |
117 | sort -o tags tags |