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