Makefile.example 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. # missing the following targets, since they need special options in the FFmpeg build:
  13. # qsv_decode
  14. # qsv_transcode
  15. # vaapi_encode
  16. # vaapi_transcode
  17. EXAMPLES=\
  18. avio_http_serve_files \
  19. avio_list_dir \
  20. avio_read_callback \
  21. decode_audio \
  22. decode_filter_audio \
  23. decode_filter_video \
  24. decode_video \
  25. demux_decode \
  26. encode_audio \
  27. encode_video \
  28. extract_mvs \
  29. hw_decode \
  30. mux \
  31. remux \
  32. resample_audio \
  33. scale_video \
  34. show_metadata \
  35. transcode_aac \
  36. transcode
  37. OBJS=$(addsuffix .o,$(EXAMPLES))
  38. # the following examples make explicit use of the math library
  39. avcodec: LDLIBS += -lm
  40. encode_audio: LDLIBS += -lm
  41. mux: LDLIBS += -lm
  42. resample_audio: LDLIBS += -lm
  43. .phony: all clean-test clean
  44. all: $(OBJS) $(EXAMPLES)
  45. clean-test:
  46. $(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg
  47. clean: clean-test
  48. $(RM) $(EXAMPLES) $(OBJS)