libtsfuncs is a library for mpeg PSI parsing and generation. https://georgi.unixsol.org/programs/libtsfuncs/

Makefile 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. CC = $(CROSS)$(TARGET)gcc
  2. LINK = $(CROSS)$(TARGET)ld -o
  3. MKDEP = $(CROSS)$(TARGET)$(CC) -M -o $*.d $<
  4. LIBRARY_LINK_OPTS = -L. -r
  5. CFLAGS = -O2 -ggdb -std=c99 -D_GNU_SOURCE
  6. CFLAGS += -Wall -Wextra -Wshadow -Wformat-security -Wstrict-prototypes
  7. RM = /bin/rm -f
  8. Q=@
  9. OBJS = log.o tsfuncs.o crc.o misc.o time.o \
  10. sections.o secdata.o \
  11. descs.o \
  12. pat.o pat_desc.o \
  13. cat.o \
  14. pmt.o \
  15. nit.o nit_desc.o \
  16. sdt.o sdt_desc.o \
  17. eit.o eit_desc.o \
  18. tdt.o tdt_desc.o \
  19. pes.o pes_data.o \
  20. pes_es.o \
  21. privsec.o
  22. PROG = libtsfuncs.a
  23. tstest_OBJS = tstest.o libtsfuncs.a
  24. all: $(PROG) tstest
  25. $(PROG): $(OBJS) tsdata.h tsfuncs.h
  26. $(Q)echo " LINK $(PROG)"
  27. $(Q)$(LINK) $@ $(LIBRARY_LINK_OPTS) $(OBJS)
  28. tstest: $(tstest_OBJS)
  29. $(Q)echo " LINK tstest"
  30. $(Q)$(CC) $(CFLAGS) $(tstest_OBJS) -o tstest
  31. %.o: %.c tsdata.h tsfuncs.h
  32. @$(MKDEP)
  33. $(Q)echo " CC libtsfuncs $<"
  34. $(Q)$(CC) $(CFLAGS) -c $<
  35. -include $(OBJS:.o=.d)
  36. clean:
  37. $(Q)echo " RM $(PROG) $(OBJS:.o=.{o,d})"
  38. $(Q)$(RM) $(PROG) tstest $(OBJS:.o=.{o,d}) *~
  39. distclean: clean