1# This file is part of Mailfromd.
2# Copyright (C) 2005-2021 Sergey Poznyakoff
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17noinst_LIBRARIES = libbuiltin.a
18noinst_HEADERS = builtin.h  msg.h
19
20BI_FILES=\
21 body.bi\
22 burst.bi\
23 callout.bi\
24 ctype.bi\
25 curhdr.bi\
26 db.bi\
27 debug.bi\
28 dkim.bi\
29 dns.bi\
30 dspam.bi\
31 email.bi\
32 from.bi\
33 geoip.bi\
34 geoip2.bi\
35 gethostname.bi\
36 getopt.bi\
37 getpw.bi\
38 gettext.bi\
39 header.bi\
40 io.bi\
41 ipaddr.bi\
42 macro.bi\
43 mail.bi\
44 mbox.bi\
45 mmq.bi\
46 msg.bi\
47 prereq.bi\
48 progress.bi\
49 rate.bi\
50 rcpt.bi\
51 sa.bi\
52 sieve.bi\
53 spf.bi\
54 sprintf.bi\
55 string.bi\
56 syslog.bi\
57 system.bi\
58 other.bi\
59 vars.bi\
60 qrnt.bi
61
62libbuiltin_a_SOURCES = builtin.c $(BI_FILES:.bi=.c)
63
64EXTRA_DIST = \
65 $(BI_FILES)\
66 builtin.def\
67 builtin.h\
68 init.m4\
69 snarf.m4
70
71BUILT_SOURCES=\
72 $(BI_FILES:.bi=.c)\
73 builtin.h
74
75AM_CPPFLAGS = \
76 $(MAILUTILS_INCLUDES)\
77 $(MU_COMMON_INCLUDES)\
78 -I$(top_srcdir)/lib\
79 $(MILTER_INCLUDES)\
80 -I$(top_srcdir)/src\
81 -I$(top_srcdir)\
82 $(DSPAM_CFLAGS)
83
84builtin.h: Makefile.am builtin.def init.m4
85
86$(BI_FILES:.bi=.c): snarf.m4 init.m4
87
88SUFFIXES = .bi .c .def .h .mfi .mf
89
90M4=m4
91
92.bi.c:
93	$(AM_V_GEN)$(M4) --prefix -s $(top_srcdir)/src/builtin/snarf.m4 $< > $@
94
95.def.h:
96	$(AM_V_GEN) $(M4) --prefix $(top_srcdir)/src/builtin/init.m4 $(BI_FILES) $< > $@
97
98