doc/examples: add directory listing example
[ffmpeg.git] / 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_list_dir                      \
15                 avio_reading                       \
16                 decoding_encoding                  \
17                 demuxing_decoding                  \
18                 extract_mvs                        \
19                 filtering_video                    \
20                 filtering_audio                    \
21                 metadata                           \
22                 muxing                             \
23                 remuxing                           \
24                 resampling_audio                   \
25                 scaling_video                      \
26                 transcode_aac                      \
27                 transcoding                        \
28
29 OBJS=$(addsuffix .o,$(EXAMPLES))
30
31 # the following examples make explicit use of the math library
32 avcodec:           LDLIBS += -lm
33 decoding_encoding: LDLIBS += -lm
34 muxing:            LDLIBS += -lm
35 resampling_audio:  LDLIBS += -lm
36
37 .phony: all clean-test clean
38
39 all: $(OBJS) $(EXAMPLES)
40
41 clean-test:
42         $(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg
43
44 clean: clean-test
45         $(RM) $(EXAMPLES) $(OBJS)