166263Seric# 266263Seric# This Makefile is designed to work on the old "make" program. It does 366263Seric# not use the obj subdirectory. It also does not install documentation 466263Seric# automatically -- think of it as a quick start for sites that have the 566263Seric# old make program (I recommend that you get and port the new make if you 666263Seric# are going to be doing any signficant work on sendmail). 766263Seric# 866263Seric# This is based on work from Jim Oldroyd -- I believe he was 966263Seric# using a fairly old Mt Xinu port. 1066263Seric# 1166263Seric# It should also work on UMIPS-BSD from MIPS, if you still have 1266263Seric# any lying around. 1366263Seric# 14*69943Seric# @(#)Makefile.BSD43 8.7 (Berkeley) 06/20/95 1566263Seric# 1666263Seric 1766263Seric# use O=-O (usual) or O=-g (debugging) 1866263SericO= -O 1966263Seric 2066263Seric# define the database mechanism used for alias lookups: 2166263Seric# -DNDBM -- use new DBM 2266263Seric# -DNEWDB -- use new Berkeley DB 2366263Seric# -DNIS -- include NIS support 2466263Seric# The really old (V7) DBM library is no longer supported. 2566263Seric# See READ_ME for a description of how these flags interact. 2666263Seric# 2766263SericDBMDEF= -DNDBM 2866263Seric 2966263Seric# environment definitions (e.g., -D_AIX3) 3066263SericENVDEF= -DoldBSD43 3166263Seric 3266263Seric# see also conf.h for additional compilation flags 3366263Seric 3466263Seric# include directories 3568530Seric#INCDIRS=-I/usr/sww/include 3666263Seric 3766263Seric# library directories 3866263Seric#LIBDIRS=-L/usr/sww/lib 3966263Seric 4066263Seric# libraries required on your system 4166263SericLIBS= -ldbm -lresolv -ll 4266263Seric 4366263Seric# location of sendmail binary (usually /usr/sbin or /usr/lib) 4466263SericBINDIR= ${DESTDIR}/usr/lib 4566263Seric 4666263Seric# location of sendmail.st file (usually /var/log or /usr/lib) 4766263SericSTDIR= ${DESTDIR}/usr/lib 4866263Seric 4966263Seric# location of sendmail.hf file (usually /usr/share/misc or /usr/lib) 5066263SericHFDIR= ${DESTDIR}/usr/lib 5166263Seric 5266263Seric# additional .o files needed 5366263SericOBJADD= 5466263Seric 5566263Seric# additional pseudo-sources needed 5666263SericBEFORE= unistd.h stddef.h stdlib.h dirent.h sys/time.h 5766263Seric 5866263Seric################### end of user configuration flags ###################### 5966263Seric 6066263SericCFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} 6166263Seric 6266263SericOBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \ 6366263Seric 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 \ 6566263Seric savemail.o srvrsmtp.o stab.o stats.o sysexits.o \ 6666263Seric trace.o udb.o usersmtp.o util.o version.o ${OBJADD} 6766263Seric 6866263SericLINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq 6966263SericBINOWN= root 7066263SericBINGRP= kmem 7166263SericBINMODE=6555 7266263Seric 7366263SericALL= sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 7466263Seric 7566263Sericall: ${ALL} 7666263Seric 7766263Sericsendmail: ${BEFORE} ${OBJS} 7866263Seric ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} 7966263Seric 8066263Sericunistd.h stddef.h stdlib.h sys/time.h: 8166263Seric cp /dev/null $@ 8266263Seric 8366263Sericsys/time.h: sys 8466263Seric 8566263Sericsys: 8666263Seric mkdir sys 8766263Seric 8866263Sericdirent.h: 8966263Seric echo "#include <sys/dir.h>" > dirent.h 9066263Seric echo "#define dirent direct" >> dirent.h 9166263Seric 9268774Seric#NROFF= nroff -h 9368774SericNROFF= groff -Tascii 9468774SericMANDOC= -mandoc 9566741Seric 9666263Sericaliases.0: aliases.5 9768774Seric ${NROFF} ${MANDOC} aliases.5 > aliases.0 9866263Seric 9966263Sericmailq.0: mailq.1 10068774Seric ${NROFF} ${MANDOC} mailq.1 > mailq.0 10166263Seric 10266263Sericnewaliases.0: newaliases.1 10368774Seric ${NROFF} ${MANDOC} newaliases.1 > newaliases.0 10466263Seric 10566263Sericsendmail.0: sendmail.8 10668774Seric ${NROFF} ${MANDOC} sendmail.8 > sendmail.0 10766263Seric 10866263Sericinstall: install-sendmail install-docs 10966263Seric 11066263Sericinstall-sendmail: sendmail 11166263Seric install -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR} 11266263Seric for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done 11366263Seric install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 11466263Seric ${STDIR}/sendmail.st 11566263Seric install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} 11666263Seric 11766263Seric# doesn't actually install them -- you may want to install pre-nroff versions 11866314Sericinstall-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 11966263Seric 12066263Sericclean: 12166314Seric rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 12266263Seric 12366263Seric# dependencies 12466263Seric# gross overkill, and yet still not quite enough.... 12566263Seric${OBJS}: sendmail.h conf.h 126*69943Seric 127*69943Sericdepend: 128