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.

39 lines
1.2KB

  1. # use pkg-config for getting CFLAGS and LDLIBS
  2. FFMPEG_LIBS= libavdevice \
  3. libavformat \
  4. libavfilter \
  5. libavcodec \
  6. libavresample \
  7. libswresample \
  8. libswscale \
  9. libavutil \
  10. CFLAGS += -Wall -O2
  11. CFLAGS += $(shell pkg-config --cflags $(FFMPEG_LIBS))
  12. LDLIBS += $(shell pkg-config --libs $(FFMPEG_LIBS))
  13. EXAMPLES= decoding_encoding \
  14. filtering_video \
  15. filtering_audio \
  16. metadata \
  17. muxing \
  18. OBJS=$(addsuffix .o,$(EXAMPLES))
  19. # the following examples make explicit use of the math library
  20. decoding_encoding: LDLIBS += -lm
  21. muxing: LDLIBS += -lm
  22. %: %.o
  23. $(CC) $< $(LDLIBS) -o $@
  24. %.o: %.c
  25. $(CC) $< $(CFLAGS) -c -o $@
  26. .phony: all clean
  27. all: $(OBJS) $(EXAMPLES)
  28. clean:
  29. rm -rf $(EXAMPLES) $(OBJS)