summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/Makefile b/src/Makefile
index 9db9ead..a45140b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -36,20 +36,24 @@ ifneq ($(MAKECMDGOALS),distclean)
include include.mk
endif
-EXECUTABLE := sydra-rtp
+EXECUTABLE_RTP := sydra-rtp
+EXECUTABLES := $(EXECUTABLE_RTP)
-C_OBJS := log.o \
- options.o \
- utils.o \
- pipelines.o \
- udp.o \
- sydra-rtp.o
+C_OBJS_COMMON := log.o \
+ options.o \
+ utils.o \
+ pipelines.o \
+ udp.o
-C_SRCS := $(C_OBJS:%.o=%.c)
+C_OBJS_RTP := $(C_OBJS_COMMON) \
+ sydra-rtp.o
+
+C_SRCS_RTP := $(C_OBJS_RTP:%.o=%.c)
+C_SRCS := $(C_SRCS_RTP)
.PHONY: clean cleanall distclean manpage install install-bin uninstall remove
-all: $(EXECUTABLE)
+all: $(EXECUTABLES)
%.d: %.c
@set -e; rm -f $@; \
@@ -61,27 +65,27 @@ ifneq ($(MAKECMDGOALS),distclean)
-include $(C_SRCS:%.c=%.d)
endif
-$(EXECUTABLE): $(C_OBJS)
- $(CC) $(C_OBJS) -o $@ $(LDFLAGS)
+$(EXECUTABLE_RTP): $(C_OBJS_RTP)
+ $(CC) $(C_OBJS_RTP) -o $@ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c $<
-strip: $(EXECUTABLE)
- $(STRIP) -s $(EXECUTABLE)
+strip: $(EXECUTABLES)
+ $(STRIP) -s $(EXECUTABLE_RTP)
distclean: clean
find . -name *.o -exec rm -f {} \;
find . -name "*.\~*" -exec rm -rf {} \;
rm -f include.mk
- rm -f config.h
+ rm -f config*.h
clean:
rm -f *.o
rm -f *.d
rm -f *.d.*
- rm -f $(EXECUTABLE)
+ rm -f $(EXECUTABLES)
INSTALL_TARGETS := install-bin
REMOVE_TARGETS := remove-bin
@@ -93,20 +97,20 @@ endif
install: all $(INSTALL_TARGETS)
-install-bin: $(EXECUTABLE)
+install-bin: $(EXECUTABLES)
$(INSTALL) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 755 $(EXECUTABLE) $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(EXECUTABLE_RTP) $(DESTDIR)$(BINDIR)
install-man: manpage
$(INSTALL) -d $(DESTDIR)$(MANDIR)/man8/
- $(INSTALL) -m 644 ../doc/$(EXECUTABLE).8 $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE).8
+ $(INSTALL) -m 644 ../doc/$(EXECUTABLE_RTP).8 $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE_RTP).8
uninstall: remove
remove: $(REMOVE_TARGETS)
remove-bin:
- rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLE)
+ rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLE_RTP)
remove-man:
- rm -f $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE).8
+ rm -f $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE_RTP).8