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.

38 lines
1.1KB

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