166274Seric#
266274Seric#  This Makefile is designed to work on the old "make" program.  It does
366274Seric#  not use the obj subdirectory.  It also does not install documentation
466274Seric#  automatically -- think of it as a quick start for sites that have the
566274Seric#  old make program (I recommend that you get and port the new make if you
666274Seric#  are going to be doing any signficant work on sendmail).
766274Seric#
866274Seric#	This has been tested on Ultrix 4.2A and 4.3A.
966274Seric#
10*69943Seric#	@(#)Makefile.ULTRIX	8.10 (Berkeley) 06/20/95
1166274Seric#
1266274Seric
1366274Seric# use O=-O (usual) or O=-g (debugging)
1466274SericO=	-O
1566274Seric
1669564Seric# native compiler requires -Olimit to optimize properly
1769564SericCC=	cc -Olimit 900
1869564Seric
1966274Seric# define the database mechanisms available for map & alias lookups:
2066274Seric#	-DNDBM -- use new DBM
2166274Seric#	-DNEWDB -- use new Berkeley DB
2266274Seric#	-DNIS -- include NIS support
2366274Seric# The really old (V7) DBM library is no longer supported.
2466274Seric# See READ_ME for a description of how these flags interact.
2566274Seric#
2666274SericDBMDEF=	-DNDBM -DNEWDB -DNIS
2766274Seric
2866274Seric# environment definitions (e.g., -D_AIX3)
2969278Seric# On Ultrix 4.4 and later, you can set IDENTPROTO=1.
3069564SericENVDEF=	-DIDENTPROTO=0
3166274Seric
3266274Seric# see also conf.h for additional compilation flags
3366274Seric
3466274Seric# include directories
3568530SericINCDIRS=-I/usr/sww/include
3666274Seric
3766274Seric# loader options
3866274SericLDOPTS=
3966274Seric
4066274Seric# library directories
4166274SericLIBDIRS=-L/usr/sww/lib
4266274Seric
4366274Seric# libraries required on your system
4468530Seric#  delete -lresolv and -l44bsd if you are not running BIND 4.9.x
4568530SericLIBS=	-ldb -lresolv -l44bsd
4666274Seric
4766274Seric# location of sendmail binary (usually /usr/sbin or /usr/lib)
4866274SericBINDIR=	${DESTDIR}/usr/lib
4966274Seric
5066274Seric# location of sendmail.st file (usually /var/log or /usr/lib)
5166274SericSTDIR=	${DESTDIR}/var/log
5266274Seric
5366274Seric# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
5466274SericHFDIR=	${DESTDIR}/usr/lib
5566274Seric
5666274Seric# additional .o files needed
5766274SericOBJADD=
5866274Seric
5966274Seric###################  end of user configuration flags  ######################
6066274Seric
6166274SericCFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
6266274Seric
6366274SericOBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
6466274Seric	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
6567546Seric	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
6666274Seric	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
6766274Seric	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
6866274Seric
6966274SericLINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
7066274SericBINOWN=	root
7166274SericBINGRP=	kmem
7266274SericBINMODE=6555
7366274Seric
7466274SericALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
7566274Seric
7666274Sericall: ${ALL}
7766274Seric
7866274Sericsendmail: ${BEFORE} ${OBJS}
7966274Seric	${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
8066274Seric
8168774Seric#NROFF=	nroff -h
8268774SericNROFF=	groff -Tascii
8368774SericMANDOC=	-mandoc
8466741Seric
8566274Sericaliases.0: aliases.5
8668774Seric	${NROFF} ${MANDOC} aliases.5 > aliases.0
8766274Seric
8866274Sericmailq.0: mailq.1
8968774Seric	${NROFF} ${MANDOC} mailq.1 > mailq.0
9066274Seric
9166274Sericnewaliases.0: newaliases.1
9268774Seric	${NROFF} ${MANDOC} newaliases.1 > newaliases.0
9366274Seric
9466274Sericsendmail.0: sendmail.8
9568774Seric	${NROFF} ${MANDOC} sendmail.8 > sendmail.0
9666274Seric
9766274Sericinstall: install-sendmail install-docs
9866274Seric
9966274Sericinstall-sendmail: sendmail
10066274Seric	install -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
10166274Seric	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
10266274Seric	install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
10366274Seric	    ${STDIR}/sendmail.st
10466274Seric	install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
10566274Seric
10666274Seric# doesn't actually install them -- you may want to install pre-nroff versions
10766314Sericinstall-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
10866274Seric
10966274Sericclean:
11066314Seric	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
11166274Seric
11266274Seric# dependencies
11366274Seric#   gross overkill, and yet still not quite enough....
11466274Seric${OBJS}: sendmail.h conf.h
115*69943Seric
116*69943Sericdepend:
117