1 | # |
---|
2 | # This Makefile is designed to work on any reasonably current version of |
---|
3 | # "make" program. |
---|
4 | # |
---|
5 | # @(#)Makefile.m4 8.26 (Berkeley) 1/23/1999 |
---|
6 | # |
---|
7 | |
---|
8 | # C compiler |
---|
9 | CC= confCC |
---|
10 | |
---|
11 | # Shell |
---|
12 | SHELL= confSHELL |
---|
13 | |
---|
14 | # use O=-O (usual) or O=-g (debugging) |
---|
15 | O= ifdef(`confOPTIMIZE', `confOPTIMIZE', `-O') |
---|
16 | |
---|
17 | # location of sendmail source directory |
---|
18 | SRCDIR= . |
---|
19 | |
---|
20 | # define the database mechanisms available for map & alias lookups: |
---|
21 | # -DNDBM -- use new DBM |
---|
22 | # -DNEWDB -- use new Berkeley DB |
---|
23 | # -DNIS -- include NIS support |
---|
24 | # The really old (V7) DBM library is no longer supported. |
---|
25 | # See README for a description of how these flags interact. |
---|
26 | # |
---|
27 | MAPDEF= ifdef(`confMAPDEF', `confMAPDEF') |
---|
28 | |
---|
29 | # environment definitions (e.g., -D_AIX3) |
---|
30 | ENVDEF= ifdef(`confENVDEF', `confENVDEF') |
---|
31 | |
---|
32 | # see also conf.h for additional compilation flags |
---|
33 | |
---|
34 | # include directories |
---|
35 | INCDIRS=confINCDIRS |
---|
36 | |
---|
37 | # loader options |
---|
38 | LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') |
---|
39 | |
---|
40 | # library directories |
---|
41 | LIBDIRS=confLIBDIRS |
---|
42 | |
---|
43 | # libraries required on your system |
---|
44 | # delete -l44bsd if you are not running BIND 4.9.x |
---|
45 | LIBS= ifdef(`confLIBS', `confLIBS') -lwrap |
---|
46 | |
---|
47 | # location of sendmail binary (usually /usr/sbin or /usr/lib) |
---|
48 | BINDIR= ${DESTDIR}ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin') |
---|
49 | |
---|
50 | # BINDIR for symlink purposes (no DESTDIR) |
---|
51 | LNBINDIR= ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin') |
---|
52 | |
---|
53 | # location of "user" binaries (usually /usr/bin or /usr/ucb) |
---|
54 | UBINDIR=${DESTDIR}ifdef(`confUBINDIR', `confUBINDIR', `/usr/bin') |
---|
55 | |
---|
56 | # location of sendmail.st file (usually /var/log or /usr/lib) |
---|
57 | STDIR= ${DESTDIR}ifdef(`confSTDIR', `confSTDIR', `/var/log') |
---|
58 | |
---|
59 | # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) |
---|
60 | HFDIR= ${DESTDIR}ifdef(`confHFDIR', `confHFDIR', `/usr/share/misc') |
---|
61 | |
---|
62 | # additional .o files needed |
---|
63 | OBJADD= ifdef(`confOBJADD', `confOBJADD') ifdef(`confSMOBJADD', `confSMOBJADD') |
---|
64 | |
---|
65 | undivert(1) |
---|
66 | |
---|
67 | ################### end of user configuration flags ###################### |
---|
68 | |
---|
69 | BUILDBIN=confBUILDBIN |
---|
70 | COPTS= -I. ${INCDIRS} ${MAPDEF} ${ENVDEF} |
---|
71 | CFLAGS= $O ${COPTS} |
---|
72 | |
---|
73 | BEFORE= confBEFORE |
---|
74 | OBJS= alias.o arpadate.o clock.o collect.o conf.o control.o convtime.o \ |
---|
75 | daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o \ |
---|
76 | main.o map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \ |
---|
77 | safefile.o savemail.o snprintf.o srvrsmtp.o stab.o stats.o \ |
---|
78 | sysexits.o trace.o udb.o usersmtp.o util.o version.o ${OBJADD} |
---|
79 | |
---|
80 | LINKS= ifdef(`confLINKS', `confLINKS', |
---|
81 | `${UBINDIR}/newaliases \ |
---|
82 | ${UBINDIR}/mailq \ |
---|
83 | ${UBINDIR}/hoststat \ |
---|
84 | ${UBINDIR}/purgestat') |
---|
85 | |
---|
86 | NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') |
---|
87 | MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') |
---|
88 | |
---|
89 | INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') |
---|
90 | BINOWN= ifdef(`confSBINOWN', `confSBINOWN', `root') |
---|
91 | BINGRP= ifdef(`confSBINGRP', `confSBINGRP', `kmem') |
---|
92 | BINMODE=ifdef(`confSBINMODE', `confSBINMODE', `4555') |
---|
93 | |
---|
94 | MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin') |
---|
95 | MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') |
---|
96 | MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') |
---|
97 | |
---|
98 | MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') |
---|
99 | MAN1= ${MANROOT}ifdef(`confMAN1', `confMAN1', `1') |
---|
100 | MAN1EXT=ifdef(`confMAN1EXT', `confMAN1EXT', `1') |
---|
101 | MAN1SRC=ifdef(`confMAN1SRC', `confMAN1SRC', `0') |
---|
102 | MAN5= ${MANROOT}ifdef(`confMAN5', `confMAN5', `5') |
---|
103 | MAN5EXT=ifdef(`confMAN5EXT', `confMAN5EXT', `5') |
---|
104 | MAN5SRC=ifdef(`confMAN5SRC', `confMAN5SRC', `0') |
---|
105 | MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') |
---|
106 | MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') |
---|
107 | MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') |
---|
108 | |
---|
109 | ALL= sendmail sendmail.st aliases.${MAN5SRC} mailq.${MAN1SRC} newaliases.${MAN1SRC} sendmail.${MAN8SRC} |
---|
110 | |
---|
111 | all: ${ALL} |
---|
112 | |
---|
113 | sendmail: ${BEFORE} ${OBJS} |
---|
114 | ${CC} -o sendmail ${LDOPTS} ${LIBDIRS} ${OBJS} ${LIBS} |
---|
115 | |
---|
116 | undivert(3) |
---|
117 | |
---|
118 | sendmail.st: |
---|
119 | cp /dev/null sendmail.st |
---|
120 | |
---|
121 | aliases.${MAN5SRC}: aliases.5 |
---|
122 | ${NROFF} ${MANDOC} aliases.5 > aliases.${MAN5SRC} |
---|
123 | |
---|
124 | mailq.${MAN1SRC}: mailq.1 |
---|
125 | ${NROFF} ${MANDOC} mailq.1 > mailq.${MAN1SRC} |
---|
126 | |
---|
127 | newaliases.${MAN1SRC}: newaliases.1 |
---|
128 | ${NROFF} ${MANDOC} newaliases.1 > newaliases.${MAN1SRC} |
---|
129 | |
---|
130 | sendmail.${MAN8SRC}: sendmail.8 |
---|
131 | ${NROFF} ${MANDOC} sendmail.8 > sendmail.${MAN8SRC} |
---|
132 | |
---|
133 | install: install-sendmail install-docs |
---|
134 | |
---|
135 | install-sendmail: sendmail |
---|
136 | mkdir -p ${BINDIR} |
---|
137 | mkdir -p ${UBINDIR} |
---|
138 | mkdir -p ${HFDIR} |
---|
139 | mkdir -p ${STDIR} |
---|
140 | ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR} |
---|
141 | for i in ${LINKS}; do rm -f $$i; ln -s ${LNBINDIR}/sendmail $$i; done |
---|
142 | ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf \ |
---|
143 | ${HFDIR}/sendmail.hf |
---|
144 | ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 sendmail.st \ |
---|
145 | ${STDIR}/sendmail.st |
---|
146 | |
---|
147 | install-docs: aliases.${MAN5SRC} mailq.${MAN1SRC} newaliases.${MAN1SRC} sendmail.${MAN8SRC} |
---|
148 | ifdef(`confNO_MAN_INSTALL', `dnl', |
---|
149 | ` mkdir -p ${MAN1} |
---|
150 | mkdir -p ${MAN5} |
---|
151 | mkdir -p ${MAN8} |
---|
152 | ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} sendmail.${MAN8SRC} ${MAN8}/sendmail.${MAN8EXT} |
---|
153 | ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} aliases.${MAN5SRC} ${MAN5}/aliases.${MAN5EXT} |
---|
154 | ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mailq.${MAN1SRC} ${MAN1}/mailq.${MAN1EXT} |
---|
155 | ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} newaliases.${MAN1SRC} ${MAN1}/newaliases.${MAN1EXT}') |
---|
156 | |
---|
157 | clean: |
---|
158 | rm -f ${OBJS} sendmail |
---|
159 | |
---|
160 | ################ Dependency scripts |
---|
161 | include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', `generic').m4)dnl |
---|
162 | ################ End of dependency scripts |
---|