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 |
192 fi | 194 fi |
193 | 195 |
194 # arm neon | 196 # arm neon |
195 if [ 0 -ne ${#neon_sources} ]; then | 197 if [ 0 -ne ${#neon_sources} ]; then |
196 write_target_definition neon_sources[@] "$2" libvpx_intrinsics_neon fpu=neon | 198 write_target_definition neon_sources[@] "$2" libvpx_intrinsics_neon fpu=neon |
197 fi | 199 fi |
198 | 200 |
199 echo " ]," >> "$2" | 201 echo " ]," >> "$2" |
200 | 202 |
201 write_gypi_footer "$2" | 203 write_gypi_footer "$2" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 $BASE_DIR/lint_config.sh -p \ | 336 $BASE_DIR/lint_config.sh -p \ |
335 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ | 337 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ |
336 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \ | 338 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \ |
337 -o $BASE_DIR/$TEMP_DIR/libvpx.config | 339 -o $BASE_DIR/$TEMP_DIR/libvpx.config |
338 fi | 340 fi |
339 | 341 |
340 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 342 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
341 --arch=$2 \ | 343 --arch=$2 \ |
342 --sym=vp8_rtcd \ | 344 --sym=vp8_rtcd \ |
343 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 345 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
| 346 --disable-avx2 \ |
344 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \ | 347 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \ |
345 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h | 348 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h |
346 | 349 |
347 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 350 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
348 --arch=$2 \ | 351 --arch=$2 \ |
349 --sym=vp9_rtcd \ | 352 --sym=vp9_rtcd \ |
350 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 353 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
| 354 --disable-avx2 \ |
351 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \ | 355 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \ |
352 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h | 356 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h |
353 | 357 |
354 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 358 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
355 --arch=$2 \ | 359 --arch=$2 \ |
356 --sym=vpx_scale_rtcd \ | 360 --sym=vpx_scale_rtcd \ |
357 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 361 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
| 362 --disable-avx2 \ |
358 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \ | 363 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \ |
359 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h | 364 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h |
360 | 365 |
361 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config | 366 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config |
362 } | 367 } |
363 | 368 |
364 # Generate Config files. "--enable-external-build" must be set to skip | 369 # Generate Config files. "--enable-external-build" must be set to skip |
365 # detection of capabilities on specific targets. | 370 # detection of capabilities on specific targets. |
366 # $1 - Header file directory. | 371 # $1 - Header file directory. |
367 # $2 - Config command line. | 372 # $2 - Config command line. |
(...skipping 15 matching lines...) Expand all Loading... |
383 } | 388 } |
384 | 389 |
385 echo "Create temporary directory." | 390 echo "Create temporary directory." |
386 TEMP_DIR="$LIBVPX_SRC_DIR.temp" | 391 TEMP_DIR="$LIBVPX_SRC_DIR.temp" |
387 rm -rf $TEMP_DIR | 392 rm -rf $TEMP_DIR |
388 cp -R $LIBVPX_SRC_DIR $TEMP_DIR | 393 cp -R $LIBVPX_SRC_DIR $TEMP_DIR |
389 cd $TEMP_DIR | 394 cd $TEMP_DIR |
390 | 395 |
391 echo "Generate config files." | 396 echo "Generate config files." |
392 # TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available | 397 # TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available |
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" | 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" |
394 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" | 399 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --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}" | 400 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" |
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}" | 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}" |
397 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only --disable-edsp ${all_platforms}" | 402 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only --disable-edsp ${all_platforms}" |
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}" | 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}" |
399 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab
le-realtime-only --disable-edsp ${all_platforms}" | 404 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab
le-realtime-only --disable-edsp ${all_platforms}" |
400 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne
d ${all_platforms}" | 405 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne
d ${all_platforms}" |
401 gen_config_files linux/mips64el "--target=mips64-linux-gcc --disable-fast-unalig
ned ${all_platforms}" | 406 gen_config_files linux/mips64el "--target=mips64-linux-gcc --disable-fast-unalig
ned ${all_platforms}" |
402 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" | 407 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" |
403 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_
platforms}" | 408 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... |
513 make_clean | 518 make_clean |
514 make libvpx_srcs.txt target=libs $config > /dev/null | 519 make libvpx_srcs.txt target=libs $config > /dev/null |
515 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic | 520 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic |
516 | 521 |
517 echo "Remove temporary directory." | 522 echo "Remove temporary directory." |
518 cd $BASE_DIR | 523 cd $BASE_DIR |
519 rm -rf $TEMP_DIR | 524 rm -rf $TEMP_DIR |
520 | 525 |
521 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? | 526 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? |
522 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 527 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
OLD | NEW |