Makefile 1.5 KB

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