169455Seric#
269455Seric#  This Makefile is designed to work on the old "make" program.  It does
369455Seric#  not use the obj subdirectory.  It also does not install documentation
469455Seric#  automatically -- think of it as a quick start for sites that have the
569455Seric#  old make program (I recommend that you get and port the new make if you
669455Seric#  are going to be doing any signficant work on sendmail).
769455Seric#
869455Seric#  This has been tested on NEC EWS-UX/V 4.2
969455Seric#
10*69943Seric#	@(#)Makefile.EWS-UX_V	8.3 (Berkeley) 06/20/95
1169455Seric#
1269455Seric
1369455Seric# use O=-O (usual) or O=-g (debugging)
1469455SericO=	-O
1569455Seric
1669455Seric# make sure that /bin/cc is used (do not use /usr/ucb/cc).
1769647Seric#CC=	/bin/cc
1869647SericCC=	/usr/abiccs/bin/cc
1969455Seric
2069455Seric# define the database mechanism used for alias lookups:
2169455Seric#	-DNDBM -- use new DBM
2269455Seric#	-DNEWDB -- use new Berkeley DB
2369455Seric#	-DNIS -- include NIS support
2469455Seric# The really old (V7) DBM library is no longer supported.
2569455Seric# See READ_ME for a description of how these flags interact.
2669455Seric#
2769455SericDBMDEF=	-DNDBM -DNIS
2869455Seric
2969455Seric# environment definitions (e.g., -D_AIX3)
3069647SericENVDEF=	-Dnec_ews_svr4 -KOlimit=900
3169455Seric
3269455Seric# see also conf.h for additional compilation flags
3369455Seric
3469455Seric# include directories
3569455SericINCDIRS=-I/usr/sww/include
3669455Seric
3769455Seric# library directories
3869455SericLIBDIRS=-L/usr/sww/lib
3969455Seric
4069455Seric# libraries required on your system
4169455Seric#  delete -l44bsd if you are not running BIND 4.9.x
4269455SericLIBS=	ndbm.o -lsocket -lnsl -lelf -lresolv # -l44bsd # with NDBM
4369455Seric#LIBS=	-lsocket -lnsl -lelf -ldb -lresolv # -l44bsd   # with NEWDB
4469455Seric
4569455Seric# location of sendmail binary (usually /usr/sbin or /usr/lib)
4669455SericBINDIR=	${DESTDIR}/usr/ucblib
4769455Seric
4869455Seric# location of sendmail.st file (usually /var/log or /usr/lib)
4969455SericSTDIR=	${DESTDIR}/var/ucblib
5069455Seric
5169455Seric# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
5269455SericHFDIR=	${DESTDIR}/var/ucblib
5369455Seric
5469455Seric# additional .o files needed
5569455SericOBJADD=
5669455Seric
5769455Seric# things to be made before compilation begins
5869455SericBEFORE=	sysexits.h ndbm.h ndbm.o
5969455Seric
6069455Seric###################  end of user configuration flags  ######################
6169455Seric
6269455SericCFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
6369455Seric
6469455SericOBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
6569455Seric	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
6669455Seric	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
6769455Seric	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
6869455Seric	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
6969455Seric
7069455SericLINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
7169455SericBINOWN=	root
7269455SericBINGRP=	sys
7369455SericBINMODE=6555
7469455SericINSTALL=/usr/ucb/install
7569455Seric
7669455SericALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
7769455Seric
7869455Sericall: ${ALL}
7969455Seric
8069455Sericsendmail: ${BEFORE} ${OBJS}
8169455Seric	${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
8269455Seric
8369455Sericsysexits.h:
8469647Seric	echo '#ifndef _LOCAL_SYSEXITS_H_' > sysexits.h;
8569647Seric	echo '#define _LOCAL_SYSEXITS_H_' >> sysexits.h;
8669647Seric	cat /usr/abiccs/ucbinclude/sysexits.h >> sysexits.h;
8769647Seric	echo '#endif /* _LOCAL_SYSEXITS_H_ */' >> sysexits.h;
8869647Seric#	ln -s /usr/abiccs/ucbinclude/sysexits.h .
8969455Seric
9069455Sericndbm.h:
9169647Seric	ln -s /usr/abiccs/ucbinclude/ndbm.h .
9269455Seric
9369455Sericndbm.o:
9469647Seric	ar x /usr/abiccs/ucblib/libucb.a ndbm.o
9569647Seric#	ar x /usr/ucblib/libucb.a ndbm.o
9669455Seric
9769647Seric#NROFF=	nroff -h
9869647SericNROFF=	groff -Tascii
9969647SericMANDOC=	-mandoc
10069455Seric
10169455Sericaliases.0: aliases.5
10269647Seric	${NROFF} ${MANDOC} aliases.5 > aliases.0
10369455Seric
10469455Sericmailq.0: mailq.1
10569647Seric	${NROFF} ${MANDOC} mailq.1 > mailq.0
10669455Seric
10769455Sericnewaliases.0: newaliases.1
10869647Seric	${NROFF} ${MANDOC} newaliases.1 > newaliases.0
10969455Seric
11069455Sericsendmail.0: sendmail.8
11169647Seric	${NROFF} ${MANDOC} sendmail.8 > sendmail.0
11269455Seric
11369455Sericinstall: install-sendmail install-docs
11469455Seric
11569455Sericinstall-sendmail: sendmail
11669455Seric	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
11769455Seric	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
11869455Seric	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
11969455Seric	    ${STDIR}/sendmail.st
12069455Seric	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
12169455Seric
12269455Seric# doesn't actually install them -- you may want to install pre-nroff versions
12369455Sericinstall-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
12469455Seric
12569455Sericclean:
12669455Seric	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
12769455Seric
12869455Seric# dependencies
12969455Seric#   gross overkill, and yet still not quite enough....
13069455Seric${OBJS}: sendmail.h conf.h
131*69943Seric
132*69943Sericdepend:
133