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