168438Seric#
268438Seric#  This Makefile is designed to work on the old "make" program.  It does
368438Seric#  not use the obj subdirectory.  It also does not install documentation
468438Seric#  automatically -- think of it as a quick start for sites that have the
568438Seric#  old make program (I recommend that you get and port the new make if you
668438Seric#  are going to be doing any signficant work on sendmail).
768438Seric#
868438Seric#       Should work with UNICOS 8.0. Note that you must also acquire
968438Seric#       gdbm, as UNICOS does not have ndbm, and I had no luck at all
1068438Seric#	getting the Berkeley DB package to compile.
1168438Seric#		Douglas K. Rand, University of North Dakota
1268438Seric#		rand@aero.und.nodak.edu
1368438Seric#
14*69943Seric#       @(#)Makefile.UNICOS	8.3	(Berkeley)	06/20/95
1568438Seric#
1668438Seric
1768438Seric# make sure the shell constructs below use the right shell
1868438SericSHELL=  /bin/sh
1968438Seric
2068438Seric# use O=-O (usual) or O=-g (debugging)
2168438SericO=      -O
2268438Seric
2368438Seric
2468438Seric# define the database mechanism used for alias lookups:
2568438Seric#       -DNDBM -- use new DBM
2668438Seric#       -DNEWDB -- use new Berkeley DB
2768438Seric#       -DNIS -- include NIS support
2868438Seric# The really old (V7) DBM library is no longer supported.
2968438Seric# See READ_ME for a description of how these flags interact.
3068438Seric#
3168438SericDBMDEF= -DNDBM
3268438Seric
3368438Seric# environment definitions (e.g., -D_AIX3)
3468438SericENVDEF= -DUNICOS
3568438Seric
3668438Seric# see also conf.h for additional compilation flags
3768438Seric
3868438Seric# include directories
3968438SericINCDIRS=-I/usr/local/include
4068438Seric
4168438Seric# library directories
4268438SericLIBDIRS=-L/usr/local/lib
4368438Seric
4468438Seric# libraries required on your system
4568438SericLIBS=-lgdbm
4668438Seric
4768438Seric# location of sendmail binary (usually /usr/sbin or /usr/lib)
4868438SericBINDIR= ${DESTDIR}/usr/lib
4968438Seric
5068438Seric# location of sendmail.st file (usually /var/log or /usr/lib)
5168438SericSTDIR=  ${DESTDIR}/etc/mail
5268438Seric
5368438Seric# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
5468438SericHFDIR=  ${DESTDIR}/etc/mail
5568438Seric
5668438Seric# additional .o files needed
5768438SericOBJADD=
5868438Seric
5968438Seric###################  end of user configuration flags  ######################
6068438Seric
6168438SericCFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
6268438Seric
6368438SericOBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
6468438Seric	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
6568438Seric	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
6668438Seric	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
6768438Seric	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
6868438Seric
6968438SericLINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
7068438SericBINOWN=	root
7168438SericBINGRP=	kmem
7268438SericBINMODE=6555
7368438Seric
7468438SericALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
7568438Seric
7668438Sericall: ${ALL}
7768438Seric
7868438Sericsendmail: ${BEFORE} ${OBJS}
7968438Seric	${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
8068438Seric
8168774Seric#NROFF=	nroff -h
8268774SericNROFF=	groff -Tascii
8368774SericMANDOC=	-mandoc
8468438Seric
8568438Sericaliases.0: aliases.5
8668774Seric	${NROFF} ${MANDOC} aliases.5 > aliases.0
8768438Seric
8868438Sericmailq.0: mailq.1
8968774Seric	${NROFF} ${MANDOC} mailq.1 > mailq.0
9068438Seric
9168438Sericnewaliases.0: newaliases.1
9268774Seric	${NROFF} ${MANDOC} newaliases.1 > newaliases.0
9368438Seric
9468438Sericsendmail.0: sendmail.8
9568774Seric	${NROFF} ${MANDOC} sendmail.8 > sendmail.0
9668438Seric
9768438SericINSTALL=install
9868438Seric
9968438Sericinstall: install-sendmail install-docs
10068438Seric
10168438Sericinstall-sendmail: sendmail
10268438Seric	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
10368438Seric	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
10468438Seric	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
10568438Seric	    ${STDIR}/sendmail.st
10668438Seric	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
10768438Seric
10868438Seric# doesn't actually install them -- you may want to install pre-nroff versions
10968438Sericinstall-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
11068438Seric
11168438Sericclean:
11268438Seric	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
11368438Seric
11468438Seric# dependencies
11568438Seric#   gross overkill, and yet still not quite enough....
11668438Seric${OBJS}: sendmail.h conf.h
117*69943Seric
118*69943Sericdepend:
119