1# use pkg-config for getting CFLAGS and LDLIBS 2FFMPEG_LIBS= libavdevice \ 3 libavformat \ 4 libavfilter \ 5 libavcodec \ 6 libswresample \ 7 libswscale \ 8 libavutil \ 9 10CFLAGS += -Wall -g 11CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS) 12LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS) 13 14EXAMPLES= avio_list_dir \ 15 avio_reading \ 16 decode_audio \ 17 decode_video \ 18 demuxing_decoding \ 19 encode_audio \ 20 encode_video \ 21 extract_mvs \ 22 filtering_video \ 23 filtering_audio \ 24 http_multiclient \ 25 hw_decode \ 26 metadata \ 27 muxing \ 28 remuxing \ 29 resampling_audio \ 30 scaling_video \ 31 transcode_aac \ 32 transcoding \ 33 34OBJS=$(addsuffix .o,$(EXAMPLES)) 35 36# the following examples make explicit use of the math library 37avcodec: LDLIBS += -lm 38encode_audio: LDLIBS += -lm 39muxing: LDLIBS += -lm 40resampling_audio: LDLIBS += -lm 41 42.phony: all clean-test clean 43 44all: $(OBJS) $(EXAMPLES) 45 46clean-test: 47 $(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg 48 49clean: clean-test 50 $(RM) $(EXAMPLES) $(OBJS) 51