168102Seric# This Makefile is designed to work on the old "make" program. It does 268102Seric# not use the obj subdirectory. It also does not install documentation 368102Seric# automatically -- think of it as a quick start for sites that have the 468102Seric# old make program (I recommend that you get and port the new make if you 568102Seric# are going to be doing any signficant work on sendmail). 668102Seric# 768102Seric# Makefile for an Amdahl 5890 running UTS System V 2.1.5 (SVr3) 868102Seric# By Janet Jackson <janet@dialix.oz.au> 1994-11-24 968102Seric# This has been tested on (uname -a output) uts bsuts systemV 2.1.5 5890 1068102Seric# 11*69943Seric# @(#)Makefile.uts.systemV 8.4 (Berkeley) 06/20/95 1268102Seric# 1368102Seric 1468102Seric# Sendmail 8 on UTS requires BIND 4.9's include files and lib44bsd and 1568102Seric# libresolv libraries. The BIND version on UTS is much too old. 1668102Seric# 1768102SericBINDPATH=../../../bind 1868102Seric 1968102Seric# use O=-O (usual) or O=-g (debugging) 2068102SericO= -g 2168102Seric 2268102Seric# define the database mechanisms available for map & alias lookups: 2368102Seric# -DNDBM -- use new DBM 2468102Seric# -DNEWDB -- use new Berkeley DB 2568102Seric# -DNIS -- include NIS support 2668102Seric# The really old (V7) DBM library is no longer supported. 2768102Seric# See READ_ME for a description of how these flags interact. 2868102Seric# 2968102Seric# Getting NIS working on UTS is possible (I did it!) but awkward. 3068102Seric# And forget it unless you're behind some sort of a firewall. 3168102Seric# 3268102SericDBMDEF= -DNIS -DNDBM 3368102Seric 3468102Seric# environment definitions (e.g., -D_AIX3) 3568102SericENVDEF= -D_UTS 3668102Seric 3768102Seric# see also conf.h for additional compilation flags 3868102Seric 3968102Seric# include directories 4068102Seric# To find new BIND header files. This path assumes we are using "makesendmail". 4168102SericINCDIRS=-I${BINDPATH}/include -I${BINDPATH}/compat/include 4268102Seric 4368102Seric# loader options 4468102SericLDOPTS= 4568102Seric 4668102Seric# library directories 4768102Seric# To find new libresolv.a. This path assumes we are using "makesendmail". 4868102SericLIBDIRS=-L${BINDPATH}/res -L${BINDPATH}/compat/lib 4968102Seric 5068102Seric# libraries required on your system 5168102SericLIBS= -lyp -lrpc -lresolv -l44bsd -lbsd -lsocket -la 5268102Seric 5368102Seric# location of sendmail binary (usually /usr/sbin or /usr/lib) 5468102SericBINDIR= ${DESTDIR}/usr/lib 5568102Seric 5668102Seric# location of sendmail.st file (usually /var/log or /usr/lib) 5768102SericSTDIR= ${DESTDIR}/usr/lib 5868102Seric 5968102Seric# location of sendmail.hf file (usually /usr/share/misc or /usr/lib) 6068102SericHFDIR= ${DESTDIR}/usr/lib 6168102Seric 6268102Seric# additional .o files needed 6368102SericOBJADD= 6468102Seric 6568102Seric# things to do before compilation 6668102SericBEFORE= stddef.h 6768102Seric 6868102Seric################### end of user configuration flags ###################### 6968102Seric 7068102SericCFLAGS= -eft -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} 7168102Seric 7268102SericOBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \ 7368102Seric deliver.o domain.o envelope.o err.o headers.o macro.o main.o \ 7469848Seric map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \ 7568102Seric savemail.o srvrsmtp.o stab.o stats.o sysexits.o \ 7668102Seric trace.o udb.o usersmtp.o util.o version.o ${OBJADD} 7768102Seric 7868102SericLINKS= ${DESTDIR}/usr/lib/newaliases ${DESTDIR}/usr/lib/mailq 7968102SericBINOWN= root 8068102SericBINGRP= mail 8168102SericBINMODE=6555 8268102Seric 8368102Seric#ALL= sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 8468102SericALL= sendmail 8568102Seric 8668102Sericall: ${ALL} 8768102Seric 8868102Sericsendmail: ${BEFORE} ${OBJS} 8968102Seric ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} 9068102Seric 9168102Sericstddef.h: 9268102Seric echo "#include <sys/types.h>" > stddef.h 9368102Seric 9468774Seric#NROFF= nroff -h 9568774SericNROFF= groff -Tascii 9668774SericMANDOC= -mandoc 9768102Seric 9868102Sericaliases.0: aliases.5 9968774Seric ${NROFF} ${MANDOC} aliases.5 > aliases.0 10068102Seric 10168102Sericmailq.0: mailq.1 10268774Seric ${NROFF} ${MANDOC} mailq.1 > mailq.0 10368102Seric 10468102Sericnewaliases.0: newaliases.1 10568774Seric ${NROFF} ${MANDOC} newaliases.1 > newaliases.0 10668102Seric 10768102Sericsendmail.0: sendmail.8 10868774Seric ${NROFF} ${MANDOC} sendmail.8 > sendmail.0 10968102Seric 11068102Seric# new target to save original sendmail files before installation 11168102Sericsave-orig: 11268102Seric if [ -f ${BINDIR}/sendmail.orig ]; then \ 11368102Seric echo "Error: original already saved" 1>&2; \ 11468102Seric exit 1; \ 11568102Seric else \ 11668102Seric /bin/mv ${BINDIR}/sendmail ${BINDIR}/sendmail.orig; \ 11768102Seric for i in ${LINKS}; do \ 11868102Seric if [ -h $$i ]; then \ 11968102Seric /bin/mv $$i $$i.orig; \ 12068102Seric fi; \ 12168102Seric done; \ 12268102Seric if [ -f ${STDIR}/sendmail.st ]; then \ 12368102Seric /bin/mv ${STDIR}/sendmail.st ${STDIR}/sendmail.st.orig; \ 12468102Seric fi; \ 12568102Seric if [ -f ${HFDIR}/sendmail.hf ]; then \ 12668102Seric /bin/mv ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.orig; \ 12768102Seric fi; \ 12868102Seric echo "Now run 'make install'." 1>&2; \ 12968102Seric echo "(To back out, run 'make backout'.)" 1>&2; \ 13068102Seric fi 13168102Seric 13268102Seric# new target to back out, ie, put back original files 13368102Sericbackout: 13468102Seric if [ ! -f ${BINDIR}/sendmail.orig ]; then \ 13568102Seric echo "Error: original was not saved" 1>&2; \ 13668102Seric exit 1; \ 13768102Seric else \ 13868102Seric /bin/mv ${BINDIR}/sendmail.orig ${BINDIR}/sendmail; \ 13968102Seric for i in ${LINKS}; do \ 14068102Seric if [ -h $$i.orig ]; then \ 14168102Seric /bin/mv $$i.orig $$i; \ 14268102Seric else \ 14368102Seric rm -f $$i; \ 14468102Seric fi; \ 14568102Seric done; \ 14668102Seric if [ -f ${STDIR}/sendmail.st.orig ]; then \ 14768102Seric /bin/mv ${STDIR}/sendmail.st.orig ${STDIR}/sendmail.st; \ 14868102Seric else \ 14968102Seric rm -f ${STDIR}/sendmail.st; \ 15068102Seric fi; \ 15168102Seric if [ -f ${HFDIR}/sendmail.hf.orig ]; then \ 15268102Seric /bin/mv ${HFDIR}/sendmail.hf.orig ${HFDIR}/sendmail.hf; \ 15368102Seric else \ 15468102Seric rm -f ${HFDIR}/sendmail.hf; \ 15568102Seric fi; \ 15668102Seric echo "Now back out config file change if necessary." 1>&2; \ 15768102Seric fi 15868102Seric 15968102Seric#install: install-sendmail install-docs 16068102Sericinstall: install-sendmail 16168102Seric 16268102Sericinstall-sendmail: sendmail 16368102Seric if [ ! -f ${BINDIR}/sendmail.orig ]; then \ 16468102Seric echo "Error: Original not saved yet \ 16568102Seric (no ${BINDIR}/sendmail.orig)" 1>&2; \ 16668102Seric exit 1; \ 16768102Seric else \ 16868102Seric cpset -o sendmail ${BINDIR} ${BINMODE} ${BINOWN} ${BINGRP}; \ 16968102Seric for i in ${LINKS}; do \ 17068102Seric rm -f $$i; \ 17168102Seric ln ${BINDIR}/sendmail $$i; \ 17268102Seric done; \ 17368102Seric cpset -o /dev/null ${STDIR}/sendmail.st 644 ${BINOWN} ${BINGRP}; \ 17468102Seric cpset -o sendmail.hf ${HFDIR} 444 ${BINOWN} ${BINGRP}; \ 17568102Seric echo "Now install the new config file: \ 17668102Seric go to ../../cf/cf and run ./Install-dcd-config" 1>&2; \ 17768102Seric fi 17868102Seric 17968102Seric# doesn't actually install them -- you may want to install pre-nroff versions 18068102Sericinstall-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 18168102Seric 18268102Sericclean: 18368102Seric rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 18468102Seric 18568102Seric# dependencies 18668102Seric# gross overkill, and yet still not quite enough.... 18768102Seric${OBJS}: sendmail.h conf.h 188*69943Seric 189*69943Sericdepend: 190