Commit | Line | Data |
---|---|---|
74130cb7 PC |
1 | AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ |
2 | -I$(srcdir) -I$(builddir) | |
3 | ||
d00c599e DG |
4 | noinst_PROGRAMS = filter-grammar-test |
5 | noinst_LTLIBRARIES = libfilter.la | |
c6228685 MD |
6 | noinst_HEADERS = filter-ast.h \ |
7 | filter-symbols.h | |
d00c599e DG |
8 | |
9 | BUILT_SOURCES = filter-parser.h | |
d00c599e | 10 | |
11138250 PP |
11 | libfilter_la_SOURCES = \ |
12 | filter-parser.y filter-lexer.l \ | |
d00c599e DG |
13 | filter-visitor-set-parent.c \ |
14 | filter-visitor-xml.c \ | |
15 | filter-visitor-generate-ir.c \ | |
16 | filter-visitor-ir-check-binary-op-nesting.c \ | |
dcd5daf2 | 17 | filter-visitor-ir-validate-string.c \ |
d00c599e | 18 | filter-visitor-generate-bytecode.c \ |
d00c599e DG |
19 | filter-ast.h \ |
20 | filter-bytecode.h \ | |
21 | filter-ir.h \ | |
22 | memstream.h | |
c6228685 | 23 | libfilter_la_CFLAGS = -include filter-symbols.h |
d00c599e | 24 | |
11138250 PP |
25 | AM_YFLAGS = -t -d -v |
26 | ||
27 | # start with empty files to clean | |
28 | CLEANFILES = | |
29 | ||
30 | if HAVE_BISON | |
31 | # we have bison: we can clean the generated parser files | |
32 | CLEANFILES += filter-parser.c filter-parser.h filter-parser.output | |
33 | else # HAVE_BISON | |
34 | # create target used to stop the build if we want to build the parser, | |
35 | # but we don't have the necessary tool to do so | |
36 | ERR_MSG = "Error: Cannot build target because bison is missing." | |
37 | ERR_MSG += "Make sure bison is installed and run the configure script again." | |
38 | ||
39 | filter-parser.c filter-parser.h: filter-parser.y | |
40 | @echo $(ERR_MSG) | |
41 | @false | |
42 | ||
43 | all-local: filter-parser.c filter-parser.h | |
44 | endif # HAVE_BISON | |
45 | ||
46 | if HAVE_FLEX | |
47 | # we have flex: we can clean the generated lexer files | |
48 | CLEANFILES += filter-lexer.c | |
49 | else # HAVE_FLEX | |
50 | # create target used to stop the build if we want to build the lexer, | |
51 | # but we don't have the necessary tool to do so | |
52 | ERR_MSG = "Error: Cannot build target because flex is missing." | |
53 | ERR_MSG += "Make sure flex is installed and run the configure script again." | |
54 | ||
55 | filter-lexer.c: filter-lexer.l | |
56 | @echo $(ERR_MSG) | |
57 | @false | |
58 | ||
59 | all-local: filter-lexer.c | |
60 | endif # HAVE_FLEX | |
61 | ||
d00c599e DG |
62 | filter_grammar_test_SOURCES = filter-grammar-test.c |
63 | filter_grammar_test_LDADD = libfilter.la |