[12553] | 1 | # |
---|
| 2 | # This Makefile is designed to work on the old "make" program. |
---|
| 3 | # |
---|
| 4 | # @(#)Makefile.m4 8.14 (Berkeley) 7/12/1998 |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | # C compiler |
---|
| 8 | CC= confCC |
---|
| 9 | |
---|
| 10 | # Shell |
---|
| 11 | SHELL= confSHELL |
---|
| 12 | |
---|
| 13 | # use O=-O (usual) or O=-g (debugging) |
---|
| 14 | O= ifdef(`confOPTIMIZE', `confOPTIMIZE', `-O') |
---|
| 15 | |
---|
| 16 | # location of sendmail source directory |
---|
| 17 | SRCDIR= ifdef(`confSRCDIR', `confSRCDIR', `../../src') |
---|
| 18 | |
---|
| 19 | # environment definitions (e.g., -D_AIX3) |
---|
| 20 | ENVDEF= ifdef(`confENVDEF', `confENVDEF') |
---|
| 21 | |
---|
| 22 | # include directories |
---|
| 23 | INCDIRS=-I${SRCDIR} confINCDIRS |
---|
| 24 | |
---|
| 25 | # loader options |
---|
| 26 | LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') |
---|
| 27 | |
---|
| 28 | # library directories |
---|
| 29 | LIBDIRS=confLIBDIRS |
---|
| 30 | |
---|
| 31 | # libraries required on your system |
---|
| 32 | LIBS= ifdef(`confLIBS', `confLIBS') |
---|
| 33 | |
---|
| 34 | # location of smrsh binary (usually /usr/libexec or /usr/etc) |
---|
| 35 | EBINDIR=${DESTDIR}ifdef(`confEBINDIR', `confEBINDIR', `/usr/libexec') |
---|
[12897] | 36 | ATHEBINDIR=athEBINDIR |
---|
[12553] | 37 | |
---|
| 38 | # additional .o files needed |
---|
| 39 | OBJADD= ifdef(`confOBJADD', `confOBJADD') |
---|
| 40 | |
---|
| 41 | undivert(1) |
---|
| 42 | |
---|
| 43 | ################### end of user configuration flags ###################### |
---|
| 44 | |
---|
| 45 | BUILDBIN=confBUILDBIN |
---|
| 46 | COPTS= -I. ${INCDIRS} ${ENVDEF} |
---|
| 47 | CFLAGS= $O ${COPTS} |
---|
| 48 | |
---|
| 49 | BEFORE= confBEFORE |
---|
| 50 | OBJS= smrsh.o ${OBJADD} |
---|
| 51 | |
---|
| 52 | # Which *roff program has -mandoc support |
---|
| 53 | NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') |
---|
| 54 | MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') |
---|
| 55 | |
---|
| 56 | INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') |
---|
| 57 | BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin') |
---|
| 58 | BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin') |
---|
| 59 | BINMODE=ifdef(`confUBINMODE', `confUBINMODE', `555') |
---|
| 60 | |
---|
| 61 | MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin') |
---|
| 62 | MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') |
---|
| 63 | MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') |
---|
| 64 | |
---|
| 65 | MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') |
---|
| 66 | MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') |
---|
| 67 | MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') |
---|
| 68 | MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') |
---|
| 69 | |
---|
| 70 | ALL= smrsh smrsh.${MAN8SRC} |
---|
| 71 | |
---|
| 72 | all: ${ALL} |
---|
| 73 | |
---|
| 74 | smrsh: ${BEFORE} ${OBJS} |
---|
| 75 | ${CC} -o smrsh ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} |
---|
| 76 | |
---|
| 77 | undivert(3) |
---|
| 78 | |
---|
[12859] | 79 | smrsh.${MAN8SRC}: smrsh.8 |
---|
| 80 | ${NROFF} ${MANDOC} smrsh.8 > smrsh.${MAN8SRC} |
---|
| 81 | |
---|
[12553] | 82 | install: install-smrsh install-docs |
---|
| 83 | |
---|
| 84 | install-smrsh: smrsh |
---|
[12897] | 85 | mkdir -p ${DESTDIR}${ATHEBINDIR} |
---|
| 86 | mkdir -p ${EBINDIR} |
---|
| 87 | ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} smrsh ${DESTDIR}${ATHEBINDIR} |
---|
[12902] | 88 | rm -f ${EBINDIR}/smrsh |
---|
[12897] | 89 | ln -s ${ATHEBINDIR}/smrsh ${EBINDIR}/smrsh |
---|
[12553] | 90 | |
---|
| 91 | install-docs: smrsh.${MAN8SRC} |
---|
| 92 | ifdef(`confNO_MAN_INSTALL', `dnl', |
---|
[13553] | 93 | ` mkdir -p ${MAN8} |
---|
| 94 | ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} smrsh.${MAN8SRC} ${MAN8}/smrsh.${MAN8EXT}') |
---|
[12553] | 95 | |
---|
| 96 | clean: |
---|
[12861] | 97 | rm -f ${OBJS} smrsh |
---|
[12553] | 98 | |
---|
| 99 | ################ Dependency scripts |
---|
| 100 | include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', |
---|
| 101 | `generic').m4)dnl |
---|
| 102 | ################ End of dependency scripts |
---|