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