tsdumper2 reads incoming mpeg transport stream over UDP/RTP and then records it to disk. The files names are generated based on preconfigured time interval. https://georgi.unixsol.org/programs/tsdumper2/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. CC = $(CROSS)$(TARGET)cc
  2. STRIP = $(CROSS)$(TARGET)strip
  3. MKDEP = $(CC) -MP -MM -o $*.d $<
  4. RM = rm -f
  5. MV = mv -f
  6. BUILD_ID = $(shell date +%Y%m%d_%H%M%S)
  7. VERSION = $(shell cat RELEASE)
  8. GIT_VER = $(shell git describe --tags --dirty --always 2>/dev/null)
  9. ifeq "$(GIT_VER)" ""
  10. GIT_VER = "release"
  11. endif
  12. ifndef V
  13. Q = @
  14. endif
  15. CFLAGS ?= -O2 -ggdb \
  16. -W -Wall -Wextra \
  17. -Wshadow -Wformat-security -Wstrict-prototypes
  18. DEFS = -DBUILD_ID=\"$(BUILD_ID)\" \
  19. -DVERSION=\"$(VERSION)\" -DGIT_VER=\"$(GIT_VER)\"
  20. DEFS += -D_FILE_OFFSET_BITS=64
  21. PREFIX ?= /usr/local
  22. INSTALL_PRG = tsdumper2
  23. INSTALL_PRG_DIR = $(subst //,/,$(DESTDIR)/$(PREFIX)/bin)
  24. INSTALL_DOC = tsdumper2.1
  25. INSTALL_DOC_DIR = $(subst //,/,$(DESTDIR)/$(PREFIX)/share/man/man1)
  26. FUNCS_DIR = libfuncs
  27. FUNCS_LIB = $(FUNCS_DIR)/libfuncs.a
  28. tsdumper_SRC = \
  29. udp.c \
  30. util.c \
  31. process.c \
  32. tsdumper2.c
  33. tsdumper_LIBS = -lpthread
  34. tsdumper_OBJS = $(FUNCS_LIB) $(tsdumper_SRC:.c=.o)
  35. CLEAN_OBJS = tsdumper2 $(tsdumper_SRC:.c=.o) $(tsdumper_SRC:.c=.d)
  36. PROGS = tsdumper2
  37. .PHONY: help distclean clean install uninstall
  38. all: $(PROGS)
  39. $(FUNCS_LIB): $(FUNCS_DIR)/libfuncs.h
  40. $(Q)echo " MAKE $(FUNCS_LIB)"
  41. $(Q)$(MAKE) -s -C $(FUNCS_DIR)
  42. tsdumper2: $(tsdumper_OBJS)
  43. $(Q)echo " LINK tsdumper2"
  44. $(Q)$(CC) $(CFLAGS) $(DEFS) $(tsdumper_OBJS) $(tsdumper_LIBS) -o tsdumper2
  45. %.o: %.c Makefile RELEASE
  46. @$(MKDEP)
  47. $(Q)echo " CC tsdumper2 $<"
  48. $(Q)$(CC) $(CFLAGS) $(DEFS) -c $<
  49. -include $(tsdumper_SRC:.c=.d)
  50. strip:
  51. $(Q)echo " STRIP $(PROGS)"
  52. $(Q)$(STRIP) $(PROGS)
  53. clean:
  54. $(Q)echo " RM $(CLEAN_OBJS)"
  55. $(Q)$(RM) $(CLEAN_OBJS)
  56. distclean: clean
  57. $(Q)$(MAKE) -s -C $(FUNCS_DIR) clean
  58. install: all
  59. @install -d "$(INSTALL_PRG_DIR)"
  60. @echo "INSTALL $(INSTALL_PRG) -> $(INSTALL_PRG_DIR)"
  61. $(Q)-install $(INSTALL_PRG) "$(INSTALL_PRG_DIR)"
  62. @echo "INSTALL $(INSTALL_DOC) -> $(INSTALL_DOC_DIR)"
  63. $(Q)-install --mode 0644 $(INSTALL_DOC) "$(INSTALL_DOC_DIR)"
  64. uninstall:
  65. @-for FILE in $(INSTALL_PRG); do \
  66. echo "RM $(INSTALL_PRG_DIR)/$$FILE"; \
  67. rm "$(INSTALL_PRG_DIR)/$$FILE"; \
  68. done
  69. @-for FILE in $(INSTALL_DOC); do \
  70. echo "RM $(INSTALL_DOC_DIR)/$$FILE"; \
  71. rm "$(INSTALL_DOC_DIR)/$$FILE"; \
  72. done
  73. help:
  74. $(Q)echo -e "\
  75. tsdumper2 $(VERSION) ($(GIT_VER)) build\n\n\
  76. Build targets:\n\
  77. tsdumper2|all - Build tsdumper2.\n\
  78. \n\
  79. install - Install tsdumper2 in PREFIX ($(PREFIX))\n\
  80. uninstall - Uninstall tsdumper2 from PREFIX\n\
  81. \n\
  82. Cleaning targets:\n\
  83. clean - Remove tsdumper2 build files\n\
  84. distclean - Remove all build files\n\
  85. \n\
  86. make V=1 Enable verbose build\n\
  87. make PREFIX=dir Set install prefix\n\
  88. make CROSS=prefix Cross compile\n"