xref: /original-bsd/old/refer/Makefile (revision fbc8b8c6)
1#
2# Copyright (c) 1987 The Regents of the University of California.
3# All rights reserved.
4#
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.12 (Berkeley) 05/11/89
18#
19CFLAGS=	-O
20LIBC=	/lib/libc.a
21DLSRCS=	deliv1.c deliv2.c
22DLOBJS=	deliv1.o deliv2.o
23HTSRCS=	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
25HTOBJS=	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
27INSRCS=	inv1.c inv2.c inv3.c inv5.c inv6.c deliv2.c
28INOBJS=	inv1.o inv2.o inv3.o inv5.o inv6.o deliv2.o
29MKSRCS=	mkey1.c mkey2.c mkey3.c deliv2.c
30MKOBJS=	mkey1.o mkey2.o mkey3.o deliv2.o
31RFSRCS=	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
34RFOBJS=	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
37WHSRCS=	what1.c what2.c what3.c what4.c shell.c mkey3.c
38WHOBJS=	what1.o what2.o what3.o what4.o shell.o mkey3.o
39SRCS=	${DLSRCS} ${HTSRCS} ${INSRCS} ${MKSRCS} ${RFSRCS} ${WHSRCS}
40OBJS=	${DLOBJS} ${HTOBJS} ${INOBJS} ${MKOBJS} ${RFOBJS} ${WHOBJS} \
41	addbib.o lookbib.o sortbib.o
42MAN=	addbib.0 lookbib.0 refer.0 roffbib.0 sortbib.0
43
44all: addbib deliv hunt inv lookbib mkey refer sortbib whatabout
45
46addbib lookbib sortbib: ${LIBC}
47	${CC} ${CFLAGS} -o $@ $@.c
48
49deliv: ${DLOBJS} ${LIBC}
50	${CC} ${CFLAGS} ${DLOBJS} -o $@
51
52hunt: ${HTOBJS} ${LIBC}
53	${CC} ${CFLAGS} ${HTOBJS} -o $@
54
55inv: ${INOBJS} ${LIBC}
56	${CC} ${CFLAGS} ${INOBJS} -o $@
57
58mkey: ${MKOBJS} ${LIBC}
59	${CC} ${CFLAGS} ${MKOBJS} -o $@
60
61refer: ${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 $@
72
73whatabout: ${WHOBJS} ${LIBC}
74	${CC} ${CFLAGS} ${WHOBJS} -o $@
75
76clean:
77	rm -f ${OBJS} core addbib deliv hunt inv lookbib mkey refer \
78		refpart sortbib whatabout
79
80cleandir: clean
81	rm -f ${MAN} tags .depend
82
83depend: ${SRCS}
84	mkdep -p ${CFLAGS} addbib.c sortbib.c lookbib.c
85	mkdep ${CFLAGS} ${SRCS}
86
87install: ${MAN}
88	install -s -o bin -g bin -m 755 mkey inv hunt ${DESTDIR}/usr/libexec
89	install -s -o bin -g bin -m 755 addbib lookbib sortbib refer \
90		${DESTDIR}/usr/bin
91	install -c -o bin -g bin -m 755 roffbib.sh ${DESTDIR}/usr/bin/roffbib
92	install -c -o bin -g bin -m 755 indxbib.sh ${DESTDIR}/usr/bin/indxbib
93	install -c -o bin -g bin -m 755 tmac.bib ${DESTDIR}/usr/share/tmac
94	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
95	rm -f ${DESTDIR}/usr/man/cat1/indxbib.0
96	ln ${DESTDIR}/usr/man/cat1/lookbib.0 ${DESTDIR}/usr/man/cat1/indxbib.0
97	(cd /usr/share/dict/papers; runinv)
98
99lint: FRC
100	lint ${CFLAGS} ${DLSRCS}
101	lint ${CFLAGS} ${HTSRCS}
102	lint ${CFLAGS} ${INSRCS}
103	lint ${CFLAGS} ${MKSRCS}
104	lint ${CFLAGS} ${RFSRCS}
105#	lint ${CFLAGS} ${RPSRCS}
106	lint ${CFLAGS} ${WHSRCS}
107
108tags: FRC
109	ctags ${DLSRCS}
110	ctags -a ${HTSRCS}
111	ctags -a ${INSRCS}
112	ctags -a ${MKSRCS}
113	ctags -a ${RFSRCS}
114#	ctags -a ${RPSRCS}
115	ctags -a ${WHSRCS}
116	sort -o tags tags
117