3 #Uncomment the one you want
8 FFMPEG_HASH
=a82468514048fb87d9bf38689866bc3b9aaccd02
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
=825e463a170c7004c63030dc484b2b2de869227b
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 \
45 --disable-videotoolbox
49 DEPS_ffmpeg
= zlib gsm openjpeg
51 # Optional dependencies
53 FFMPEGCONF
+= --disable-network
56 FFMPEGCONF
+= --enable-libmp3lame
--enable-libvpx
--disable-decoder
=libvpx_vp8
--disable-decoder
=libvpx_vp9
58 FFMPEGCONF
+= --disable-decoder
=libvpx
60 DEPS_ffmpeg
+= lame
$(DEPS_lame
) vpx
$(DEPS_vpx
)
62 FFMPEGCONF
+= --disable-encoders
--disable-muxers
66 ifdef WITH_OPTIMIZATION
68 FFMPEGCONF
+= --enable-small
72 FFMPEGCONF
+= --enable-thumb
76 FFMPEGCONF
+= --optflags
=-O0
79 ifdef HAVE_CROSS_COMPILE
80 FFMPEGCONF
+= --enable-cross-compile
--disable-programs
82 FFMPEGCONF
+= --cross-prefix
=$(HOST
)-
88 FFMPEGCONF
+= --arch
=arm
90 FFMPEGCONF
+= --enable-neon
93 FFMPEGCONF
+= --cpu
=cortex-a8
96 FFMPEGCONF
+= --cpu
=armv6
--disable-neon
101 ifeq ($(ARCH
),aarch64
)
102 FFMPEGCONF
+= --arch
=aarch64
106 ifeq ($(ARCH
),mipsel
)
107 FFMPEGCONF
+= --arch
=mips
109 ifeq ($(ARCH
),mips64el
)
110 FFMPEGCONF
+= --arch
=mips64
115 ifndef HAVE_DARWIN_OS
116 FFMPEGCONF
+= --arch
=x86
121 ifeq ($(ARCH
),x86_64
)
122 ifndef HAVE_DARWIN_OS
123 FFMPEGCONF
+= --arch
=x86_64
129 FFMPEGCONF
+= --arch
=$(ARCH
) --target-os
=darwin
131 FFMPEGCONF
+= --disable-lzma
133 ifeq ($(ARCH
),x86_64
)
134 FFMPEGCONF
+= --cpu
=core2
137 FFMPEGCONF
+= --enable-pic
--extra-ldflags
="$(EXTRA_CFLAGS)"
139 FFMPEGCONF
+= --as="$(AS)"
143 FFMPEGCONF
+= --enable-vda
149 FFMPEGCONF
+= --target-os
=linux
--enable-pic
154 # broken text relocations
155 ifeq ($(ANDROID_ABI
), x86
)
156 FFMPEGCONF
+= --disable-mmx
--disable-mmxext
--disable-inline-asm
158 ifeq ($(ANDROID_ABI
), x86_64
)
159 FFMPEGCONF
+= --disable-mmx
--disable-mmxext
--disable-inline-asm
162 ifeq ($(ANDROID_ABI
), armeabi-v7a
)
163 FFMPEGCONF
+= --as='gas-preprocessor.pl -as-type clang -arch arm $(CC)'
170 ifndef HAVE_VISUALSTUDIO
172 ifndef HAVE_MINGW_W64
173 DEPS_ffmpeg
+= directx
176 FFMPEGCONF
+= --target-os
=mingw32
177 FFMPEGCONF
+= --enable-w32threads
179 FFMPEGCONF
+= --enable-dxva2
181 FFMPEGCONF
+= --disable-dxva2
185 FFMPEGCONF
+= --cpu
=athlon64
--arch
=x86_64
187 ifeq ($(ARCH
),i386
) # 32bits intel
188 FFMPEGCONF
+= --cpu
=i686
--arch
=x86
191 FFMPEGCONF
+= --arch
=arm
197 FFMPEGCONF
+= --enable-pthreads
202 ifeq ($(ARCH
),x86_64
)
203 FFMPEGCONF
+= --cpu
=core2
205 FFMPEGCONF
+= --target-os
=sunos
--enable-pic
210 ifeq ($(call need_pkg
,"libavcodec >= 55.0.0 libavformat >= 53.21.0 libswscale"),)
214 FFMPEGCONF
+= --nm
="$(NM)" --ar="$(AR)"
216 $(TARBALLS
)/ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz
:
217 $(call download_git
,$(FFMPEG_GITURL
),,$(FFMPEG_HASH
))
219 .sum-ffmpeg
: $(TARBALLS
)/ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz
220 $(call check_githash
,$(FFMPEG_HASH
))
223 ffmpeg
: ffmpeg-
$(FFMPEG_BASENAME
).
tar.xz .sum-ffmpeg
224 rm -Rf
$@
$@
-$(FFMPEG_BASENAME
)
225 mkdir
-p
$@
-$(FFMPEG_BASENAME
)
226 tar xvJf
"$<" --strip-components
=1 -C
$@
-$(FFMPEG_BASENAME
)
228 $(APPLY
) $(SRC
)/ffmpeg
/force-unicode.patch
233 cd
$< && $(HOSTVARS
) .
/configure \
234 --extra-ldflags
="$(LDFLAGS)" $(FFMPEGCONF
) \
235 --prefix="$(PREFIX)" --enable-static
--disable-shared
236 cd
$< && $(MAKE
) install-libs install-headers