Merge remote-tracking branch 'origin/master' into 0.11
[platform/upstream/gstreamer.git] / gst / parse / Makefile.am
1 # libgstparse.la is an optionally built helper library linked into core
2 noinst_LTLIBRARIES = libgstparse.la
3
4 CLEANFILES = grammar.tab.h grammar.output
5 EXTRA_DIST = \
6         grammar.y \
7         parse.l
8
9 # uncomment these lines to dist the generated sources
10 #BUILT_SOURCES = grammar.tab.h grammar.tab.c lex.priv_gst_parse_yy.c
11 #libgstparse_la_SOURCES = lex.priv_gst_parse_yy.c grammar.tab.c
12
13 # uncomment these lines to _NOT_ dist the generated sources
14 nodist_libgstparse_la_SOURCES = lex.priv_gst_parse_yy.c grammar.tab.c
15 CLEANFILES += grammar.tab.c lex.priv_gst_parse_yy.c
16
17 # can't use GST_ALL_CFLAGS here because that'd pull in -Werror
18 libgstparse_la_CFLAGS = -I$(top_srcdir) -I$(top_builddir) \
19         $(GLIB_CFLAGS) $(GST_OPTION_CFLAGS)
20 libgstparse_la_LIBADD = $(GST_ALL_LIBS)
21
22 noinst_HEADERS = grammar.tab.h types.h
23
24 Android.mk: Makefile.am
25         androgenizer -:PROJECT gstreamer -:STATIC libgstparse -:TAGS eng debug \
26          -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
27          -:SOURCES $(libgstparse_la_SOURCES) $(nodist_libgstparse_la_SOURCES) \
28          -:CFLAGS $(DEFS) $(libgstparse_la_CFLAGS) \
29          -:LDFLAGS $(libgstparse_la_LIBADD) \
30         > $@
31
32 grammar.tab.c grammar.tab.h: grammar.y
33         $(AM_V_GEN)$(BISON_PATH) -d -v -ppriv_gst_parse_yy $(srcdir)/grammar.y -o grammar.tab.c && \
34         mv grammar.tab.c grammar.tab_tmp.c && \
35         echo '#ifdef HAVE_CONFIG_H' > grammar.tab_tmp2.c && \
36         echo '#include <config.h>' >> grammar.tab_tmp2.c && \
37         echo '#endif' >> grammar.tab_tmp2.c && \
38         cat grammar.tab_tmp.c >> grammar.tab_tmp2.c && \
39         rm grammar.tab_tmp.c && \
40         mv grammar.tab_tmp2.c grammar.tab.c
41
42 lex.priv_gst_parse_yy.c: parse.l grammar.tab.h
43         $(AM_V_GEN)$(FLEX_PATH) -Ppriv_gst_parse_yy $^ && \
44         mv lex.priv_gst_parse_yy.c lex.priv_gst_parse_yy_tmp.c && \
45         echo '#ifdef HAVE_CONFIG_H' > lex.priv_gst_parse_yy_tmp2.c && \
46         echo '#include <config.h>' >> lex.priv_gst_parse_yy_tmp2.c && \
47         echo '#endif' >> lex.priv_gst_parse_yy_tmp2.c && \
48         echo 'static inline int priv_gst_parse_yyget_column  (void * yyscanner);' >> lex.priv_gst_parse_yy_tmp2.c && \
49         echo 'static inline void priv_gst_parse_yyset_column (int  column_no , void * yyscanner);' >> lex.priv_gst_parse_yy_tmp2.c && \
50         cat lex.priv_gst_parse_yy_tmp.c >> lex.priv_gst_parse_yy_tmp2.c && \
51         rm lex.priv_gst_parse_yy_tmp.c && \
52         mv lex.priv_gst_parse_yy_tmp2.c lex.priv_gst_parse_yy.c
53
54 .NOTPARALLEL:
55