2012-05-12 19:08:26 +03:00
|
|
|
# use pkg-config for getting CFLAGS and LDLIBS
|
2012-05-08 19:22:28 +03:00
|
|
|
FFMPEG_LIBS= libavdevice \
|
|
|
|
libavformat \
|
|
|
|
libavfilter \
|
|
|
|
libavcodec \
|
2012-05-10 00:45:16 +03:00
|
|
|
libswresample \
|
2012-05-08 19:22:28 +03:00
|
|
|
libswscale \
|
|
|
|
libavutil \
|
|
|
|
|
2013-06-26 17:13:58 +03:00
|
|
|
CFLAGS += -Wall -g
|
2012-08-24 17:49:04 +03:00
|
|
|
CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
|
|
|
|
LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
|
2011-05-29 13:47:40 +03:00
|
|
|
|
2014-01-26 20:30:06 +03:00
|
|
|
EXAMPLES= avio_reading \
|
|
|
|
decoding_encoding \
|
2013-11-04 14:35:17 +03:00
|
|
|
demuxing_decoding \
|
2012-05-08 19:22:28 +03:00
|
|
|
filtering_video \
|
|
|
|
filtering_audio \
|
|
|
|
metadata \
|
|
|
|
muxing \
|
2014-01-19 15:45:48 +03:00
|
|
|
remuxing \
|
2012-11-30 15:51:40 +03:00
|
|
|
resampling_audio \
|
2012-08-21 15:43:51 +03:00
|
|
|
scaling_video \
|
2013-11-28 15:18:58 +03:00
|
|
|
transcode_aac \
|
2011-05-29 13:47:40 +03:00
|
|
|
|
|
|
|
OBJS=$(addsuffix .o,$(EXAMPLES))
|
|
|
|
|
2012-05-10 00:06:43 +03:00
|
|
|
# the following examples make explicit use of the math library
|
|
|
|
decoding_encoding: LDLIBS += -lm
|
|
|
|
muxing: LDLIBS += -lm
|
2013-09-04 16:49:18 +03:00
|
|
|
resampling_audio: LDLIBS += -lm
|
2012-05-10 00:06:43 +03:00
|
|
|
|
2012-08-23 21:17:25 +03:00
|
|
|
.phony: all clean-test clean
|
2011-05-29 13:47:40 +03:00
|
|
|
|
|
|
|
all: $(OBJS) $(EXAMPLES)
|
|
|
|
|
2012-08-23 21:17:25 +03:00
|
|
|
clean-test:
|
2012-08-30 23:37:44 +03:00
|
|
|
$(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg
|
2012-08-23 21:17:25 +03:00
|
|
|
|
|
|
|
clean: clean-test
|
2012-08-28 21:06:45 +03:00
|
|
|
$(RM) $(EXAMPLES) $(OBJS)
|