1 # SPDX-License-Identifier: MIT
3 AM_CPPFLAGS += -I$(builddir) -I$(srcdir)
4 AM_YFLAGS = -t -d -v -Wno-yacc
6 noinst_LTLIBRARIES = libctf-parser.la libctf-ast.la
8 BUILT_SOURCES = parser.h
10 libctf_parser_la_SOURCES = lexer.l parser.y objstack.c
11 # scanner-symbols.h is included to prefix generated yy_* symbols
13 libctf_parser_la_CPPFLAGS = $(AM_CPPFLAGS) \
14 -include $(srcdir)/scanner-symbols.h
16 # This library contains (mostly) generated code, silence some warnings that it
18 libctf_parser_la_CFLAGS = $(AM_CFLAGS) \
19 -Wno-unused-function \
22 libctf_ast_la_SOURCES = \
23 visitor-generate-ir.c \
24 visitor-semantic-validator.c \
25 visitor-parent-links.c \
34 decoder-packetized-file-stream-to-buf.c \
35 decoder-packetized-file-stream-to-buf.h \
41 ctf-meta-update-meanings.c \
42 ctf-meta-update-in-ir.c \
43 ctf-meta-update-default-clock-classes.c \
44 ctf-meta-update-text-array-sequence.c \
45 ctf-meta-update-value-storing-indexes.c \
46 ctf-meta-update-stream-class-config.c \
47 ctf-meta-warn-meaningless-header-fields.c \
48 ctf-meta-translate.c \
50 ctf-meta-configure-ir-trace.c \
51 ctf-meta-configure-ir-trace.h
53 if BABELTRACE_BUILD_WITH_MINGW
54 libctf_ast_la_LIBADD = -lintl -liconv -lole32
57 # start with empty files to clean
61 # we have bison: we can clean the generated parser files
62 CLEANFILES += parser.c parser.h parser.output
64 # create target used to stop the build if we want to build the parser,
65 # but we don't have the necessary tool to do so
66 ERR_MSG = "Error: Cannot build target because bison is missing."
67 ERR_MSG += "Make sure bison is installed and run the configure script again."
69 parser.c parser.h: parser.y
73 all-local: parser.c parser.h
77 # we have flex: we can clean the generated lexer files
80 # create target used to stop the build if we want to build the lexer,
81 # but we don't have the necessary tool to do so
82 ERR_MSG = "Error: Cannot build target because flex is missing."
83 ERR_MSG += "Make sure flex is installed and run the configure script again."
85 filter-lexer.c: lexer.l