OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script is used to generate .gypi, .gni files and files in the | 7 # This script is used to generate .gypi, .gni files and files in the |
8 # config/platform directories needed to build libvpx. | 8 # config/platform directories needed to build libvpx. |
9 # Every time libvpx source code is updated just run this script. | 9 # Every time libvpx source code is updated just run this script. |
10 # | 10 # |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 fi | 181 fi |
182 if [ 0 -ne ${#sse4_1_sources} ]; then | 182 if [ 0 -ne ${#sse4_1_sources} ]; then |
183 write_target_definition sse4_1_sources[@] "$2" libvpx_intrinsics_sse4_1 sse4
.1 | 183 write_target_definition sse4_1_sources[@] "$2" libvpx_intrinsics_sse4_1 sse4
.1 |
184 fi | 184 fi |
185 if [ 0 -ne ${#avx_sources} ]; then | 185 if [ 0 -ne ${#avx_sources} ]; then |
186 #write_target_definition avx_sources[@] "$2" libvpx_intrinsics_avx avx | 186 #write_target_definition avx_sources[@] "$2" libvpx_intrinsics_avx avx |
187 echo "ERROR: Uncomment avx sections in libvpx.gyp" | 187 echo "ERROR: Uncomment avx sections in libvpx.gyp" |
188 exit 1 | 188 exit 1 |
189 fi | 189 fi |
190 if [ 0 -ne ${#avx2_sources} ]; then | 190 if [ 0 -ne ${#avx2_sources} ]; then |
191 #write_target_definition avx2_sources[@] "$2" libvpx_intrinsics_avx2 avx2 | 191 write_target_definition avx2_sources[@] "$2" libvpx_intrinsics_avx2 avx2 |
192 echo "ERROR: Uncomment avx2 sections in libvpx.gyp" | |
193 exit 1 | |
194 fi | 192 fi |
195 | 193 |
196 # arm neon | 194 # arm neon |
197 if [ 0 -ne ${#neon_sources} ]; then | 195 if [ 0 -ne ${#neon_sources} ]; then |
198 write_target_definition neon_sources[@] "$2" libvpx_intrinsics_neon fpu=neon | 196 write_target_definition neon_sources[@] "$2" libvpx_intrinsics_neon fpu=neon |
199 fi | 197 fi |
200 | 198 |
201 echo " ]," >> "$2" | 199 echo " ]," >> "$2" |
202 | 200 |
203 write_gypi_footer "$2" | 201 write_gypi_footer "$2" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 $BASE_DIR/lint_config.sh -p \ | 334 $BASE_DIR/lint_config.sh -p \ |
337 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ | 335 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ |
338 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \ | 336 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \ |
339 -o $BASE_DIR/$TEMP_DIR/libvpx.config | 337 -o $BASE_DIR/$TEMP_DIR/libvpx.config |
340 fi | 338 fi |
341 | 339 |
342 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 340 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
343 --arch=$2 \ | 341 --arch=$2 \ |
344 --sym=vp8_rtcd \ | 342 --sym=vp8_rtcd \ |
345 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 343 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
346 --disable-avx2 \ | |
347 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \ | 344 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \ |
348 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h | 345 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h |
349 | 346 |
350 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 347 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
351 --arch=$2 \ | 348 --arch=$2 \ |
352 --sym=vp9_rtcd \ | 349 --sym=vp9_rtcd \ |
353 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 350 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
354 --disable-avx2 \ | |
355 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \ | 351 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \ |
356 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h | 352 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h |
357 | 353 |
358 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 354 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
359 --arch=$2 \ | 355 --arch=$2 \ |
360 --sym=vpx_scale_rtcd \ | 356 --sym=vpx_scale_rtcd \ |
361 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 357 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
362 --disable-avx2 \ | |
363 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \ | 358 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \ |
364 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h | 359 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h |
365 | 360 |
366 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config | 361 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config |
367 } | 362 } |
368 | 363 |
369 # Generate Config files. "--enable-external-build" must be set to skip | 364 # Generate Config files. "--enable-external-build" must be set to skip |
370 # detection of capabilities on specific targets. | 365 # detection of capabilities on specific targets. |
371 # $1 - Header file directory. | 366 # $1 - Header file directory. |
372 # $2 - Config command line. | 367 # $2 - Config command line. |
(...skipping 15 matching lines...) Expand all Loading... |
388 } | 383 } |
389 | 384 |
390 echo "Create temporary directory." | 385 echo "Create temporary directory." |
391 TEMP_DIR="$LIBVPX_SRC_DIR.temp" | 386 TEMP_DIR="$LIBVPX_SRC_DIR.temp" |
392 rm -rf $TEMP_DIR | 387 rm -rf $TEMP_DIR |
393 cp -R $LIBVPX_SRC_DIR $TEMP_DIR | 388 cp -R $LIBVPX_SRC_DIR $TEMP_DIR |
394 cd $TEMP_DIR | 389 cd $TEMP_DIR |
395 | 390 |
396 echo "Generate config files." | 391 echo "Generate config files." |
397 # TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available | 392 # TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available |
398 all_platforms="--enable-external-build --enable-postproc --disable-install-srcs
--enable-multi-res-encoding --enable-temporal-denoising --disable-unit-tests --d
isable-install-docs --disable-examples --disable-avx2 --enable-vp9-temporal-deno
ising" | 393 all_platforms="--enable-external-build --enable-postproc --disable-install-srcs
--enable-multi-res-encoding --enable-temporal-denoising --disable-unit-tests --d
isable-install-docs --disable-examples --enable-vp9-temporal-denoising" |
399 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" | 394 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" |
400 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" | 395 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" |
401 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt
ime-only --disable-install-bins --disable-install-libs --disable-edsp ${all_plat
forms}" | 396 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt
ime-only --disable-install-bins --disable-install-libs --disable-edsp ${all_plat
forms}" |
402 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only --disable-edsp ${all_platforms}" | 397 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only --disable-edsp ${all_platforms}" |
403 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi
c --enable-realtime-only --enable-runtime-cpu-detect --disable-edsp ${all_platfo
rms}" | 398 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi
c --enable-realtime-only --enable-runtime-cpu-detect --disable-edsp ${all_platfo
rms}" |
404 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab
le-realtime-only --disable-edsp ${all_platforms}" | 399 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab
le-realtime-only --disable-edsp ${all_platforms}" |
405 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne
d ${all_platforms}" | 400 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne
d ${all_platforms}" |
406 gen_config_files linux/mips64el "--target=mips64-linux-gcc --disable-fast-unalig
ned ${all_platforms}" | 401 gen_config_files linux/mips64el "--target=mips64-linux-gcc --disable-fast-unalig
ned ${all_platforms}" |
407 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" | 402 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" |
408 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_
platforms}" | 403 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_
platforms}" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 make_clean | 513 make_clean |
519 make libvpx_srcs.txt target=libs $config > /dev/null | 514 make libvpx_srcs.txt target=libs $config > /dev/null |
520 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic | 515 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic |
521 | 516 |
522 echo "Remove temporary directory." | 517 echo "Remove temporary directory." |
523 cd $BASE_DIR | 518 cd $BASE_DIR |
524 rm -rf $TEMP_DIR | 519 rm -rf $TEMP_DIR |
525 | 520 |
526 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? | 521 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? |
527 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 522 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
OLD | NEW |