1 AM_CPPFLAGS += -I$(builddir) -I$(srcdir)
2 AM_YFLAGS = -t -d -v -Wno-yacc
4 noinst_LTLIBRARIES = libctf-parser.la libctf-ast.la
6 BUILT_SOURCES = parser.h
8 libctf_parser_la_SOURCES = lexer.l parser.y objstack.c
9 # scanner-symbols.h is included to prefix generated yy_* symbols
11 libctf_parser_la_CPPFLAGS = $(AM_CPPFLAGS) \
12 -include $(srcdir)/scanner-symbols.h
14 # This library contains (mostly) generated code, silence some warnings that it
16 libctf_parser_la_CFLAGS = $(AM_CFLAGS) \
17 -Wno-unused-function \
20 libctf_ast_la_SOURCES = \
21 visitor-generate-ir.c \
22 visitor-semantic-validator.c \
23 visitor-parent-links.c \
32 decoder-packetized-file-stream-to-buf.c \
33 decoder-packetized-file-stream-to-buf.h \
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 \
44 ctf-meta-update-stream-class-config.c \
45 ctf-meta-warn-meaningless-header-fields.c \
46 ctf-meta-translate.c \
48 ctf-meta-configure-ir-trace.c \
49 ctf-meta-configure-ir-trace.h
51 if BABELTRACE_BUILD_WITH_MINGW
52 libctf_ast_la_LIBADD = -lintl -liconv -lole32
55 # start with empty files to clean
59 # we have bison: we can clean the generated parser files
60 CLEANFILES += parser.c parser.h parser.output
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."
67 parser.c parser.h: parser.y
71 all-local: parser.c parser.h
75 # we have flex: we can clean the generated lexer files
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."
83 filter-lexer.c: lexer.l