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 HP-UX 9.05 on 7xx series and HP-UX 9.04
9#  on 8xx series.
10#
11#	@(#)Makefile.HP-UX	8.8 (Berkeley) 04/23/95
12#
13
14# use O=-O (usual) or O=-g (debugging)
15# +O is OK on 7xx, and 300xx at 9.0
16O=	+O1
17
18# define the database mechanism used for alias lookups:
19#	-DNDBM -- use new DBM
20#	-DNEWDB -- use new Berkeley DB
21#	-DNIS -- include NIS support
22# The really old (V7) DBM library is no longer supported.
23# See READ_ME for a description of how these flags interact.
24#
25DBMDEF=	-DNDBM -DNEWDB -DNIS
26
27# environment definitions (e.g., -D_AIX3)
28ENVDEF=	-DSYSV
29
30# see also conf.h for additional compilation flags
31
32# include directories
33INCDIRS=-I/usr/sww/include
34
35# library directories
36LIBDIRS=-L/usr/sww/lib
37
38# libraries required on your system
39#  delete -lresolv if you are not running BIND 4.9.x
40LIBS=	-ldb -lndbm -lresolv
41
42# location of sendmail binary (usually /usr/sbin or /usr/lib)
43BINDIR=	${DESTDIR}/usr/lib
44
45# location of sendmail.st file (usually /var/log or /usr/lib)
46STDIR=	${DESTDIR}/usr/lib
47
48# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
49HFDIR=	${DESTDIR}/usr/lib
50
51# additional .o files needed
52OBJADD=
53
54
55###################  end of user configuration flags  ######################
56
57CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
58
59OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
60	deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
61	map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
62	savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
63	trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
64
65LINKS=	${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq
66BINOWN=	root
67BINGRP=	mail
68BINMODE=6555
69
70ALL=	sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
71
72all: ${ALL}
73
74sendmail: ${BEFORE} ${OBJS}
75	${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
76
77#NROFF=	nroff -h
78NROFF=	groff -Tascii
79MANDOC=	-mandoc
80
81aliases.0: aliases.5
82	${NROFF} ${MANDOC} aliases.5 > aliases.0
83
84mailq.0: mailq.1
85	${NROFF} ${MANDOC} mailq.1 > mailq.0
86
87newaliases.0: newaliases.1
88	${NROFF} ${MANDOC} newaliases.1 > newaliases.0
89
90sendmail.0: sendmail.8
91	${NROFF} ${MANDOC} sendmail.8 > sendmail.0
92
93install: install-sendmail install-docs
94
95install-sendmail: sendmail
96	cpset sendmail ${BINDIR} ${BINMODE} ${BINOWN} ${BINGRP}
97	for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
98	cpset /dev/null ${STDIR}/sendmail.st 644 ${BINOWN} ${BINGRP}
99	cpset sendmail.hf ${HFDIR} 444 ${BINOWN} ${BINGRP}
100
101# doesn't actually install them -- you may want to install pre-nroff versions
102install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
103
104clean:
105	rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0
106
107# dependencies
108#   gross overkill, and yet still not quite enough....
109${OBJS}: sendmail.h conf.h
110