doc/examples: add debug compilation flag.
[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                 libavresample                      \
7                 libswresample                      \
8                 libswscale                         \
9                 libavutil                          \
10
11 CFLAGS += -Wall -O2 -g
12 CFLAGS += $(shell pkg-config --cflags $(FFMPEG_LIBS))
13 LDLIBS += $(shell pkg-config --libs $(FFMPEG_LIBS))
14
15 EXAMPLES=       decoding_encoding                  \
16                 filtering_video                    \
17                 filtering_audio                    \
18                 metadata                           \
19                 muxing                             \
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
28
29 all: $(OBJS) $(EXAMPLES)
30
31 clean:
32         rm -rf $(EXAMPLES) $(OBJS)