
####################################################################
##### This file is automatically generated -- edit at your own risk
##### Built by root@aegis
##### on Thu Jun 18 21:43:26 GMT+9:00 1998 using template OS/DomainOS
##### in //hilts/win5/PDS/sendmail/sendmail-8.9.0/src
####################################################################

#
#  This Makefile is designed to work on any reasonably current version of
#  "make" program.
#
#	@(#)Makefile.m4	8.19 (Berkeley) 5/13/98
#

# C compiler
CC=	cc -A nansi -A,systype,bsd4.3 -A,runtype,bsd4.3

# Shell
SHELL=	/bin/sh

# use O=-O (usual) or O=-g (debugging)
O=	-O

# location of sendmail source directory
SRCDIR=	.

# define the database mechanisms available for map & alias lookups:
#	-DNDBM -- use new DBM
#	-DNEWDB -- use new Berkeley DB
#	-DNIS -- include NIS support
# The really old (V7) DBM library is no longer supported.
# See README for a description of how these flags interact.
#
MAPDEF=	 -DNDBM

# environment definitions (e.g., -D_AIX3)
ENVDEF=	

# see also conf.h for additional compilation flags

# include directories
INCDIRS=

# loader options
LDOPTS=	

# library directories
LIBDIRS=

# libraries required on your system
#  delete -l44bsd if you are not running BIND 4.9.x
LIBS=	 

# location of sendmail binary (usually /usr/sbin or /usr/lib)
BINDIR=	${DESTDIR}/usr/lib

# location of "user" binaries (usually /usr/bin or /usr/ucb)
UBINDIR=${DESTDIR}/usr/ucb

# location of sendmail.st file (usually /var/log or /usr/lib)
STDIR=	${DESTDIR}/usr/lib

# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
HFDIR=	${DESTDIR}/usr/lib

# additional .o files needed
OBJADD=	 



###################  end of user configuration flags  ######################

BUILDBIN=../../BuildTools/bin
COPTS=	-I. ${INCDIRS} ${MAPDEF} ${ENVDEF}
CFLAGS=	$O ${COPTS}

BEFORE= dirent.h
OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
	safefile.o savemail.o snprintf.o srvrsmtp.o stab.o stats.o \
	sysexits.o trace.o udb.o usersmtp.o util.o version.o ${OBJADD}

ALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0

all: ${ALL}

sendmail: ${BEFORE} ${OBJS}
	${CC} -o sendmail ${LDOPTS} ${LIBDIRS} ${OBJS} ${LIBS}


dirent.h:
	echo "#include <sys/dir.h>" > dirent.h
	echo "#define dirent	direct" >> dirent.h


NROFF=	groff -Tascii
MANDOC=	-mandoc

aliases.0: aliases.5
	${NROFF} ${MANDOC} aliases.5 > aliases.0

mailq.0: mailq.1
	${NROFF} ${MANDOC} mailq.1 > mailq.0

newaliases.0: newaliases.1
	${NROFF} ${MANDOC} newaliases.1 > newaliases.0

sendmail.0: sendmail.8
	${NROFF} ${MANDOC} sendmail.8 > sendmail.0

LINKS=	${UBINDIR}/newaliases \
	${UBINDIR}/mailq \
	${UBINDIR}/hoststat \
	${UBINDIR}/purgestat
INSTALL=install
BINOWN=	root
BINGRP=	kmem
BINMODE=4555

MANOWN=	bin
MANGRP=	bin
MANMODE=444

MANROOT=/usr/share/man/cat
MAN1=	${MANROOT}1
MAN1EXT=1
MAN1SRC=0
MAN5=	${MANROOT}5
MAN5EXT=5
MAN5SRC=0
MAN8=	${MANROOT}8
MAN8EXT=8
MAN8SRC=0

install: install-sendmail install-docs

install-sendmail: sendmail
	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
	cp /dev/null sendmail.st
	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 sendmail.st \
	    ${STDIR}/sendmail.st

install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
	${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} sendmail.${MAN8SRC} ${MAN8}/sendmail.${MAN8EXT}
	${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} aliases.${MAN5SRC} ${MAN5}/aliases.${MAN5EXT}
	${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mailq.${MAN1SRC} ${MAN1}/mailq.${MAN1EXT}
	${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} newaliases.${MAN1SRC} ${MAN1}/newaliases.${MAN1EXT}

clean:
	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0

################  Dependency scripts
#	@(#)generic.m4	8.2	(Berkeley)	2/9/98
# dependencies
#   gross overkill, and yet still not quite enough....
${OBJS}: ${SRCDIR}/sendmail.h ${SRCDIR}/conf.h

# give a null "depend" list so that the startup script will work
depend:
#	End of generic.m4
################  End of dependency scripts
