Merge branch 'master' into 0.11
[platform/upstream/gstreamer.git] / tools / Makefile.am
1 ### assemble a list of programs we want to build and install
2
3 if GST_DISABLE_LOADSAVE
4 GST_LOADSAVE_SRC = 
5 GST_LOADSAVE_SRC_V = 
6 else
7 GST_LOADSAVE_SRC = gst-xmllaunch
8 GST_LOADSAVE_SRC_V = \
9         gst-xmllaunch-@GST_MAJORMINOR@
10 endif
11
12 if GST_DISABLE_PARSE
13 GST_PARSE_SRC = 
14 GST_PARSE_SRC_V = 
15 else
16 GST_PARSE_SRC = gst-launch
17 GST_PARSE_SRC_V = gst-launch-@GST_MAJORMINOR@
18 endif
19
20
21 GST_OTHER_SRC = \
22         gst-feedback \
23         gst-inspect \
24         gst-typefind \
25         gst-xmlinspect
26 GST_OTHER_SRC_V = \
27         gst-inspect-@GST_MAJORMINOR@ \
28         gst-typefind-@GST_MAJORMINOR@ \
29         gst-xmlinspect-@GST_MAJORMINOR@
30
31 ### so all of the programs we want to build
32 bin_PROGRAMS = \
33         $(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
34         $(GST_PARSE_SRC) $(GST_PARSE_SRC_V) \
35         $(GST_OTHER_SRC) $(GST_OTHER_SRC_V)
36 bin_SCRIPTS = gst-feedback-@GST_MAJORMINOR@
37
38 # make sure each versioned tool has the right source file and flags
39 if !GST_DISABLE_LOADSAVE
40 gst_xmllaunch_@GST_MAJORMINOR@_SOURCES = gst-launch.c tools.h
41 gst_xmllaunch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS) -UGST_DISABLE_DEPRECATED
42 gst_xmllaunch_@GST_MAJORMINOR@_LDADD = $(GST_OBJ_LIBS)
43 endif
44
45 if !GST_DISABLE_PARSE
46 gst_launch_@GST_MAJORMINOR@_SOURCES = gst-launch.c tools.h
47 gst_launch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS) -UGST_DISABLE_DEPRECATED
48 gst_launch_@GST_MAJORMINOR@_LDADD = $(GST_OBJ_LIBS)
49 endif
50
51 gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c tools.h
52 gst_inspect_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
53 gst_inspect_@GST_MAJORMINOR@_LDADD = $(GST_OBJ_LIBS)
54 gst_typefind_@GST_MAJORMINOR@_SOURCES = gst-typefind.c tools.h
55 gst_typefind_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
56 gst_typefind_@GST_MAJORMINOR@_LDADD = $(GST_OBJ_LIBS)
57 gst_xmlinspect_@GST_MAJORMINOR@_SOURCES = gst-xmlinspect.c tools.h
58 gst_xmlinspect_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
59 gst_xmlinspect_@GST_MAJORMINOR@_LDADD = $(GST_OBJ_LIBS)
60
61 gst-feedback-@GST_MAJORMINOR@: gst-feedback-m.m
62         $(AM_V_GEN)cp $(srcdir)/gst-feedback-m.m $@ && \
63         chmod +x $@
64
65 # make sure each unversioned tool comes from gst-run.c
66 if !GST_DISABLE_LOADSAVE
67 gst_xmllaunch_SOURCES = gst-run.c
68 endif
69
70 if !GST_DISABLE_PARSE
71 gst_launch_SOURCES = gst-run.c
72 endif
73
74 gst_feedback_SOURCES = gst-run.c
75 gst_inspect_SOURCES = gst-run.c
76 gst_typefind_SOURCES = gst-run.c
77 gst_xmlinspect_SOURCES = gst-run.c
78
79 # CFLAGS and libs for nonversioned frontend binaries
80 AM_CFLAGS = $(GLIB_ONLY_CFLAGS)
81 LDADD = $(GLIB_ONLY_LIBS)
82 # due to depcomp not using AM_CFLAGS for rh9/yd3, we also set AM_CPPFLAGS
83 AM_CPPFLAGS = $(GLIB_ONLY_CFLAGS)
84
85 Android.mk: Makefile.am
86         androgenizer -:PROJECT gstreamer \
87          -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
88          -:EXECUTABLE gst-inspect -:TAGS eng debug \
89          -:SOURCES $(gst_inspect_@GST_MAJORMINOR@_SOURCES) \
90          -:CFLAGS $(DEFS) $(gst_inspect_@GST_MAJORMINOR@_CFLAGS) \
91          -:LDFLAGS $(gst_inspect_@GST_MAJORMINOR@_LDADD) \
92          -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
93          -:EXECUTABLE gst-launch -:TAGS eng debug \
94          -:SOURCES $(gst_launch_@GST_MAJORMINOR@_SOURCES) \
95          -:CFLAGS $(DEFS) $(gst_launch_@GST_MAJORMINOR@_CFLAGS) \
96          -:LDFLAGS $(gst_launch_@GST_MAJORMINOR@_LDADD) \
97          -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
98         > $@
99
100 ### man pages we want to install
101 if GST_DISABLE_LOADSAVE
102 GST_LOADSAVE_MAN=
103 else
104 GST_LOADSAVE_MAN = \
105         gst-xmllaunch-@GST_MAJORMINOR@.1
106 endif
107
108 if GST_DISABLE_PARSE
109 GST_PARSE_MAN=
110 else
111 GST_PARSE_MAN = \
112         gst-launch-@GST_MAJORMINOR@.1
113 endif
114
115
116 GST_OTHER_MAN = \
117         gst-feedback-@GST_MAJORMINOR@.1 \
118         gst-inspect-@GST_MAJORMINOR@.1 \
119         gst-typefind-@GST_MAJORMINOR@.1 \
120         gst-xmlinspect-@GST_MAJORMINOR@.1
121
122 manpages = $(GST_LOADSAVE_MAN) $(GST_PARSE_MAN) $(GST_OTHER_MAN)
123
124 CLEANFILES = $(manpages) $(bin_SCRIPTS) *.gcno *.gcda
125 man_MANS = $(manpages)
126
127 # developer helper tools, not meant for installation
128 noinst_SCRIPTS = gst-indent
129
130 noinst_HEADERS = tools.h
131
132 EXTRA_DIST = \
133         $(noinst_SCRIPTS) \
134         gst-feedback.1.in \
135         gst-inspect.1.in \
136         gst-launch.1.in \
137         gst-typefind.1.in \
138         gst-xmlinspect.1.in \
139         gst-xmllaunch.1.in \
140         gst-feedback-m.m \
141         gst-plot-timeline.py
142
143 %-@GST_MAJORMINOR@.1: %.1.in
144         $(AM_V_GEN)sed \
145                 -e s,gst-feedback,gst-feedback-@GST_MAJORMINOR@,g \
146                 -e s,gst-inspect,gst-inspect-@GST_MAJORMINOR@,g \
147                 -e s,gst-launch,gst-launch-@GST_MAJORMINOR@,g \
148                 -e s,gst-typefind,gst-typefind-@GST_MAJORMINOR@,g \
149                 -e s,gst-xmlinspect,gst-xmlinspect-@GST_MAJORMINOR@,g \
150                 -e s,gst-xmllaunch,gst-xmllaunch-@GST_MAJORMINOR@,g \
151                 -e s,GST_MAJORMINOR,@GST_MAJORMINOR@,g \
152                 $< >$@
153