1#
2#  This Makefile is designed to work on the old "make" program.  It does
3#  not use the obj subdirectory.  It also does not install documentation
4#  automatically -- think of it as a quick start for sites that have the
5#  old make program (I recommend that you get and port the new make if you
6#  are going to be doing any signficant work on sendmail).
7#
8#  This has been tested on NEC EWS-UX/V 4.2
9#
10#	@(#)Makefile.EWS-UX_V	8.1 (Berkeley) 05/14/95
11#
12
13# use O=-O (usual) or O=-g (debugging)
14O=	-O
15
16# make sure that /bin/cc is used (do not use /usr/ucb/cc).
17CC=	/bin/cc
18
19# define the database mechanism used for alias lookups:
20#	-DNDBM -- use new DBM
21#	-DNEWDB -- use new Berkeley DB
22#	-DNIS -- include NIS support
23# The really old (V7) DBM library is no longer supported.
24# See READ_ME for a description of how these flags interact.
25#
26DBMDEF=	-DNDBM -DNIS
27
28# environment definitions (e.g., -D_AIX3)
29ENVDEF= -KOlimit=900
30
31# see also conf.h for additional compilation flags
32
33# include directories
34INCDIRS=-I/usr/sww/include
35
36# library directories
37LIBDIRS=-L/usr/sww/lib
38
39# libraries required on your system
40#  delete -l44bsd if you are not running BIND 4.9.x
41LIBS=	ndbm.o -lsocket -lnsl -lelf -lresolv # -l44bsd # with NDBM
42#LIBS=	-lsocket -lnsl -lelf -ldb -lresolv # -l44bsd   # with NEWDB
43
44# location of sendmail binary (usually /usr/sbin or /usr/lib)
45BINDIR=	${DESTDIR}/usr/ucblib
46
47# location of sendmail.st file (usually /var/log or /usr/lib)
48STDIR=	${DESTDIR}/var/ucblib
49
50# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
51HFDIR=	${DESTDIR}/var/ucblib
52
53# additional .o files needed
54OBJADD=
55
56# things to be made before compilation begins
57BEFORE=	sysexits.h ndbm.h ndbm.o
58
59###################  end of user configuration flags  ######################
60
61CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
62
63OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
64	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
65	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
66	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
67	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
68
69LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
70BINOWN=	root
71BINGRP=	sys
72BINMODE=6555
73INSTALL=/usr/ucb/install
74
75ALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
76
77all: ${ALL}
78
79sendmail: ${BEFORE} ${OBJS}
80	${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
81
82sysexits.h:
83	ln -s /usr/ucbinclude/sysexits.h .
84
85ndbm.h:
86	ln -s /usr/ucbinclude/ndbm.h .
87
88ndbm.o:
89	ar x /usr/ucblib/libucb.a ndbm.o
90
91NROFF=	nroff -h
92
93aliases.0: aliases.5
94	${NROFF} -mandoc aliases.5 > aliases.0
95
96mailq.0: mailq.1
97	${NROFF} -mandoc mailq.1 > mailq.0
98
99newaliases.0: newaliases.1
100	${NROFF} -mandoc newaliases.1 > newaliases.0
101
102sendmail.0: sendmail.8
103	${NROFF} -mandoc sendmail.8 > sendmail.0
104
105install: install-sendmail install-docs
106
107install-sendmail: sendmail
108	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
109	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
110	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
111	    ${STDIR}/sendmail.st
112	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
113
114# doesn't actually install them -- you may want to install pre-nroff versions
115install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
116
117clean:
118	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
119
120# dependencies
121#   gross overkill, and yet still not quite enough....
122${OBJS}: sendmail.h conf.h
123