xref: /freebsd/contrib/sendmail/libmilter/Makefile.m4 (revision f0a75d274af375d15b97b830966b99a02b7db911)
1dnl $Id: Makefile.m4,v 8.31 2002/06/21 22:01:31 ca Exp $
2include(confBUILDTOOLSDIR`/M4/switch.m4')
3
4dnl only required for compilation of EXTRAS
5define(`confREQUIRE_LIBSM', `true')
6define(`confMT', `true')
7
8# sendmail dir
9SMSRCDIR=	ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
10PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
11
12bldPRODUCT_START(`library', `libmilter')
13define(`bldINSTALLABLE', `true')
14define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
15APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
16define(`bldSOURCES', `main.c engine.c listener.c handler.c comm.c smfi.c signal.c sm_gethost.c LIBMILTER_EXTRAS ')
17define(`confBEFORE', `LIBMILTER_EXTRAS')
18bldPUSH_INSTALL_TARGET(`install-mfapi')
19bldPRODUCT_END
20
21PUSHDIVERT(3)
22errstring.c:
23	${LN} ${LNOPTS} ${SRCDIR}/libsm/errstring.c .
24
25strl.c:
26	${LN} ${LNOPTS} ${SRCDIR}/libsm/strl.c .
27POPDIVERT
28
29
30divert(bldTARGETS_SECTION)
31# Install the API header files
32MFAPI=	${SRCDIR}/inc`'lude/libmilter/mfapi.h
33MFDEF=	${SRCDIR}/inc`'lude/libmilter/mfdef.h
34install-mfapi: ${MFAPI}
35	if [ ! -d ${DESTDIR}${INCLUDEDIR}/libmilter ]; then mkdir -p ${DESTDIR}${INCLUDEDIR}/libmilter; else :; fi
36	${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h
37	${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h
38divert(0)
39
40bldFINISH
41