166270Seric#
266270Seric#  This Makefile is designed to work on the old "make" program.  It does
366270Seric#  not use the obj subdirectory.  It also does not install documentation
466270Seric#  automatically -- think of it as a quick start for sites that have the
566270Seric#  old make program (I recommend that you get and port the new make if you
666270Seric#  are going to be doing any signficant work on sendmail).
766270Seric#
866270Seric#	For Sequent DYNIX/ptx.
966270Seric#
1066270Seric#	From Tim "Pinball Wizard" Wright <timw@sequent.com>.
1166270Seric#
12*69943Seric#	@(#)Makefile.PTX	8.7 (Berkeley) 06/20/95
1366270Seric#
1466270Seric
1566270Seric# use O=-O (usual) or O=-g (debugging)
1666270SericO=	-g
1766270Seric
1866270Seric# define the database mechanisms available for map & alias lookups:
1966270Seric#	-DNDBM -- use new DBM
2066270Seric#	-DNEWDB -- use new Berkeley DB
2166270Seric#	-DNIS -- include NIS support
2266270Seric# The really old (V7) DBM library is no longer supported.
2366270Seric# See READ_ME for a description of how these flags interact.
2466270Seric#
2566270SericDBMDEF=	-DNDBM
2666270Seric
2766270Seric# environment definitions (e.g., -D_AIX3)
2866270SericENVDEF=
2966270Seric
3066270Seric# see also conf.h for additional compilation flags
3166270Seric
3266270Seric# include directories
3368530Seric#INCDIRS=-I/usr/sww/include
3466270SericINCDIRS=
3566270Seric
3666270Seric# loader options
3766270SericLDOPTS=
3866270Seric
3966270Seric# library directories
4066270Seric#LIBDIRS=-L/usr/sww/lib
4166270SericLIBDIRS=
4266270Seric
4366270Seric# libraries required on your system
4466270Seric#LIBS=	-ldb -ldbm
4566270SericLIBS=	-lsocket -linet -lnsl -lseq
4666270Seric
4766270Seric# location of sendmail binary (usually /usr/sbin or /usr/lib)
4866270SericBINDIR=	${DESTDIR}/usr/lib
4966270Seric
5066270Seric# location of sendmail.st file (usually /var/log or /usr/lib)
5166270SericSTDIR=	${DESTDIR}/usr/lib
5266270Seric
5366270Seric# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
5466270SericHFDIR=	${DESTDIR}/usr/lib
5566270Seric
5666270Seric# additional .o files needed
5766270SericOBJADD=
5866270Seric
5966270Seric###################  end of user configuration flags  ######################
6066270Seric
6166270SericCFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
6266270Seric
6366270SericOBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
6466270Seric	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 \
6666270Seric	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
6766270Seric	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
6866270Seric
6966270SericLINKS=	${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq
7066270SericBINOWN=	root
7166270SericBINGRP=	sys
7266270SericBINMODE=6555
7366270Seric
7466270SericALL=	sendmail aliases.0 newaliases.0 sendmail.0
7566270Seric
7666270Sericall: ${ALL}
7766270Seric
7866270Sericsendmail: $& ${BEFORE} ${OBJS}
7966270Seric	${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
8066270Seric
8168774Seric#NROFF=	nroff -h
8268774SericNROFF=	groff -Tascii
8368774SericMANDOC=	-mandoc
8466741Seric
8566270Sericaliases.0: aliases.5
8668774Seric	${NROFF} ${MANDOC} aliases.5 > aliases.0
8766270Seric
8866741Sericmailq.0: mailq.1
8968774Seric	${NROFF} ${MANDOC} mailq.1 > mailq.0
9066741Seric
9166270Sericnewaliases.0: newaliases.1
9268774Seric	${NROFF} ${MANDOC} newaliases.1 > newaliases.0
9366270Seric
9466270Sericsendmail.0: sendmail.8
9568774Seric	${NROFF} ${MANDOC} sendmail.8 > sendmail.0
9666270Seric
9766270SericINSTALL=install
9866270Seric
9966270Sericinstall: install-sendmail install-docs
10066270Seric
10166270Sericinstall-sendmail: sendmail
10266270Seric	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
10366270Seric	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
10466270Seric	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
10566270Seric	    ${STDIR}/sendmail.st
10666270Seric	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
10766270Seric
10866270Seric# doesn't actually install them -- you may want to install pre-nroff versions
10966314Sericinstall-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
11066270Seric
11166270Sericclean:
11266314Seric	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
11366270Seric
11466270Seric# dependencies
11566270Seric#   gross overkill, and yet still not quite enough....
11666270Seric${OBJS}: sendmail.h conf.h
117*69943Seric
118*69943Sericdepend:
119