Commit | Line | Data |
---|---|---|
ab5be9fa MJ |
1 | # SPDX-License-Identifier: GPL-2.0-only |
2 | ||
343af227 | 3 | AM_CPPFLAGS += -I$(srcdir) -I$(builddir) |
74130cb7 | 4 | |
d00c599e | 5 | noinst_LTLIBRARIES = libfilter.la |
c6228685 MD |
6 | noinst_HEADERS = filter-ast.h \ |
7 | filter-symbols.h | |
d00c599e | 8 | |
348ddc5c | 9 | BUILT_SOURCES = filter-parser.hpp |
d00c599e | 10 | |
11138250 | 11 | libfilter_la_SOURCES = \ |
348ddc5c SM |
12 | filter-lexer.lpp \ |
13 | filter-parser.ypp \ | |
14 | filter-visitor-xml.cpp \ | |
15 | filter-visitor-generate-ir.cpp \ | |
16 | filter-visitor-ir-check-binary-op-nesting.cpp \ | |
17 | filter-visitor-ir-validate-string.cpp \ | |
18 | filter-visitor-ir-validate-globbing.cpp \ | |
19 | filter-visitor-ir-normalize-glob-patterns.cpp \ | |
20 | filter-visitor-generate-bytecode.cpp \ | |
d00c599e | 21 | filter-ast.h \ |
d00c599e DG |
22 | filter-ir.h \ |
23 | memstream.h | |
348ddc5c | 24 | libfilter_la_CXXFLAGS = -include filter-symbols.h $(AM_CXXFLAGS) |
9f449915 | 25 | libfilter_la_LIBADD = $(top_builddir)/src/common/string-utils/libstring-utils.la |
d00c599e | 26 | |
3ec89b08 | 27 | AM_YFLAGS = -t -d -v -Wno-yacc |
11138250 PP |
28 | |
29 | # start with empty files to clean | |
30 | CLEANFILES = | |
31 | ||
32 | if HAVE_BISON | |
33 | # we have bison: we can clean the generated parser files | |
348ddc5c | 34 | CLEANFILES += filter-parser.cpp filter-parser.hpp filter-parser.output |
11138250 PP |
35 | else # HAVE_BISON |
36 | # create target used to stop the build if we want to build the parser, | |
37 | # but we don't have the necessary tool to do so | |
38 | ERR_MSG = "Error: Cannot build target because bison is missing." | |
39 | ERR_MSG += "Make sure bison is installed and run the configure script again." | |
40 | ||
348ddc5c | 41 | filter-parser.cpp filter-parser.hpp: filter-parser.ypp |
11138250 PP |
42 | @echo $(ERR_MSG) |
43 | @false | |
44 | ||
348ddc5c | 45 | all-local: filter-parser.cpp filter-parser.hpp |
11138250 PP |
46 | endif # HAVE_BISON |
47 | ||
48 | if HAVE_FLEX | |
49 | # we have flex: we can clean the generated lexer files | |
348ddc5c | 50 | CLEANFILES += filter-lexer.cpp |
11138250 PP |
51 | else # HAVE_FLEX |
52 | # create target used to stop the build if we want to build the lexer, | |
53 | # but we don't have the necessary tool to do so | |
54 | ERR_MSG = "Error: Cannot build target because flex is missing." | |
55 | ERR_MSG += "Make sure flex is installed and run the configure script again." | |
56 | ||
348ddc5c | 57 | filter-lexer.cpp: filter-lexer.lpp |
11138250 PP |
58 | @echo $(ERR_MSG) |
59 | @false | |
60 | ||
348ddc5c | 61 | all-local: filter-lexer.cpp |
11138250 | 62 | endif # HAVE_FLEX |