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