summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-10-09 01:50:14 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-10-09 01:50:14 +0200
commit225a789bf9fe4d65d063198165a6465442ecc387 (patch)
tree174240979b2244014fd09814f97d7a20ca54a7fa /src/Makefile
parentfixed type at manpage (diff)
add installer for example scripts
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index a6ea007..e483963 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -36,8 +36,9 @@ ifneq ($(MAKECMDGOALS),distclean)
include include.mk
endif
-EXECUTABLE_RTP := sydra-rtp
-EXECUTABLE_LAUNCH := sydra-launch
+SUITE_NAME := sydra
+EXECUTABLE_RTP := $(SUITE_NAME)-rtp
+EXECUTABLE_LAUNCH := $(SUITE_NAME)-launch
EXECUTABLES := $(EXECUTABLE_RTP) $(EXECUTABLE_LAUNCH)
C_OBJS_COMMON := log.o \
@@ -47,12 +48,12 @@ C_OBJS_RTP := $(C_OBJS_COMMON) \
options-rtp.o \
pipelines-rtp.o \
udp.o \
- sydra-rtp.o
+ $(SUITE_NAME)-rtp.o
C_OBJS_LAUNCH := $(C_OBJS_COMMON) \
options-launch.o \
pipelines-launch.o \
- sydra-launch.o
+ $(SUITE_NAME)-launch.o
C_SRCS_RTP := $(C_OBJS_RTP:%.o=%.c)
C_SRCS_LAUNCH := $(C_OBJS_LAUNCH:%.o=%.c)
@@ -106,6 +107,11 @@ INSTALL_TARGETS += install-man
REMOVE_TARGETS += remove-man
endif
+ifdef EXAMPLESDIR
+INSTALL_TARGETS += install-examples
+REMOVE_TARGETS += remove-examples
+endif
+
install: all $(INSTALL_TARGETS)
install-bin: $(EXECUTABLES)
@@ -118,6 +124,16 @@ install-man: manpage
$(INSTALL) -m 644 ../doc/$(EXECUTABLE_RTP).8 $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE_RTP).8
$(INSTALL) -m 644 ../doc/$(EXECUTABLE_LAUNCH).8 $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE_LAUNCH).8
+install-examples:
+ $(INSTALL) -d $(DESTDIR)$(EXAMPLESDIR)/$(SUITE_NAME)
+ @( for dir in `ls '../scripts/'`; do \
+ if [ -d "../scripts/$$dir" ]; then \
+ echo "install $$dir example" ; \
+ $(CP) -a "../scripts/$$dir" $(DESTDIR)$(EXAMPLESDIR)/$(SUITE_NAME)/ ; \
+ fi ; \
+ done \
+ )
+
uninstall: remove
remove: $(REMOVE_TARGETS)
@@ -129,3 +145,6 @@ remove-bin:
remove-man:
rm -f $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE_RTP).8
rm -f $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE_LAUNCH).8
+
+remove-examples:
+ rm -rf $(DESTDIR)$(EXAMPLESDIR)/$(EXECUTABLE)/