1#
2#  This Makefile is designed to work on the old "make" program.  It does
3#  not use the obj subdirectory.  It also does not install documentation
4#  automatically -- think of it as a quick start for sites that have the
5#  old make program (I recommend that you get and port the new make if you
6#  are going to be doing any signficant work on sendmail).
7#
8#  This has been tested on Ultrix.
9#
10#	@(#)Makefile.dist	5.2 (Berkeley) 07/25/92
11#
12
13# use O=-O (usual) or O=-g (debugging)
14O=	-O
15
16# define the database mechanism used for alias lookups:
17#	-DDBM -- use old DBM
18#	-DDBM -DNDBM -- use new DBM
19#	-DNEWDB -- use new Berkeley DB
20#	-DDBM -DNDBM -DNEWDB -- use both new DBM and new Berkeley DB
21DBMDEF=	-DDBM -DNDBM -DNEWDB
22
23# define the load average calculation on your system: -DLA_TYPE=LA_INT,
24#   -DLA_TYPE=LA_FLOAT, -DLA_TYPE=LA_SUBR, or -DLA_TYPE=LA_ZERO
25# leave undefined to use internal guess
26#LADEF=	-DLA_TYPE=LA_SUBR
27
28# see also conf.h for additional compilation flags
29
30# include directories
31INCDIRS=-I/usr/sww/include/db
32
33# library directories
34LIBDIRS=-L/usr/sww/lib
35
36# libraries required on your system
37LIBS=	-ldb -ldbm
38
39# location of sendmail binary (usually /usr/sbin or /usr/lib)
40BINDIR=	${DESTDIR}/usr/sbin
41
42# location of sendmail.st file (usually /var/log or /usr/lib)
43STDIR=	${DESTDIR}/var/log
44
45# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
46HFDIR=	${DESTDIR}/usr/share/misc
47
48###################  end of user configuration flags  ######################
49
50CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${LADEF}
51
52OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
53	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
54	mci.o parseaddr.o queue.o readcf.o recipient.o \
55	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
56	trace.o udb.o usersmtp.o util.o version.o
57
58LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
59BINOWN=	root
60BINGRP=	kmem
61BINMODE=6555
62
63sendmail: ${OBJS}
64	${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
65
66aliases.0: aliases.5
67	nroff -h -man aliases.5 > aliases.0
68
69newaliases.0: newaliases.1
70	nroff -h -man newaliases.1 > newaliases.0
71
72sendmail.0: sendmail.8
73	nroff -h -man sendmail.8 > sendmail.0
74
75install: install-sendmail install-docs
76
77install-sendmail: sendmail
78	install -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
79	for i in ${LINKS}; do; rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
80	install -c -o ${BINOWN} -g ${BINGRP} -m 666 /dev/null \
81	    ${STDIR}/sendmail.st
82	install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
83
84# doesn't actually install them -- you may want to install pre-nroff versions
85install-docs: aliases.0 newaliases.0 sendmail.0
86
87# dependencies
88#   gross overkill, and yet still not quite enough....
89${OBJS}: sendmail.h conf.h
90