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