您的位置:首页 > 其它

makefile 分析

2015-09-14 11:43 501 查看
个人认为初学者对ffmpeg刚刚开始,肯定对连接哪个库不了解,因此先从FFmpeg官网上的Makefile着手,了解需要链接哪些库。

ffmpeg_2.8/doc/Makefile内容如下:

# use pkg-config for getting CFLAGS and LDLIBS
FFMPEG_LIBS=    libavdevice                        \
libavformat                        \
libavfilter                        \
libavcodec                         \
libswresample                      \
libswscale                         \
libavutil                          \

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

EXAMPLES=       avio_dir_cmd                       \
avio_reading                       \
decoding_encoding                  \
demuxing_decoding                  \
extract_mvs                        \
filtering_video                    \
filtering_audio                    \
http_multiclient                   \
metadata                           \
muxing                             \
remuxing                           \
resampling_audio                   \
scaling_video                      \
transcode_aac                      \
transcoding                        \

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

# the following examples make explicit use of the math library
avcodec:           LDLIBS += -lm
decoding_encoding: LDLIBS += -lm
muxing:            LDLIBS += -lm
resampling_audio:  LDLIBS += -lm

.phony: all clean-test clean

all: $(OBJS) $(EXAMPLES)

clean-test:
$(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg

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


往Makefile增加文件,请看下面的链接:
https://github.com/FFmpeg/FFmpeg/commit/767d780ec001167b2fd8f6cfe4ef78a3a8b1e34c
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: