xref: /original-bsd/usr.sbin/sendmail/src/Makefile (revision da818fbb)
1#
2# Copyright (c) 1988 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.16 (Berkeley) 04/29/90
18#
19SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
20	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
21	parseaddr.c queue.c readcf.c recipient.c savemail.c srvrsmtp.c \
22	stab.c stats.c sysexits.c trace.c usersmtp.c util.c Version.c
23OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
24	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
25	parseaddr.o queue.o readcf.o recipient.o savemail.o srvrsmtp.o \
26	stab.o stats.o sysexits.o trace.o usersmtp.o util.o
27MAN=	sendmail.0 newaliases.0 aliases.0
28
29CFLAGS=	-O -I. -DVMUNIX
30
31GET=	sccs get
32DELTA=	sccs delta
33WHAT=	what
34PRT=	sccs prt
35
36all: sendmail
37
38sendmail: ${OBJS} Version.o
39	${CC} -o $@ Version.o ${OBJS} -ldbm -lcompat -lutil
40	size sendmail; ls -l sendmail; ${WHAT} < Version.o
41
42dsendmail: ${OBJS} Version.o
43	${CC} -g -o sendmail Version.o ${OBJS} -ldbm -lresolv
44	size sendmail; ls -l sendmail; ${WHAT} < Version.o
45
46install: ${MAN}
47	install -c -o root -g kmem -m 6755 sendmail ${DESTDIR}/usr/sbin
48	install -c -o bin -g bin -m 644 /dev/null ${DESTDIR}/etc/sendmail.fc
49	install -c -o bin -g bin -m 666 /dev/null ${DESTDIR}/var/log/sendmail.st
50	install -c -o bin -g bin -m 444 sendmail.hf /usr/share/misc
51	install -c -o bin -g bin -m 444 sendmail.0 ${DESTDIR}/usr/man/cat8
52	install -c -o bin -g bin -m 444 aliases.0 ${DESTDIR}/usr/man/cat5
53	install -c -o bin -g bin -m 444 newaliases.0 ${DESTDIR}/usr/man/cat1
54	-mkdir ${DESTDIR}/var/spool/mqueue
55	chown root.wheel ${DESTDIR}/var/spool/mqueue
56	chmod 775 ${DESTDIR}/var/spool/mqueue
57	rm -f ${DESTDIR}/usr/bin/newaliases
58	ln -s ${DESTDIR}/usr/sbin/sendmail ${DESTDIR}/usr/bin/newaliases
59	rm -f ${DESTDIR}/usr/bin/mailq
60	ln -s ${DESTDIR}/usr/sbin/sendmail ${DESTDIR}/usr/bin/mailq
61
62version: newversion ${OBJS} Version.c
63
64newversion:
65	@rm -f SCCS/p.version.c version.c
66	@${GET} -e SCCS/s.version.c
67	@${DELTA} -s SCCS/s.version.c
68	@${GET} -t -s SCCS/s.version.c
69
70Version.c: version.c
71	@echo generating Version.c from version.c
72	@cp version.c Version.c
73	@chmod 644 Version.c
74	@echo "" >> Version.c
75	@echo "# ifdef COMMENT" >> Version.c
76	@${PRT} SCCS/s.version.c >> Version.c
77	@echo "" >> Version.c
78	@echo "code versions:" >> Version.c
79	@echo "" >> Version.c
80	@${WHAT} ${OBJS} >> Version.c
81	@echo "" >> Version.c
82	@echo "# endif COMMENT" >> Version.c
83
84clean:
85	rm -f ${OBJS} core sendmail a.out Version.o
86
87cleandir: clean
88	rm -f ${MAN} tags .depend
89
90depend:
91	mkdep ${CFLAGS} ${SRCS}
92
93tags:
94	ctags ${SRCS}
95
96lint: ${SRCS}
97	lint -chapbx ${CCONFIG} ${SRCS}
98