276b40661654a0f7f1a36215244196d56935c502
[platform/upstream/gstreamer.git] / libs / gst / helpers / Makefile.am
1 helpers_PROGRAMS = gst-plugin-scanner
2 helpersdir=$(libexecdir)/gstreamer-$(GST_API_VERSION)
3
4 gst_plugin_scanner_SOURCES = gst-plugin-scanner.c
5 gst_plugin_scanner_CFLAGS = $(GST_OBJ_CFLAGS) -fPIE
6 gst_plugin_scanner_LDADD = $(GST_OBJ_LIBS)
7 gst_plugin_scanner_LDFLAGS = -pie
8
9 if ENABLE_BASH_COMPLETION
10 helpers_PROGRAMS += gst-completion-helper
11 gst_completion_helper_SOURCES = gst-completion-helper.c
12 gst_completion_helper_CFLAGS = $(GST_OBJ_CFLAGS)
13 gst_completion_helper_LDADD = $(GST_OBJ_LIBS)
14 endif
15
16 if HAVE_PTP
17 helpers_PROGRAMS += gst-ptp-helper
18 gst_ptp_helper_SOURCES = gst-ptp-helper.c
19 gst_ptp_helper_CFLAGS = $(GST_OBJ_CFLAGS) $(GIO_CFLAGS) -fPIE
20 gst_ptp_helper_LDADD = $(GST_OBJ_LIBS) $(GIO_LIBS) $(CAP_LIBS)
21 gst_ptp_helper_LDFLAGS = -pie
22 endif
23
24 install-data-hook:
25 if HAVE_PTP
26 if HAVE_PTP_HELPER_SETUID
27         - chown root $(DESTDIR)$(helpersdir)/gst-ptp-helper
28         - chmod u+s $(DESTDIR)$(helpersdir)/gst-ptp-helper
29 endif
30 if HAVE_PTP_HELPER_CAPABILITIES
31         - $(SETCAP) cap_net_bind_service,cap_net_admin+ep $(DESTDIR)$(helpersdir)/gst-ptp-helper
32 endif
33 endif
34
35 EXTRA_DIST = ptp_helper_post_install.sh
36
37 DISTCLEANFILES = libgstreamer-gdb.py
38
39 # install gdb scripts
40 gdbdir = $(datadir)/gstreamer-@GST_API_VERSION@/gdb
41 dist_gdb_DATA = gst_gdb.py glib_gobject_helper.py
42
43 install-data-hook:
44         $(INSTALL) -d $(DESTDIR)$(datadir)/gdb/auto-load$(libdir)
45         $(INSTALL) $(builddir)/libgstreamer-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(libdir)/libgstreamer-@GST_API_VERSION@.so.0.$(GST_CURRENT).$(GST_REVISION)-gdb.py
46
47 uninstall-hook:
48         rm -f "$(DESTDIR)$(datadir)/gdb/auto-load$(libdir)/libgstreamer-@GST_API_VERSION@.so.0.$(GST_CURRENT).$(GST_REVISION)-gdb.py"