94db3836acda772d5a0db2b5c8d80e9a83f590ce
[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 -O2 -g
11 CFLAGS += $(shell pkg-config --cflags $(FFMPEG_LIBS))
12 LDLIBS += $(shell pkg-config --libs $(FFMPEG_LIBS))
13
14 EXAMPLES=       decoding_encoding                  \
15                 filtering_video                    \
16                 filtering_audio                    \
17                 metadata                           \
18                 muxing                             \
19                 scaling_video                      \
20
21 OBJS=$(addsuffix .o,$(EXAMPLES))
22
23 # the following examples make explicit use of the math library
24 decoding_encoding: LDLIBS += -lm
25 muxing:            LDLIBS += -lm
26
27 .phony: all clean-test clean
28
29 all: $(OBJS) $(EXAMPLES)
30
31 clean-test:
32         $(RM) -f test*.pgm test.h264 test.mp2 test.sw test.mpg outscale*.pgm
33
34 clean: clean-test
35         $(RM) -f $(EXAMPLES) $(OBJS)