1 # SPDX-License-Identifier: GPL-2.0-only
3 AM_CPPFLAGS += -I$(srcdir) -I$(builddir)
5 noinst_PROGRAMS = filter-grammar-test
6 noinst_LTLIBRARIES = libfilter.la
7 noinst_HEADERS = filter-ast.h \
10 BUILT_SOURCES = filter-parser.h
12 libfilter_la_SOURCES = \
13 filter-parser.y filter-lexer.l \
14 filter-visitor-xml.c \
15 filter-visitor-generate-ir.c \
16 filter-visitor-ir-check-binary-op-nesting.c \
17 filter-visitor-ir-validate-string.c \
18 filter-visitor-ir-validate-globbing.c \
19 filter-visitor-ir-normalize-glob-patterns.c \
20 filter-visitor-generate-bytecode.c \
25 libfilter_la_CFLAGS = -include filter-symbols.h $(AM_CFLAGS)
26 libfilter_la_LIBADD = $(top_builddir)/src/common/string-utils/libstring-utils.la
30 # start with empty files to clean
34 # we have bison: we can clean the generated parser files
35 CLEANFILES += filter-parser.c filter-parser.h filter-parser.output
37 # create target used to stop the build if we want to build the parser,
38 # but we don't have the necessary tool to do so
39 ERR_MSG = "Error: Cannot build target because bison is missing."
40 ERR_MSG += "Make sure bison is installed and run the configure script again."
42 filter-parser.c filter-parser.h: filter-parser.y
46 all-local: filter-parser.c filter-parser.h
50 # we have flex: we can clean the generated lexer files
51 CLEANFILES += filter-lexer.c
53 # create target used to stop the build if we want to build the lexer,
54 # but we don't have the necessary tool to do so
55 ERR_MSG = "Error: Cannot build target because flex is missing."
56 ERR_MSG += "Make sure flex is installed and run the configure script again."
58 filter-lexer.c: filter-lexer.l
62 all-local: filter-lexer.c
65 filter_grammar_test_SOURCES = filter-grammar-test.c
66 filter_grammar_test_LDADD = libfilter.la