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 NEWS-OS 6.0.3
9 #
10 #	@(#)Makefile.NEWS-OS.6.x	8.2 (Berkeley) 05/24/95
11 #
12 
13 # use O=-O (usual) or O=-g (debugging)
14 O=
15 
16 # make sure that /bin/cc is used (do not use /usr/ucb/cc).
17 CC=	/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 #
26 DBMDEF=	-DNDBM -DNIS
27 
28 # environment definitions (e.g., -D_AIX3)
29 # define SYSLOG_BUFSIZE=256 if you have a problem on syslog buffer size
30 # define SPT_TYPE=SPT_NONE if you are using NEWS-OS 6.0.1
31 ENVDEF= -DSYSLOG_BUFSIZE=256 # -DSPT_TYPE=SPT_NONE
32 
33 # see also conf.h for additional compilation flags
34 
35 # include directories
36 INCDIRS=-I/usr/sww/include
37 
38 # library directories
39 LIBDIRS=-L/usr/sww/lib
40 
41 # libraries required on your system
42 #  delete -l44bsd if you are not running BIND 4.9.x
43 #  -lndbm can be used instead of ndbm.o with NEWS-OS 6.1 or later
44 LIBS=   ndbm.o -lelf -lsocket -lnsl -lresolv # -l44bsd	# with NDBM
45 #LIBS=  -lelf -lsocket -lnsl -ldb -lresolv # -l44bsd	# with NEWDB
46 
47 # location of sendmail binary (usually /usr/sbin or /usr/lib)
48 BINDIR=	${DESTDIR}/usr/lib
49 
50 # location of sendmail.st file (usually /var/log or /usr/lib)
51 STDIR=	${DESTDIR}/etc
52 
53 # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
54 HFDIR=	${DESTDIR}/usr/lib
55 
56 # additional .o files needed
57 OBJADD=
58 
59 # things to be made before compilation begins
60 BEFORE=	sysexits.h ndbm.o
61 
62 ###################  end of user configuration flags  ######################
63 
64 CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
65 
66 OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
67 	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
68 	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
69 	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
70 	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
71 
72 LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
73 BINOWN=	root
74 BINGRP=	sys
75 BINMODE=6555
76 INSTALL=/usr/ucb/install
77 
78 ALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
79 
80 all: ${ALL}
81 
82 sendmail: ${BEFORE} ${OBJS}
83 	${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
84 
85 sysexits.h:
86 	ln -s /usr/ucbinclude/sysexits.h .
87 
88 ndbm.o:
89 	if [ ! -f /usr/include/ndbm.h ]; then \
90 		ln -s /usr/ucbinclude/ndbm.h .; \
91 	fi; \
92 	if [ -f /usr/lib/libndbm.a ]; then \
93 		ar x /usr/lib/libndbm.a ndbm.o; \
94 	else \
95 		ar x /usr/ucblib/libucb.a ndbm.o; \
96 	fi; \
97 
98 #NROFF=	nroff -h
99 NROFF=	groff -Tascii
100 MANDOC=	-mandoc
101 
102 aliases.0: aliases.5
103 	${NROFF} ${MANDOC} aliases.5 > aliases.0
104 
105 mailq.0: mailq.1
106 	${NROFF} ${MANDOC} mailq.1 > mailq.0
107 
108 newaliases.0: newaliases.1
109 	${NROFF} ${MANDOC} newaliases.1 > newaliases.0
110 
111 sendmail.0: sendmail.8
112 	${NROFF} ${MANDOC} sendmail.8 > sendmail.0
113 
114 install: install-sendmail install-docs
115 
116 install-sendmail: sendmail
117 	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
118 	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
119 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
120 	    ${STDIR}/sendmail.st
121 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
122 
123 # doesn't actually install them -- you may want to install pre-nroff versions
124 install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
125 
126 clean:
127 	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
128 
129 # dependencies
130 #   gross overkill, and yet still not quite enough....
131 ${OBJS}: sendmail.h conf.h
132