Makefile 1.72 KB
Newer Older
1
# use pkg-config for getting CFLAGS and LDLIBS
2 3 4 5
FFMPEG_LIBS=    libavdevice                        \
                libavformat                        \
                libavfilter                        \
                libavcodec                         \
6
                libswresample                      \
7 8 9
                libswscale                         \
                libavutil                          \

10
CFLAGS += -Wall -g
11 12
CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
13

14
EXAMPLES=       avio_dir_cmd                       \
15
                avio_reading                       \
16
                decoding_encoding                  \
17
                demuxing_decoding                  \
18
                extract_mvs                        \
19 20
                filtering_video                    \
                filtering_audio                    \
21
                http_multiclient                   \
22 23
                metadata                           \
                muxing                             \
24
                remuxing                           \
25
                resampling_audio                   \
26
                scaling_video                      \
27
                transcode_aac                      \
28
                transcoding                        \
29 30 31

OBJS=$(addsuffix .o,$(EXAMPLES))

32
# the following examples make explicit use of the math library
33
avcodec:           LDLIBS += -lm
34
decoding_encoding: LDLIBS += -lm
35
muxing:            LDLIBS += -lm
36
resampling_audio:  LDLIBS += -lm
37

38
.phony: all clean-test clean
39 40 41

all: $(OBJS) $(EXAMPLES)

42
clean-test:
43
	$(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg
44 45

clean: clean-test
46
	$(RM) $(EXAMPLES) $(OBJS)