apply ASLR to excutable
[platform/upstream/gstreamer.git] / libs / gst / helpers / Makefile.am
1 if ENABLE_BASH_COMPLETION
2 bin_PROGRAMS = gst-completion-helper-@GST_API_VERSION@
3
4 gst_completion_helper_@GST_API_VERSION@_SOURCES = gst-completion-helper.c
5 gst_completion_helper_@GST_API_VERSION@_CFLAGS = $(GST_OBJ_CFLAGS)
6 gst_completion_helper_@GST_API_VERSION@_LDADD = $(GST_OBJ_LIBS)
7
8 bashhelpersdir = $(BASH_HELPERS_DIR)
9 dist_bashhelpers_DATA = gst
10 endif
11
12 helpers_PROGRAMS = gst-plugin-scanner
13 helpersdir=$(libexecdir)/gstreamer-$(GST_API_VERSION)
14
15 gst_plugin_scanner_SOURCES = gst-plugin-scanner.c
16 gst_plugin_scanner_CFLAGS = $(GST_OBJ_CFLAGS) -fPIE
17 gst_plugin_scanner_LDADD = $(GST_OBJ_LIBS)
18 gst_plugin_scanner_LDFLAGS = -pie
19
20 if HAVE_PTP
21 helpers_PROGRAMS += gst-ptp-helper
22 gst_ptp_helper_SOURCES = gst-ptp-helper.c
23 gst_ptp_helper_CFLAGS = $(GST_OBJ_CFLAGS) $(GIO_CFLAGS) -fPIE
24 gst_ptp_helper_LDADD = $(GST_OBJ_LIBS) $(GIO_LIBS) $(CAP_LIBS)
25 gst_ptp_helper_LDFLAGS = -pie
26 endif
27
28 install-exec-hook: install-helpersPROGRAMS
29 if HAVE_PTP
30 if HAVE_PTP_HELPER_SETUID
31         - chown root $(DESTDIR)$(helpersdir)/gst-ptp-helper
32         - chmod u+s $(DESTDIR)$(helpersdir)/gst-ptp-helper
33 endif
34 if HAVE_PTP_HELPER_CAPABILITIES
35         - $(SETCAP) cap_net_bind_service,cap_net_admin+ep $(DESTDIR)$(helpersdir)/gst-ptp-helper
36 endif
37 endif
38 if ENABLE_BASH_COMPLETION
39         $(MKDIR_P) $(DESTDIR)$(BASH_HELPERS_DIR) && \
40         cd $(DESTDIR)$(bindir) && \
41         $(INSTALL) `echo "gst-completion-helper-" | sed '$(transform)'`@GST_API_VERSION@$(EXEEXT) \
42         $(DESTDIR)$(BASH_HELPERS_DIR)/gst-completion-helper-@GST_API_VERSION@$(EXEEXT) && \
43         rm `echo "gst-completion-helper-" | sed '$(transform)'`@GST_API_VERSION@$(EXEEXT)
44
45 uninstall-hook:
46         rm -f $(DESTDIR)$(BASH_HELPERS_DIR)/gst-completion-helper-@GST_API_VERSION@$(EXEEXT)
47 endif
48
49 # clean out the old one to make sure everything is udpated correctly
50 # remove again after release
51 CLEANFILES = plugin-scanner
52
53 if ENABLE_BASH_COMPLETION
54 CLEANFILES += gst-completion-helper-@GST_API_VERSION@
55 endif