Commit | Line | Data |
---|---|---|
989e97b6 | 1 | AM_CPPFLAGS += -I$(builddir) -I$(srcdir) |
e98a2d6e PP |
2 | AM_YFLAGS = -t -d -v |
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 |
33c81e6f | 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 \ | |
22 | scanner.h \ | |
1e649dff PP |
23 | scanner-symbols.h \ |
24 | decoder.c \ | |
55314f2a JG |
25 | decoder.h \ |
26 | logging.c \ | |
27 | logging.h | |
4353f877 | 28 | |
8a995d73 | 29 | libctf_ast_la_LIBADD = $(UUID_LIBS) |
e98a2d6e PP |
30 | |
31 | if BABELTRACE_BUILD_WITH_MINGW | |
5cddb897 | 32 | libctf_ast_la_LIBADD += -lrpcrt4 -lintl -liconv -lole32 $(POPT_LIBS) |
e98a2d6e PP |
33 | endif |
34 | ||
8a121625 MJ |
35 | # start with empty files to clean |
36 | CLEANFILES = | |
37 | ||
38 | if HAVE_BISON | |
39 | # we have bison: we can clean the generated parser files | |
40 | CLEANFILES += parser.c parser.h parser.output | |
41 | else # HAVE_BISON | |
42 | # create target used to stop the build if we want to build the parser, | |
43 | # but we don't have the necessary tool to do so | |
44 | ERR_MSG = "Error: Cannot build target because bison is missing." | |
45 | ERR_MSG += "Make sure bison is installed and run the configure script again." | |
46 | ||
47 | parser.c parser.h: parser.y | |
48 | @echo $(ERR_MSG) | |
49 | @false | |
50 | ||
51 | all-local: parser.c parser.h | |
52 | endif # HAVE_BISON | |
53 | ||
54 | if HAVE_FLEX | |
55 | # we have flex: we can clean the generated lexer files | |
56 | CLEANFILES += lexer.c | |
57 | else # HAVE_FLEX | |
58 | # create target used to stop the build if we want to build the lexer, | |
59 | # but we don't have the necessary tool to do so | |
60 | ERR_MSG = "Error: Cannot build target because flex is missing." | |
61 | ERR_MSG += "Make sure flex is installed and run the configure script again." | |
62 | ||
63 | filter-lexer.c: lexer.l | |
64 | @echo $(ERR_MSG) | |
65 | @false | |
66 | ||
67 | all-local: lexer.c | |
68 | endif # HAVE_FLEX |