xref: /original-bsd/old/eqn/eqn/Makefile (revision 9eb838fd)
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	5.3 (Berkeley) 10/25/88
18#
19COMMON=	../common_source
20CFLAGS=	-O -I. -I${COMMON}
21YFLAGS=	-d
22VPATH=	${COMMON}
23LIBC=	/lib/libc.a
24SRCS=	e.c diacrit.c eqnbox.c font.c fromto.c funny.c glob.c integral.c \
25	io.c lex.c lookup.c mark.c matrix.c move.c over.c paren.c pile.c \
26	shift.c size.c sqrt.c text.c
27OBJS=	e.o diacrit.o eqnbox.o font.o fromto.o funny.o glob.o integral.o \
28	io.o lex.o lookup.o mark.o matrix.o move.o over.o paren.o pile.o \
29	shift.o size.o sqrt.o text.o
30MAN=	eqn.0
31
32all: eqn
33
34eqn: ${OBJS} ${LIBC}
35	${CC} -o $@ ${CFLAGS} ${OBJS}
36
37eqn.0:
38	eqn eqn.1 | nroff -h -man > $@
39
40e.c: ${COMMON}/e.y
41	${YACC} ${YFLAGS} ${COMMON}/e.y
42	mv y.tab.h e.def
43	mv y.tab.c e.c
44
45clean:
46	rm -f ${OBJS} core e.def e.c eqn
47
48cleandir: clean
49	rm -f ${MAN} tags .depend
50
51depend: ${SRCS}
52	mkdep ${CFLAGS} ${SRCS}
53
54install: ${MAN}
55	install -s -o bin -g bin -m 755 eqn ${DESTDIR}/usr/bin
56	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
57	rm -f ${DESTDIR}/usr/man/cat1/checkeq.0
58	rm -f ${DESTDIR}/usr/man/cat1/neqn.0
59	ln ${DESTDIR}/usr/man/cat1/eqn.0 ${DESTDIR}/usr/man/cat1/checkeq.0
60	ln ${DESTDIR}/usr/man/cat1/eqn.0 ${DESTDIR}/usr/man/cat1/neqn.0
61
62lint: ${SRCS}
63	lint ${CFLAGS} ${SRCS}
64
65tags: ${SRCS}
66	ctags ${SRCS}
67