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