Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 -g
  10. CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
  11. LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
  12. EXAMPLES= avio_reading \
  13. avcodec \
  14. demuxing_decoding \
  15. filtering_video \
  16. filtering_audio \
  17. metadata \
  18. muxing \
  19. remuxing \
  20. resampling_audio \
  21. scaling_video \
  22. transcode_aac \
  23. OBJS=$(addsuffix .o,$(EXAMPLES))
  24. # the following examples make explicit use of the math library
  25. avcodec: LDLIBS += -lm
  26. muxing: LDLIBS += -lm
  27. resampling_audio: LDLIBS += -lm
  28. .phony: all clean-test clean
  29. all: $(OBJS) $(EXAMPLES)
  30. clean-test:
  31. $(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg
  32. clean: clean-test
  33. $(RM) $(EXAMPLES) $(OBJS)