]> git.sesse.net Git - ffmpeg/blob - doc/examples/Makefile
Merge commit 'ee164727dd64c199b87118917e674b17c25e0da3'
[ffmpeg] / doc / examples / Makefile
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
10 CFLAGS += -Wall -g
11 CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
12 LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
13
14 EXAMPLES=       avio_dir_cmd                       \
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                 metadata                           \
26                 muxing                             \
27                 remuxing                           \
28                 resampling_audio                   \
29                 scaling_video                      \
30                 transcode_aac                      \
31                 transcoding                        \
32
33 OBJS=$(addsuffix .o,$(EXAMPLES))
34
35 # the following examples make explicit use of the math library
36 avcodec:           LDLIBS += -lm
37 encode_audio:      LDLIBS += -lm
38 muxing:            LDLIBS += -lm
39 resampling_audio:  LDLIBS += -lm
40
41 .phony: all clean-test clean
42
43 all: $(OBJS) $(EXAMPLES)
44
45 clean-test:
46         $(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg
47
48 clean: clean-test
49         $(RM) $(EXAMPLES) $(OBJS)