166273Seric#
266273Seric#  This Makefile is designed to work on the old "make" program.  It does
366273Seric#  not use the obj subdirectory.  It also does not install documentation
466273Seric#  automatically -- think of it as a quick start for sites that have the
566273Seric#  old make program (I recommend that you get and port the new make if you
666273Seric#  are going to be doing any signficant work on sendmail).
766273Seric#
866273Seric#  This has been tested on Solaris 2.3.
966273Seric#
10*69943Seric#	@(#)Makefile.SunOS.5.3	8.14 (Berkeley) 06/20/95
1166273Seric#
1266273Seric
1366273Seric# use O=-O (usual) or O=-g (debugging)
1469890Seric# warning: do not use -O with versions of gcc prior to 2.6
1569890SericO=	-O
1666273Seric
1766273SericCC=	gcc
1866273Seric
1966273Seric# define the database mechanism used for alias lookups:
2066273Seric#	-DNDBM -- use new DBM
2166273Seric#	-DNEWDB -- use new Berkeley DB
2266273Seric#	-DNIS -- include NIS support
2366273Seric# The really old (V7) DBM library is no longer supported.
2466273Seric# See READ_ME for a description of how these flags interact.
2566273Seric#
2667849SericDBMDEF=	-DNDBM -DNIS -DNISPLUS
2766273Seric
2866273Seric# environment definitions (e.g., -D_AIX3)
2968484SericENVDEF=	-DSOLARIS=203
3066273Seric
3166273Seric# see also conf.h for additional compilation flags
3266273Seric
3366273Seric# include directories
3468530SericINCDIRS=-I/usr/sww/include
3566273Seric
3666273Seric# library directories
3766273SericLIBDIRS=-L/usr/sww/lib
3866273Seric
3966273Seric# libraries required on your system
4068530Seric#  delete -l44bsd if you are not running BIND 4.9.x
4168530SericLIBS=	-lresolv -l44bsd -lsocket -lnsl -lelf
4266273Seric
4366273Seric# location of sendmail binary (usually /usr/sbin or /usr/lib)
4466273SericBINDIR=	${DESTDIR}/usr/lib
4566273Seric
4666273Seric# location of sendmail.st file (usually /var/log or /usr/lib)
4766273SericSTDIR=	${DESTDIR}/var/log
4866273Seric
4966273Seric# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
5066273SericHFDIR=	${DESTDIR}/etc/mail
5166273Seric
5266273Seric# additional .o files needed
5366273SericOBJADD=
5466273Seric
5566758Seric# things to be made before compilation begins
5666758SericBEFORE=	sysexits.h
5766758Seric
5866273Seric###################  end of user configuration flags  ######################
5966273Seric
6066273SericCFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
6166273Seric
6266273SericOBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
6366273Seric	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
6467546Seric	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
6566273Seric	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
6666273Seric	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
6766273Seric
6866273SericLINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
6966273SericBINOWN=	root
7066273SericBINGRP=	sys
7166273SericBINMODE=6555
7266273SericINSTALL=/usr/ucb/install
7366273Seric
7466273SericALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
7566273Seric
7666273Sericall: ${ALL}
7766273Seric
7866273Sericsendmail: ${BEFORE} ${OBJS}
7966273Seric	${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
8066273Seric
8168235Sericsysexits.h:
8268235Seric	if [ -r /usr/ucbinclude/sysexits.h ]; \
8368235Seric	then \
8468235Seric		ln -s /usr/ucbinclude/sysexits.h; \
8568235Seric	fi
8666758Seric
8768774Seric#NROFF=	nroff -h
8868774SericNROFF=	groff -Tascii
8968774SericMANDOC=	-mandoc
9066741Seric
9166273Sericaliases.0: aliases.5
9268774Seric	${NROFF} ${MANDOC} aliases.5 > aliases.0
9366273Seric
9466273Sericmailq.0: mailq.1
9568774Seric	${NROFF} ${MANDOC} mailq.1 > mailq.0
9666273Seric
9766273Sericnewaliases.0: newaliases.1
9868774Seric	${NROFF} ${MANDOC} newaliases.1 > newaliases.0
9966273Seric
10066273Sericsendmail.0: sendmail.8
10168774Seric	${NROFF} ${MANDOC} sendmail.8 > sendmail.0
10266273Seric
10366273Sericinstall: install-sendmail install-docs
10466273Seric
10566273Sericinstall-sendmail: sendmail
10666273Seric	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
10766273Seric	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
10866273Seric	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
10966273Seric	    ${STDIR}/sendmail.st
11066273Seric	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
11166273Seric
11266273Seric# doesn't actually install them -- you may want to install pre-nroff versions
11366314Sericinstall-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
11466273Seric
11566273Sericclean:
11666314Seric	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
11766273Seric
11866273Seric# dependencies
11966273Seric#   gross overkill, and yet still not quite enough....
12066273Seric${OBJS}: sendmail.h conf.h
121*69943Seric
122*69943Sericdepend:
123