xref: /csrg-svn/usr.sbin/sendmail/src/Makefile (revision 35648)
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.6 (Berkeley) 09/20/88
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
28
29CFLAGS=	-O -I. -I../include -DVMUNIX -DMXDOMAIN
30ASMSED=	../include/asm.sed.${MACHINE}
31
32GET=	sccs get
33DELTA=	sccs delta
34WHAT=	what
35PRT=	sccs prt
36
37.c.o:
38	cc -S ${CFLAGS} $*.c
39	sed -f ${ASMSED} $*.s | as -o $*.o
40	rm -f $*.s
41
42sendmail: ${OBJS} Version.o
43	${CC} ${COPTS} -o $@ Version.o ${OBJS} -ldbm
44	size sendmail; ls -l sendmail; ${WHAT} < Version.o
45
46dsendmail: ${OBJS} Version.o
47	${CC} ${COPTS} -o sendmail Version.o ${OBJS} -ldbm -lresolv
48	size sendmail; ls -l sendmail; ${WHAT} < Version.o
49
50install: ${MAN}
51	install -c -s -o root -g kmem -m 6755 sendmail ${DESTDIR}/usr/lib
52	install -c -o bin -g bin -m 644 /dev/null ${DESTDIR}/usr/lib/sendmail.fc
53	install -c -o bin -g bin -m 666 /dev/null ${DESTDIR}/usr/lib/sendmail.st
54	install -c -o bin -g bin -m 444 sendmail.0 ${DESTDIR}/usr/man/cat8
55	rm -f ${DESTDIR}/usr/ucb/newaliases
56	ln -s ${DESTDIR}/usr/lib/sendmail ${DESTDIR}/usr/ucb/newaliases
57	rm -f ${DESTDIR}/usr/ucb/mailq
58	ln -s ${DESTDIR}/usr/lib/sendmail ${DESTDIR}/usr/ucb/mailq
59
60version: newversion ${OBJS} Version.c
61
62newversion:
63	@rm -f SCCS/p.version.c version.c
64	@${GET} -e SCCS/s.version.c
65	@${DELTA} -s SCCS/s.version.c
66	@${GET} -t -s SCCS/s.version.c
67
68Version.c: version.c
69	@echo generating Version.c from version.c
70	@cp version.c Version.c
71	@chmod 644 Version.c
72	@echo "" >> Version.c
73	@echo "# ifdef COMMENT" >> Version.c
74	@${PRT} SCCS/s.version.c >> Version.c
75	@echo "" >> Version.c
76	@echo "code versions:" >> Version.c
77	@echo "" >> Version.c
78	@${WHAT} ${OBJS} >> Version.c
79	@echo "" >> Version.c
80	@echo "# endif COMMENT" >> Version.c
81
82clean: ${SRCS}
83	rm -f ${OBJS} core sendmail a.out Version.o
84
85cleandir: clean
86	rm -f ${MAN} tags .depend
87
88depend: ${SRCS}
89	mkdep ${CFLAGS} ${SRCS}
90
91tags: ${SRCS}
92	ctags ${SRCS}
93
94lint: ${SRCS}
95	lint -chapbx ${CCONFIG} ${SRCS}
96