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