34014e70023aa03f71283f9740daac1a09240451
[platform/upstream/gstreamer.git] / tools / Makefile.am
1 ### assemble a list of programs we want to build and install
2 if GST_DISABLE_REGISTRY
3 GST_REGISTRY_SRC = 
4 GST_REGISTRY_SRC_V = 
5 else
6 GST_REGISTRY_SRC = gst-register
7 GST_REGISTRY_SRC_V = gst-register-@GST_MAJORMINOR@
8 endif
9
10 if GST_DISABLE_LOADSAVE
11 GST_LOADSAVE_SRC = 
12 GST_LOADSAVE_SRC_V = 
13 else
14 GST_LOADSAVE_SRC = gst-complete gst-compprep gst-xmllaunch
15 GST_LOADSAVE_SRC_V = \
16         gst-complete-@GST_MAJORMINOR@ \
17         gst-compprep-@GST_MAJORMINOR@ \
18         gst-xmllaunch-@GST_MAJORMINOR@
19 endif
20
21 GST_OTHER_SRC = \
22         gst-inspect \
23         gst-launch \
24         gst-md5sum \
25         gst-typefind \
26         gst-xmlinspect
27 GST_OTHER_SRC_V = \
28         gst-inspect-@GST_MAJORMINOR@ \
29         gst-launch-@GST_MAJORMINOR@ \
30         gst-md5sum-@GST_MAJORMINOR@ \
31         gst-typefind-@GST_MAJORMINOR@ \
32         gst-xmlinspect-@GST_MAJORMINOR@
33
34
35 ### so all of the programs we want to build
36 bin_PROGRAMS = \
37         $(GST_REGISTRY_SRC) $(GST_REGISTRY_SRC_V) \
38         $(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
39         $(GST_OTHER_SRC) $(GST_OTHER_SRC_V)
40
41 # make sure each versioned tool has the right source file
42 if !GST_DISABLE_REGISTRY
43 gst_register_@GST_MAJORMINOR@_SOURCES = gst-register.c
44 endif
45 if !GST_DISABLE_LOADSAVE
46 gst_complete_@GST_MAJORMINOR@_SOURCES = gst-complete.c
47 gst_compprep_@GST_MAJORMINOR@_SOURCES = gst-compprep.c
48 gst_xmllaunch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
49 endif
50 gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
51 gst_launch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
52 gst_md5sum_@GST_MAJORMINOR@_SOURCES = gst-md5sum.c
53 gst_typefind_@GST_MAJORMINOR@_SOURCES = gst-typefind.c
54 gst_xmlinspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
55
56 # make sure each unversioned tool comes from gst-run.c
57 if !GST_DISABLE_REGISTRY
58 gst_register_SOURCES = gst-run.c
59 endif
60 if !GST_DISABLE_LOADSAVE
61 gst_complete_SOURCES = gst-run.c
62 gst_compprep_SOURCES = gst-run.c
63 gst_xmllaunch_SOURCES = gst-run.c
64 endif
65 gst_inspect_SOURCES = gst-run.c
66 gst_launch_SOURCES = gst-run.c
67 gst_md5sum_SOURCES = gst-run.c
68 gst_typefind_SOURCES = gst-run.c
69 gst_xmlinspect_SOURCES = gst-run.c
70
71 # set correct compile and link flags for all, as well as for specific
72 AM_CFLAGS = $(GST_CFLAGS)
73 AM_LDFLAGS = $(GST_LIBS)
74
75 gst_inspect_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
76
77 gst_xmlinspect_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
78
79 ### man pages we want to install
80 if GST_DISABLE_REGISTRY
81 GST_REGISTRY_MAN = gst-register-@GST_MAJORMINOR@.1
82 else
83 GST_REGISTRY_MAN=
84 endif
85
86 if GST_DISABLE_LOADSAVE
87 GST_LOADSAVE_MAN = \
88         gst-complete-@GST_MAJORMINOR@.1 \
89         gst-compprep-@GST_MAJORMINOR@.1 \
90         gst-xmllaunch-@GST_MAJORMINOR@.1
91 else
92 GST_LOADSAVE_MAN=
93 endif
94
95 GST_OTHER_MAN = \
96         gst-inspect-@GST_MAJORMINOR@.1 \
97         gst-launch-@GST_MAJORMINOR@.1 \
98         gst-md5sum-@GST_MAJORMINOR@.1 \
99         gst-typefind-@GST_MAJORMINOR@.1
100 #       gst-xmlinspect-@GST_MAJORMINOR@.1
101
102 manpages = $(GST_REGISTRY_MAN) $(GST_LOADSAVE_MAN) $(GST_OTHER_MAN)
103
104 CLEANFILES = $(manpages)
105 man_MANS = $(manpages)
106
107 EXTRA_DIST = \
108         gst-complete.1.in \
109         gst-compprep.1.in \
110         gst-feedback.1.in \
111         gst-inspect.1.in \
112         gst-launch.1.in \
113         gst-md5sum.1.in \
114         gst-register.1.in \
115         gst-xmllaunch.1.in \
116         gst-feedback
117
118 bin_SCRIPTS = gst-feedback
119
120 %-@GST_MAJORMINOR@.1: %.1.in
121         sed \
122                 -e s,gst-complete,gst-complete-@GST_MAJORMINOR@,g \
123                 -e s,gst-compprep,gst-compprep-@GST_MAJORMINOR@,g \
124                 -e s,gst-feedback,gst-feedback-@GST_MAJORMINOR@,g \
125                 -e s,gst-inspect,gst-inspect-@GST_MAJORMINOR@,g \
126                 -e s,gst-launch,gst-launch-@GST_MAJORMINOR@,g \
127                 -e s,gst-md5sum,gst-md5sum-@GST_MAJORMINOR@,g \
128                 -e s,gst-register,gst-register-@GST_MAJORMINOR@,g \
129                 -e s,gst-xmllaunch,gst-xmllaunch-@GST_MAJORMINOR@,g \
130                 $< >$@