xref: /original-bsd/usr.bin/mail/Makefile (revision dfa70498)
1#
2# Copyright (c) 1987 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.13 (Berkeley) 05/11/89
18#
19CFLAGS=	-O -R -DUSE_OLD_TTY
20LIBC=	/lib/libc.a
21SRCS=	version.c aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \
22	getname.c head.c v7.local.c lex.c list.c main.c names.c popen.c \
23	quit.c send.c strings.c temp.c tty.c vars.c
24OBJS=	version.o aux.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o edit.o fio.o \
25	getname.o head.o v7.local.o lex.o list.o main.o names.o popen.o \
26	quit.o send.o strings.o temp.o tty.o vars.o flsbuf.o
27FSRCS=	fmt.c head.c
28FOBJS=	fmt.o head.o
29FILES=	Mail.help Mail.rc Mail.tildehelp
30MAN=	mail.0 fmt.0
31
32all: mail fmt
33
34mail: ${OBJS} ${LIBC}
35	${CC} -o $@ ${OBJS}
36
37fmt: ${FOBJS} ${LIBC}
38	${CC} -o $@ ${FOBJS}
39
40clean:
41	rm -f ${FOBJS} ${OBJS} mail a.out fmt core
42
43cleandir: clean
44	rm -f ${MAN} tags .depend
45
46depend:
47	mkdep fmt.c ${SRCS}
48
49install: ${MAN}
50	install -s -o bin -g bin -m 755 mail ${DESTDIR}/usr/bin
51	install -s -o bin -g bin -m 755 fmt ${DESTDIR}/usr/bin
52	cd misc; install -c -o bin -g bin -m 444 ${FILES} \
53	    ${DESTDIR}/usr/share/misc
54	rm -f ${DESTDIR}/usr/bin/Mail
55	ln ${DESTDIR}/usr/bin/mail ${DESTDIR}/usr/bin/Mail
56	install -c -o bin -g bin -m 444 mail.0 fmt.0 ${DESTDIR}/usr/man/cat1
57	rm -f ${DESTDIR}/usr/man/cat1/Mail.0
58	ln ${DESTDIR}/usr/man/cat1/mail.0 ${DESTDIR}/usr/man/cat1/Mail.0
59
60lint:
61	lint ${CFLAGS} ${SRCS}
62	lint ${CFLAGS} fmt.c head.c
63
64tags:
65	ctags ${SRCS}
66	ctags -a fmt.c
67	sort -o tags tags
68