Commit | Line | Data |
---|---|---|
989e97b6 | 1 | AM_CPPFLAGS += -I$(builddir) -I$(srcdir) |
6245c710 | 2 | AM_YFLAGS = -t -d -v -Wno-yacc |
e98a2d6e PP |
3 | |
4 | noinst_LTLIBRARIES = libctf-parser.la libctf-ast.la | |
5 | ||
8a121625 MJ |
6 | BUILT_SOURCES = parser.h |
7 | ||
06a626b8 | 8 | libctf_parser_la_SOURCES = lexer.l parser.y objstack.c |
8a121625 | 9 | # scanner-symbols.h is included to prefix generated yy_* symbols |
e98a2d6e | 10 | # with bt_. |
989e97b6 | 11 | libctf_parser_la_CPPFLAGS = $(AM_CPPFLAGS) \ |
06a626b8 | 12 | -include $(srcdir)/scanner-symbols.h |
2f65757b SM |
13 | |
14 | # This library contains (mostly) generated code, silence some warnings that it | |
15 | # produces. | |
16 | libctf_parser_la_CFLAGS = $(AM_CFLAGS) \ | |
17 | -Wno-unused-function \ | |
18 | -Wno-null-dereference | |
e98a2d6e | 19 | |
e98a2d6e | 20 | libctf_ast_la_SOURCES = \ |
06a626b8 JG |
21 | visitor-generate-ir.c \ |
22 | visitor-semantic-validator.c \ | |
4353f877 PP |
23 | visitor-parent-links.c \ |
24 | ast.h \ | |
25 | objstack.h \ | |
26 | parser.h \ | |
3fef1229 | 27 | parser-wrap.h \ |
4353f877 | 28 | scanner.h \ |
1e649dff PP |
29 | scanner-symbols.h \ |
30 | decoder.c \ | |
55314f2a | 31 | decoder.h \ |
6119e40e SM |
32 | decoder-packetized-file-stream-to-buf.c \ |
33 | decoder-packetized-file-stream-to-buf.h \ | |
55314f2a | 34 | logging.c \ |
7b33a0e0 PP |
35 | logging.h \ |
36 | ctf-meta.h \ | |
37 | ctf-meta-visitors.h \ | |
38 | ctf-meta-validate.c \ | |
39 | ctf-meta-update-meanings.c \ | |
40 | ctf-meta-update-in-ir.c \ | |
41 | ctf-meta-update-default-clock-classes.c \ | |
42 | ctf-meta-update-text-array-sequence.c \ | |
43 | ctf-meta-update-value-storing-indexes.c \ | |
32476570 | 44 | ctf-meta-update-stream-class-config.c \ |
0476f6f7 | 45 | ctf-meta-warn-meaningless-header-fields.c \ |
7b33a0e0 | 46 | ctf-meta-translate.c \ |
cd03c43c PP |
47 | ctf-meta-resolve.c \ |
48 | ctf-meta-configure-ir-trace.c \ | |
49 | ctf-meta-configure-ir-trace.h | |
4353f877 | 50 | |
e98a2d6e | 51 | if BABELTRACE_BUILD_WITH_MINGW |
34c83b89 | 52 | libctf_ast_la_LIBADD = -lintl -liconv -lole32 |
e98a2d6e PP |
53 | endif |
54 | ||
8a121625 MJ |
55 | # start with empty files to clean |
56 | CLEANFILES = | |
57 | ||
58 | if HAVE_BISON | |
59 | # we have bison: we can clean the generated parser files | |
60 | CLEANFILES += parser.c parser.h parser.output | |
61 | else # HAVE_BISON | |
62 | # create target used to stop the build if we want to build the parser, | |
63 | # but we don't have the necessary tool to do so | |
64 | ERR_MSG = "Error: Cannot build target because bison is missing." | |
65 | ERR_MSG += "Make sure bison is installed and run the configure script again." | |
66 | ||
67 | parser.c parser.h: parser.y | |
68 | @echo $(ERR_MSG) | |
69 | @false | |
70 | ||
71 | all-local: parser.c parser.h | |
72 | endif # HAVE_BISON | |
73 | ||
74 | if HAVE_FLEX | |
75 | # we have flex: we can clean the generated lexer files | |
76 | CLEANFILES += lexer.c | |
77 | else # HAVE_FLEX | |
78 | # create target used to stop the build if we want to build the lexer, | |
79 | # but we don't have the necessary tool to do so | |
80 | ERR_MSG = "Error: Cannot build target because flex is missing." | |
81 | ERR_MSG += "Make sure flex is installed and run the configure script again." | |
82 | ||
83 | filter-lexer.c: lexer.l | |
5953a0b2 MD |
84 | @echo $(ERR_MSG) |
85 | @false | |
8a121625 MJ |
86 | |
87 | all-local: lexer.c | |
88 | endif # HAVE_FLEX |