xref: /freebsd/contrib/sendmail/libmilter/Makefile.m4 (revision 57718be8fa0bd5edc11ab9a72e68cc71982939a6)
1dnl $Id: Makefile.m4,v 8.96 2013-10-14 16:16:44 ca Exp $
2include(confBUILDTOOLSDIR`/M4/switch.m4')
3
4dnl only required for compilation of EXTRAS
5define(`confREQUIRE_SM_OS_H', `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 worker.c handler.c comm.c smfi.c signal.c sm_gethost.c monitor.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