gdb: add gst_pipeline() and gst_bin_get() functions
[platform/upstream/gstreamer.git] / Makefile.am
1 # note: keep in sync with configure.ac
2 ACLOCAL_AMFLAGS = -I m4 -I common/m4
3
4 aclocaldir = $(datadir)/aclocal
5 aclocal_DATA = gst-element-check-1.0.m4
6
7 SUBDIRS = pkgconfig \
8         gst libs plugins tests \
9         po \
10         m4 \
11         common \
12         data
13
14 if BUILD_TOOLS
15 SUBDIRS += tools
16 endif
17
18 # These are all the possible subdirs
19 DIST_SUBDIRS = pkgconfig \
20         gst libs plugins tools tests \
21         po \
22         m4 \
23         common \
24         data
25
26 EXTRA_DIST = \
27         gst-element-check-1.0.m4 \
28         configure.ac autogen.sh depcomp \
29         MAINTAINERS ABOUT-NLS RELEASE gstreamer.doap \
30         scripts/gst-uninstalled \
31         $(shell find "$(top_srcdir)" -type f -name meson.build ! -path "$(top_srcdir)/gstreamer-*" ) \
32         meson_options.txt \
33         gst/parse/gen_lex.py.in gst/parse/gen_grammar.py.in
34
35 DISTCLEANFILES = _stdint.h
36
37 include $(top_srcdir)/common/release.mak
38 include $(top_srcdir)/common/po.mak
39
40 if GST_GCOV_ENABLED
41 clean-gcov:
42         find -name "*.da" -o -name "*.gcov" | xargs rm || true
43
44 clean-bbg:
45         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
46
47 GCOV_DIRS=gst libs
48
49 ## .PHONY so it always rebuilds it
50 .PHONY: coverage-report.txt
51
52 coverage-report.txt:
53         BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ;                     \
54         C_FILES= ;                                                        \
55         for F in $$BBG_FILES ; do                                         \
56                 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ;             \
57                 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ;              \
58                 B=`basename $$F .bbg` ;                                   \
59                 D=`dirname $$F` ;                                         \
60                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                   \
61                 DA_libs=`echo $$D/.libs/$$B/.da` ;                        \
62                 if test -e $$DA || test -e $$DA_libs; then                \
63                         C_FILES="$$C_FILES $$C" ;                         \
64                 fi ;                                                      \
65         done ;                                                            \
66         echo $$C_FILES ;                                                  \
67         $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
68
69 check-coverage: clean-gcov all check coverage-report.txt
70         cat coverage-report.txt
71
72 else
73 coverage-report.txt:
74         echo "Need to reconfigure with --enable-gcov"
75
76 check-coverage:
77         echo "Need to reconfigure with --enable-gcov"
78 endif
79
80 if HAVE_CHECK
81 check-valgrind:
82         $(MAKE) -C tests/check check-valgrind
83
84 check-torture:
85         $(MAKE) -C tests/check torture
86
87 build-checks:
88         $(MAKE) -C tests/check build-checks
89 else
90 check-valgrind:
91         echo "'check' library not installed, skipping"
92
93 check-torture:
94         echo "'check' library not installed, skipping"
95
96 build-checks:
97         echo "'check' library not installed, skipping"
98 endif
99
100 check-enum-gettypes: $(top_builddir)/gst/gstenumtypes.h
101         @echo 'Checking if all enum and flag _get_type() funcs are inited in gst_init()';                        \
102         FUNCS=`grep '_get_type (' gst/gstenumtypes.h | sed -e 's/^.*gst_/gst_/' -e 's/_get_type.*$$/_get_type/'`;\
103         MISSING_FUNCS='';                                                                                        \
104         for f in $$FUNCS; do                                                                                     \
105           INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_ref`;                                    \
106           if test "x$$INIT_LINE" = "x"; then                                                                     \
107             MISSING_FUNCS="$$MISSING_FUNCS $$f";                                                                 \
108           fi;                                                                                                    \
109         done;                                                                                                    \
110         if test "x$$MISSING_FUNCS" != "x"; then                                                                  \
111           echo "FIXME: please add to the following to gst/gst.c init_post():";                                   \
112           for f in $$MISSING_FUNCS; do                                                                           \
113             echo "  g_type_class_ref ($$f ());";                                                                 \
114           done;                                                                                                  \
115           exit 1;                                                                                                \
116         fi;                                                                                                      \
117         echo 'Checking if all enum and flag _get_type() funcs are deinited in gst_deinit()';                     \
118         MISSING_FUNCS='';                                                                                        \
119         for f in $$FUNCS; do                                                                                     \
120           INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_unref`;                                  \
121           if test "x$$INIT_LINE" = "x"; then                                                                     \
122             MISSING_FUNCS="$$MISSING_FUNCS $$f";                                                                 \
123           fi;                                                                                                    \
124         done;                                                                                                    \
125         if test "x$$MISSING_FUNCS" != "x"; then                                                                  \
126           echo "FIXME: please add to the following to gst/gst.c gst_deinit():";                                  \
127           for f in $$MISSING_FUNCS; do                                                                           \
128             echo "  g_type_class_unref (g_type_class_peek ($$f ()));";                                           \
129           done;                                                                                                  \
130           exit 1;                                                                                                \
131         fi
132
133 include $(top_srcdir)/common/coverage/lcov.mak
134
135 check: check-enum-gettypes
136
137 # cruft: plugins that have been merged or moved or renamed
138
139 CRUFT_FILES = \
140         $(top_builddir)/win32/common/config.h-new \
141         $(top_builddir)/common/shave \
142         $(top_builddir)/common/shave-libtool \
143         $(top_builddir)/common/m4/codeset.m4 \
144         $(top_builddir)/common/m4/gettext.m4 \
145         $(top_builddir)/common/m4/glibc2.m4 \
146         $(top_builddir)/common/m4/glibc21.m4 \
147         $(top_builddir)/common/m4/iconv.m4 \
148         $(top_builddir)/common/m4/intdiv0.m4 \
149         $(top_builddir)/common/m4/intl.m4 \
150         $(top_builddir)/common/m4/intldir.m4 \
151         $(top_builddir)/common/m4/intlmacosx.m4 \
152         $(top_builddir)/common/m4/intmax.m4 \
153         $(top_builddir)/common/m4/inttypes-pri.m4 \
154         $(top_builddir)/common/m4/inttypes_h.m4 \
155         $(top_builddir)/common/m4/lcmessage.m4 \
156         $(top_builddir)/common/m4/lib-ld.m4 \
157         $(top_builddir)/common/m4/lib-link.m4 \
158         $(top_builddir)/common/m4/lib-prefix.m4 \
159         $(top_builddir)/common/m4/libtool.m4 \
160         $(top_builddir)/common/m4/lock.m4 \
161         $(top_builddir)/common/m4/longlong.m4 \
162         $(top_builddir)/common/m4/ltoptions.m4 \
163         $(top_builddir)/common/m4/ltsugar.m4 \
164         $(top_builddir)/common/m4/ltversion.m4 \
165         $(top_builddir)/common/m4/lt~obsolete.m4 \
166         $(top_builddir)/common/m4/nls.m4 \
167         $(top_builddir)/common/m4/po.m4 \
168         $(top_builddir)/common/m4/printf-posix.m4 \
169         $(top_builddir)/common/m4/progtest.m4 \
170         $(top_builddir)/common/m4/size_max.m4 \
171         $(top_builddir)/common/m4/stdint_h.m4 \
172         $(top_builddir)/common/m4/uintmax_t.m4 \
173         $(top_builddir)/common/m4/visibility.m4 \
174         $(top_builddir)/common/m4/wchar_t.m4 \
175         $(top_builddir)/common/m4/wint_t.m4 \
176         $(top_builddir)/common/m4/xsize.m4
177
178 CRUFT_DIRS = \
179         $(top_builddir)/tests/examples/xml \
180         $(top_builddir)/tests/examples/launch \
181         $(top_builddir)/tests/examples/metadata \
182         $(top_builddir)/tests/examples/queue \
183         $(top_builddir)/tests/examples/typefind \
184         $(top_builddir)/gst/tmp-introspect* \
185         $(top_builddir)/libs/gst/*/tmp-introspect*
186
187 include $(top_srcdir)/common/cruft.mak
188
189 all-local: check-cruft