1 | # |
---|
2 | # This Makefile is designed to work on the old "make" program. |
---|
3 | # |
---|
4 | # @(#)Makefile.m4 8.15 (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 | # see also conf.h for additional compilation flags |
---|
23 | |
---|
24 | # include directories |
---|
25 | INCDIRS=-I${SRCDIR} confINCDIRS |
---|
26 | |
---|
27 | # loader options |
---|
28 | LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') |
---|
29 | |
---|
30 | # library directories |
---|
31 | LIBDIRS=confLIBDIRS |
---|
32 | |
---|
33 | # libraries required on your system |
---|
34 | LIBS= ifdef(`confLIBS', `confLIBS') |
---|
35 | |
---|
36 | # location of mailstats binary (usually /usr/sbin or /usr/etc) |
---|
37 | SBINDIR=${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin') |
---|
38 | ATHSBINDIR=athSBINDIR |
---|
39 | |
---|
40 | # additional .o files needed |
---|
41 | OBJADD= ifdef(`confOBJADD', `confOBJADD') |
---|
42 | |
---|
43 | undivert(1) |
---|
44 | |
---|
45 | ################### end of user configuration flags ###################### |
---|
46 | |
---|
47 | BUILDBIN=confBUILDBIN |
---|
48 | COPTS= -I. ${INCDIRS} ${ENVDEF} |
---|
49 | CFLAGS= $O ${COPTS} |
---|
50 | |
---|
51 | BEFORE= confBEFORE |
---|
52 | OBJS= mailstats.o ${OBJADD} |
---|
53 | |
---|
54 | NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') |
---|
55 | MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') |
---|
56 | |
---|
57 | INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') |
---|
58 | BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin') |
---|
59 | BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin') |
---|
60 | BINMODE=ifdef(`confUBINMODE', `confUBINMODE', `555') |
---|
61 | |
---|
62 | MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin') |
---|
63 | MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') |
---|
64 | MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') |
---|
65 | |
---|
66 | MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') |
---|
67 | MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') |
---|
68 | MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') |
---|
69 | MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') |
---|
70 | |
---|
71 | ALL= mailstats mailstats.${MAN8SRC} |
---|
72 | |
---|
73 | all: ${ALL} |
---|
74 | |
---|
75 | mailstats: ${BEFORE} ${OBJS} |
---|
76 | ${CC} -o mailstats ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} |
---|
77 | |
---|
78 | undivert(3) |
---|
79 | |
---|
80 | mailstats.${MAN8SRC}: mailstats.8 |
---|
81 | ${NROFF} ${MANDOC} mailstats.8 > mailstats.${MAN8SRC} |
---|
82 | |
---|
83 | install: install-mailstats install-docs |
---|
84 | |
---|
85 | install-mailstats: mailstats |
---|
86 | mkdir -p ${DESTDIR}${ATHSBINDIR} |
---|
87 | mkdir -p ${SBINDIR} |
---|
88 | ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mailstats ${DESTDIR}${ATHSBINDIR} |
---|
89 | rm -f ${SBINDIR}/mailstats |
---|
90 | ln -s ${ATHSBINDIR}/mailstats ${SBINDIR}/mailstats |
---|
91 | |
---|
92 | install-docs: mailstats.${MAN8SRC} |
---|
93 | ifdef(`confNO_MAN_INSTALL', `dnl', |
---|
94 | ` mkdir -p ${MAN8} |
---|
95 | ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mailstats.${MAN8SRC} ${MAN8}/mailstats.${MAN8EXT}') |
---|
96 | |
---|
97 | clean: |
---|
98 | rm -f ${OBJS} mailstats |
---|
99 | |
---|
100 | ################ Dependency scripts |
---|
101 | include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', |
---|
102 | `generic').m4)dnl |
---|
103 | ################ End of dependency scripts |
---|