166269Seric#
266269Seric#  This Makefile is designed to work on the old "make" program.  It does
366269Seric#  not use the obj subdirectory.  It also does not install documentation
466269Seric#  automatically -- think of it as a quick start for sites that have the
566269Seric#  old make program (I recommend that you get and port the new make if you
666269Seric#  are going to be doing any signficant work on sendmail).
766269Seric#
866269Seric#  This has been tested on NeXT 2.1.
966269Seric#
10*69943Seric#	@(#)Makefile.NeXT	8.9 (Berkeley) 06/20/95
1166269Seric#
1266269Seric
1366269Seric# use O=-O (usual) or O=-g (debugging)
1466269SericO=	-O
1566269Seric
1666269Seric# define the database mechanisms available for map & alias lookups:
1766269Seric#	-DNDBM -- use new DBM
1866269Seric#	-DNEWDB -- use new Berkeley DB
1966269Seric#	-DNIS -- include NIS support
2066269Seric# The really old (V7) DBM library is no longer supported.
2166269Seric# See READ_ME for a description of how these flags interact.
2266269Seric#
2369932SericDBMDEF=	-DNDBM -DNIS -DNETINFO
2469932Seric#DBMDEF=	-DNDBM -DNEWDB -DNIS -DNETINFO
2566269Seric
2666269Seric# environment definitions (e.g., -D_AIX3)
2767856SericENVDEF=	-DNeXT
2866269Seric
2966269Seric# see also conf.h for additional compilation flags
3066269Seric
3166269Seric# include directories
3269932SericINCDIRS=-I/usr/local/include
3366269Seric
3466269Seric# library directories
3566269SericLIBDIRS=-L/usr/local/lib
3666269Seric
3766269Seric# libraries required on your system
3866269SericLIBS=	-ldbm
3969932Seric#LIBS=	-ldbm -ldb
4066269Seric
4166269Seric# location of sendmail binary (usually /usr/sbin or /usr/lib)
4266269SericBINDIR=	${DESTDIR}/usr/lib
4366269Seric
4466269Seric# location of sendmail.st file (usually /var/log or /usr/lib)
4566269SericSTDIR=	${DESTDIR}/etc/sendmail
4666269Seric
4766269Seric# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
4866269SericHFDIR=	${DESTDIR}/usr/lib
4966269Seric
5066269Seric# additional .o files needed
5166269SericOBJADD=
5266269Seric
5366269Seric# additional pseudo-sources needed
5466269SericBEFORE=	unistd.h dirent.h
5566269Seric
5666269Seric###################  end of user configuration flags  ######################
5766269Seric
5869932SericCFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} ${COPTS}
5966269Seric
6066269SericOBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
6166269Seric	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
6267546Seric	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
6366269Seric	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
6466269Seric	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
6566269Seric
6666269SericLINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
6766269SericBINOWN=	root
6866269SericBINGRP=	kmem
6966269SericBINMODE=6555
7066269Seric
7166269SericALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
7266269Seric
7366269Sericall: ${ALL}
7466269Seric
7566269Sericsendmail: ${BEFORE} ${OBJS}
7666269Seric	${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
7766269Seric
7866269Sericunistd.h:
7966269Seric	cp /dev/null unistd.h
8066269Seric
8166269Sericdirent.h:
8266269Seric	echo "#include <sys/dir.h>" > dirent.h
8366269Seric	echo "#define dirent	direct" >> dirent.h
8466269Seric
8568774Seric#NROFF=	nroff -h
8668774SericNROFF=	groff -Tascii
8768774SericMANDOC=	-mandoc
8866741Seric
8966269Sericaliases.0: aliases.5
9068774Seric	${NROFF} ${MANDOC} aliases.5 > aliases.0
9166269Seric
9266269Sericmailq.0: mailq.1
9368774Seric	${NROFF} ${MANDOC} mailq.1 > mailq.0
9466269Seric
9566269Sericnewaliases.0: newaliases.1
9668774Seric	${NROFF} ${MANDOC} newaliases.1 > newaliases.0
9766269Seric
9866269Sericsendmail.0: sendmail.8
9968774Seric	${NROFF} ${MANDOC} sendmail.8 > sendmail.0
10066269Seric
10166269Sericinstall: install-sendmail install-docs
10266269Seric
10366269Sericinstall-sendmail: sendmail
10469932Seric	install -s -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
10566269Seric	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
10668770Seric	cp /dev/null  ${STDIR}/sendmail.st
10768770Seric	chown ${BINOWN}.${BINGRP} ${STDIR}/sendmail.st
10868770Seric	chmod 644 ${STDIR}/sendmail.st
10966269Seric	install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
11066269Seric
11166269Seric# doesn't actually install them -- you may want to install pre-nroff versions
11266314Sericinstall-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
11366269Seric
11466269Sericclean:
11566314Seric	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
11666269Seric
11766269Seric# dependencies
11866269Seric#   gross overkill, and yet still not quite enough....
11966269Seric${OBJS}: sendmail.h conf.h
120*69943Seric
121*69943Sericdepend:
122