Commit | Line | Data |
---|---|---|
6f14531a RG |
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 Ultrix. | |
9 | # | |
10 | # @(#)Makefile.dist 6.5 (Berkeley) 2/26/93 | |
11 | # | |
12 | ||
13 | # use O=-O (usual) or O=-g (debugging) | |
3a363396 NW |
14 | # +O is OK on 7xx, and 300xx at 9.0 |
15 | O= +O1 | |
6f14531a RG |
16 | |
17 | # define the database mechanism used for alias lookups: | |
18 | # -DNDBM -- use new DBM | |
19 | # -DNEWDB -- use new Berkeley DB | |
20 | # -DNDBM -DNEWDB -- use both new DBM and new Berkeley DB | |
21 | # -DNDBM -DNEWDB -DYPCOMPAT -- use both plus YP compatility | |
22 | # The really old (V7) DBM library is no longer supported. | |
23 | # If YPCOMPAT is defined and /var/yp/Makefile exists, sendmail will build | |
24 | # both the NEWDB and DBM libraries (the DBM just for YP). | |
25 | # | |
b4ec72e7 | 26 | DBMDEF= -DNEWDB |
6f14531a RG |
27 | |
28 | # define the load average calculation on your system: -DLA_TYPE=LA_INT, | |
29 | # -DLA_TYPE=LA_FLOAT, -DLA_TYPE=LA_SUBR, or -DLA_TYPE=LA_ZERO | |
30 | # leave undefined to use internal guess | |
31 | #LADEF= -DLA_TYPE=LA_SUBR | |
32 | ||
33 | # define UNSETENV if you need to compile in a local version of setenv | |
34 | #ENVDEF= -DUNSETENV | |
35 | ||
36 | # see also conf.h for additional compilation flags | |
37 | ||
38 | # include directories | |
39 | INCDIRS=-I/usr/sww/include/db | |
40 | ||
41 | # library directories | |
42 | LIBDIRS=-L/usr/sww/lib | |
43 | ||
44 | # libraries required on your system | |
45 | LIBS= -ldb -ldbm | |
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}/var/log | |
52 | ||
53 | # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) | |
54 | HFDIR= ${DESTDIR}/usr/lib | |
55 | ||
3a363396 NW |
56 | # Stirling - watch out for pollution of name space by sys/sysmacros.h |
57 | # - this hits definitions of m_flags in db.h | |
58 | # currently only on 300 series. | |
59 | # - sys/sysmacros.h is being included by machine/param.h | |
60 | # - which is included by sys/param.h | |
61 | XCFLAGS=-D_SYS_SYSMACROS_INCLUDED | |
62 | ||
6f14531a RG |
63 | ################### end of user configuration flags ###################### |
64 | ||
3a363396 | 65 | CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${LADEF} ${ENVDEF} ${XCFLAGS} |
6f14531a RG |
66 | |
67 | OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \ | |
68 | deliver.o domain.o envelope.o err.o headers.o macro.o main.o \ | |
69 | map.o mci.o parseaddr.o queue.o readcf.o recipient.o \ | |
70 | savemail.o srvrsmtp.o stab.o stats.o sysexits.o \ | |
71 | trace.o udb.o usersmtp.o util.o version.o | |
72 | ||
73 | LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq | |
74 | BINOWN= root | |
75 | BINGRP= kmem | |
76 | BINMODE=6555 | |
77 | ||
78 | sendmail: ${OBJS} | |
79 | ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} | |
80 | ||
81 | aliases.0: aliases.5 | |
82 | nroff -h -mandoc aliases.5 > aliases.0 | |
83 | ||
84 | newaliases.0: newaliases.1 | |
85 | nroff -h -mandoc newaliases.1 > newaliases.0 | |
86 | ||
87 | sendmail.0: sendmail.8 | |
88 | nroff -h -mandoc sendmail.8 > sendmail.0 | |
89 | ||
90 | install: install-sendmail install-docs | |
91 | ||
92 | install-sendmail: sendmail | |
93 | install -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR} | |
94 | for i in ${LINKS}; do ; rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done | |
95 | install -c -o ${BINOWN} -g ${BINGRP} -m 666 /dev/null \ | |
96 | ${STDIR}/sendmail.st | |
97 | install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} | |
98 | ||
99 | # doesn't actually install them -- you may want to install pre-nroff versions | |
100 | install-docs: aliases.0 newaliases.0 sendmail.0 | |
101 | ||
102 | clean: | |
103 | rm -f ${OBJS} sendmail aliases.0 newaliases.0 sendmail.0 | |
104 | ||
105 | # dependencies | |
106 | # gross overkill, and yet still not quite enough.... | |
107 | ${OBJS}: sendmail.h conf.h |