Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. decoding_encoding \
  14. demuxing_decoding \
  15. extract_mvs \
  16. filtering_video \
  17. filtering_audio \
  18. metadata \
  19. muxing \
  20. remuxing \
  21. resampling_audio \
  22. scaling_video \
  23. transcode_aac \
  24. transcoding \
  25. OBJS=$(addsuffix .o,$(EXAMPLES))
  26. # the following examples make explicit use of the math library
  27. avcodec: LDLIBS += -lm
  28. decoding_encoding: LDLIBS += -lm
  29. muxing: LDLIBS += -lm
  30. resampling_audio: LDLIBS += -lm
  31. .phony: all clean-test clean
  32. all: $(OBJS) $(EXAMPLES)
  33. clean-test:
  34. $(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg
  35. clean: clean-test
  36. $(RM) $(EXAMPLES) $(OBJS)