|
#!/bin/sh |
|
|
|
cat<<EOF |
|
rule ffmpeg_yasm_target_assemble_0e7c357cbd4da6a91e9b60305e71c941 |
|
command = cd ../../third_party/ffmpeg; ../../out/Release/yasm -DPIC $ |
|
-DARCH_X86_64 -I chromium/config/Chromium/linux/x64 -I $ |
|
libavcodec/x86/ -I libavutil/x86/ -I . -w -P config.asm -DPIC -felf64 $ |
|
-m amd64 -o "../../out/Release/gen/third_party/ffmpeg/yasm/\${root}.o" $ |
|
"${source}" |
|
description = RULE Compile assembly \${source} |
|
restat = 1 |
|
|
|
EOF |
|
|
|
cat afilez | while read d f; do |
|
u=`md5sum ./${d}/${f}.asm | cut -d' ' -f1`; |
|
D=`echo $d | sed s/'^\/'//`; |
|
cat <<EOF |
|
build gen/third_party/ffmpeg/yasm/${f}.o: $ |
|
ffmpeg_yasm_target_assemble_0e7c357cbd4da6a91e9b60305e71c941 $ |
|
../../third_party/ffmpeg${d}/${f}.asm | yasm || yasm |
|
source = ${D}/${f}.asm |
|
root = ${f} |
|
unique_name = ${u} |
|
EOF |
|
done |
|
|
|
cat<<EOF |
|
build obj/third_party/ffmpeg/ffmpeg_yasm.actions_rules_copies.stamp: stamp $ |
|
EOF |
|
|
|
cat afilez | while read d f; do |
|
cat<<EOF |
|
gen/third_party/ffmpeg/yasm/${f}.o $ |
|
EOF |
|
done |
|
|
|
cat<<EOF |
|
defines = -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD $ |
|
-DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_DEFAULT_RENDER_THEME=1 $ |
|
-DUSE_LIBJPEG_TURBO=1 -DUSE_NSS=1 -DUSE_X11=1 -DENABLE_ONE_CLICK_SIGNIN $ |
|
-DGTK_DISABLE_SINGLE_INCLUDES=1 -DUSE_XI2_MT=2 -DENABLE_REMOTING=1 $ |
|
-DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS $ |
|
-DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH $ |
|
-DENABLE_NOTIFICATIONS -DUSE_UDEV -DENABLE_EGLIMAGE=1 $ |
|
-DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 $ |
|
-DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 $ |
|
-DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_BACKGROUND=1 $ |
|
-DENABLE_AUTOMATION=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 $ |
|
-DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1 $ |
|
-DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_MANAGED_USERS=1 $ |
|
-DENABLE_MDNS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 |
|
includes = |
|
cflags = -fstack-protector --param=ssp-buffer-size=4 -pthread $ |
|
-fno-exceptions -fno-strict-aliasing -Wno-unused-parameter $ |
|
-Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC $ |
|
-Wno-unused-local-typedefs -Wno-format -fuse-ld=gold -Wno-unused-result $ |
|
-O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables |
|
cflags_c = |
|
cflags_cc = -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden $ |
|
-Wno-deprecated |
|
|
|
build obj/third_party/ffmpeg/ffmpeg_yasm.xcode_hack.o: cc $ |
|
../../third_party/ffmpeg/xcode_hack.c || $ |
|
obj/third_party/ffmpeg/ffmpeg_yasm.actions_rules_copies.stamp |
|
|
|
build obj/third_party/ffmpeg/libffmpeg_yasm.a: alink_thin $ |
|
obj/third_party/ffmpeg/ffmpeg_yasm.xcode_hack.o $ |
|
EOF |
|
|
|
cat afilez | while read d f; do |
|
cat<<EOF |
|
gen/third_party/ffmpeg/yasm/${f}.o $ |
|
EOF |
|
done |
|
|
|
|
|
cat<<EOF |
|
gen/third_party/ffmpeg/yasm/lls.o || $ |
|
obj/third_party/ffmpeg/ffmpeg_yasm.actions_rules_copies.stamp |
|
EOF |
|
|
|
|
Why All the hacks? Why not just modify the
build_ffmpeg.sh
script, run it, then runcopy_config.sh
then justninja -C out/Release -j8 ffmpegsumo
.That will build all dependencies of FFmpeg and will give you a libffmpegsumo.so in your
out/Release
folder.