3 #Uncomment the one you want
8 FFMPEG_HASH
=5a93a85fd0ad62c6c9cdf69415959f116c015f0e
9 FFMPEG_SNAPURL
:= http
://git.videolan.org
/?p
=ffmpeg.git
;a
=snapshot
;h
=$(FFMPEG_HASH
);sf
=tgz
10 FFMPEG_GITURL
:= http
://git.videolan.org
/git
/ffmpeg.git
12 FFMPEG_HASH
=e171022c24c42b1e88a51bb3b4c27f13c87c85cb
13 FFMPEG_SNAPURL
:= http
://git.libav.org
/?p
=libav.git
;a
=snapshot
;h
=$(FFMPEG_HASH
);sf
=tgz
14 FFMPEG_GITURL
:= git
://git.libav.org
/libav.git
17 FFMPEG_BASENAME
:= $(subst .
,_
,$(subst \
,_
,$(subst /,_
,$(FFMPEG_HASH
))))
21 --pkg-config
="$(PKG_CONFIG)" \
23 --disable-encoder
=vorbis \
24 --disable-decoder
=opus \
26 --enable-libopenjpeg \
32 --disable-protocol
=concat \
39 --disable-swresample \
46 --disable-videotoolbox
50 DEPS_ffmpeg
= zlib gsm openjpeg
52 # Optional dependencies
54 FFMPEGCONF
+= --disable-network
57 FFMPEGCONF
+= --enable-libmp3lame
--enable-libvpx
--disable-decoder
=libvpx_vp8
--disable-decoder
=libvpx_vp9
59 FFMPEGCONF
+= --disable-decoder
=libvpx
61 DEPS_ffmpeg
+= lame
$(DEPS_lame
) vpx
$(DEPS_vpx
)
63 FFMPEGCONF
+= --disable-encoders
--disable-muxers
67 ifdef WITH_OPTIMIZATION
69 FFMPEGCONF
+= --enable-small
73 FFMPEGCONF
+= --enable-thumb
77 FFMPEGCONF
+= --optflags
=-O0
80 ifdef HAVE_CROSS_COMPILE
81 FFMPEGCONF
+= --enable-cross-compile
--disable-programs
83 FFMPEGCONF
+= --cross-prefix
=$(HOST
)-
89 FFMPEGCONF
+= --arch
=arm
91 FFMPEGCONF
+= --enable-neon
94 FFMPEGCONF
+= --cpu
=cortex-a8
97 FFMPEGCONF
+= --cpu
=armv6
--disable-neon
102 ifeq ($(ARCH
),aarch64
)
103 FFMPEGCONF
+= --arch
=aarch64
107 ifeq ($(ARCH
),mipsel
)
108 FFMPEGCONF
+= --arch
=mips
110 ifeq ($(ARCH
),mips64el
)
111 FFMPEGCONF
+= --arch
=mips64
116 ifndef HAVE_DARWIN_OS
117 FFMPEGCONF
+= --arch
=x86
122 ifeq ($(ARCH
),x86_64
)
123 ifndef HAVE_DARWIN_OS
124 FFMPEGCONF
+= --arch
=x86_64
130 FFMPEGCONF
+= --arch
=$(ARCH
) --target-os
=darwin
132 FFMPEGCONF
+= --disable-lzma
134 ifeq ($(ARCH
),x86_64
)
135 FFMPEGCONF
+= --cpu
=core2
138 FFMPEGCONF
+= --enable-pic
--extra-ldflags
="$(EXTRA_CFLAGS)"
140 FFMPEGCONF
+= --as="$(AS)"
147 FFMPEGCONF
+= --target-os
=linux
--enable-pic
152 # broken text relocations
153 ifeq ($(ANDROID_ABI
), x86
)
154 FFMPEGCONF
+= --disable-mmx
--disable-mmxext
--disable-inline-asm
156 ifeq ($(ANDROID_ABI
), x86_64
)
157 FFMPEGCONF
+= --disable-mmx
--disable-mmxext
--disable-inline-asm
160 ifeq ($(ANDROID_ABI
), armeabi-v7a
)
161 FFMPEGCONF
+= --as='gas-preprocessor.pl -as-type clang -arch arm $(CC)'
168 ifndef HAVE_VISUALSTUDIO
170 ifndef HAVE_MINGW_W64
171 DEPS_ffmpeg
+= directx
174 FFMPEGCONF
+= --target-os
=mingw32
175 FFMPEGCONF
+= --enable-w32threads
177 FFMPEGCONF
+= --enable-dxva2
179 FFMPEGCONF
+= --disable-dxva2
183 FFMPEGCONF
+= --cpu
=athlon64
--arch
=x86_64
185 ifeq ($(ARCH
),i386
) # 32bits intel
186 FFMPEGCONF
+= --cpu
=i686
--arch
=x86
189 FFMPEGCONF
+= --arch
=arm
195 FFMPEGCONF
+= --enable-pthreads
200 ifeq ($(ARCH
),x86_64
)
201 FFMPEGCONF
+= --cpu
=core2
203 FFMPEGCONF
+= --target-os
=sunos
--enable-pic
208 ifeq ($(call need_pkg
,"libavcodec >= 55.0.0 libavformat >= 53.21.0 libswscale"),)
212 FFMPEGCONF
+= --nm
="$(NM)" --ar="$(AR)"
214 $(TARBALLS
)/ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz
:
215 $(call download_git
,$(FFMPEG_GITURL
),,$(FFMPEG_HASH
))
217 .sum-ffmpeg
: $(TARBALLS
)/ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz
218 $(call check_githash
,$(FFMPEG_HASH
))
221 ffmpeg
: ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz .sum-ffmpeg
222 rm -Rf
$@
$@
-$(FFMPEG_BASENAME
)
223 mkdir
-p
$@
-$(FFMPEG_BASENAME
)
224 tar xvJf
"$<" --strip-components
=1 -C
$@
-$(FFMPEG_BASENAME
)
225 $(APPLY
) $(SRC
)/ffmpeg
/armv7_fixup.patch
229 cd
$< && $(HOSTVARS
) .
/configure \
230 --extra-ldflags
="$(LDFLAGS)" $(FFMPEGCONF
) \
231 --prefix="$(PREFIX)" --enable-static
--disable-shared
232 cd
$< && $(MAKE
) install-libs install-headers