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 files and files in the config/platform | 7 # This script is used to generate .gypi files and files in the config/platform |
8 # directories needed to build libvpx. | 8 # 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 echo " 'conditions': [" >> $2 | 81 echo " 'conditions': [" >> $2 |
82 echo " ['os_posix==1 and OS!=\"mac\" and OS!=\"ios\"', {" >> $2 | 82 echo " ['os_posix==1 and OS!=\"mac\" and OS!=\"ios\"', {" >> $2 |
83 echo " 'cflags!': [ '-mfpu=vfpv3-d16' ]," >> $2 | 83 echo " 'cflags!': [ '-mfpu=vfpv3-d16' ]," >> $2 |
84 echo " 'cflags': [ '-m$4', ]," >> $2 | 84 echo " 'cflags': [ '-m$4', ]," >> $2 |
85 echo " }]," >> $2 | 85 echo " }]," >> $2 |
86 echo " ['OS==\"mac\" or OS==\"ios\"', {" >> $2 | 86 echo " ['OS==\"mac\" or OS==\"ios\"', {" >> $2 |
87 echo " 'xcode_settings': {" >> $2 | 87 echo " 'xcode_settings': {" >> $2 |
88 echo " 'OTHER_CFLAGS': [ '-m$4', ]," >> $2 | 88 echo " 'OTHER_CFLAGS': [ '-m$4', ]," >> $2 |
89 echo " }," >> $2 | 89 echo " }," >> $2 |
90 echo " }]," >> $2 | 90 echo " }]," >> $2 |
| 91 if [[ $4 == avx* ]]; then |
| 92 echo " ['OS==\"win\"', {" >> $2 |
| 93 echo " 'msvs_settings': {" >> $2 |
| 94 echo " 'VCCLCompilerTool': {" >> $2 |
| 95 echo " 'EnableEnhancedInstructionSet': '3', # /arch:AVX" >> $2 |
| 96 echo " }," >> $2 |
| 97 echo " }," >> $2 |
| 98 echo " }]," >> $2 |
| 99 fi |
91 echo " ]," >> $2 | 100 echo " ]," >> $2 |
92 echo " }," >> $2 | 101 echo " }," >> $2 |
93 } | 102 } |
94 | 103 |
95 | 104 |
96 # Generate a gypi which applies additional compiler flags based on the file | 105 # Generate a gypi which applies additional compiler flags based on the file |
97 # name. | 106 # name. |
98 # $1 - Array name for file list. | 107 # $1 - Array name for file list. |
99 # $2 - Output file | 108 # $2 - Output file |
100 function write_special_flags { | 109 function write_special_flags { |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 322 |
314 echo "Generate Config Files" | 323 echo "Generate Config Files" |
315 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" | 324 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" |
316 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" | 325 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" |
317 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" | 326 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" |
318 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt
ime-only --disable-install-bins --disable-install-libs ${all_platforms}" | 327 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt
ime-only --disable-install-bins --disable-install-libs ${all_platforms}" |
319 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only ${all_platforms}" | 328 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only ${all_platforms}" |
320 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi
c --enable-realtime-only --enable-runtime-cpu-detect ${all_platforms}" | 329 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi
c --enable-realtime-only --enable-runtime-cpu-detect ${all_platforms}" |
321 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne
d ${all_platforms}" | 330 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne
d ${all_platforms}" |
322 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" | 331 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" |
323 gen_config_files win/ia32 "--target=x86-win32-vs7 --enable-realtime-only ${all_p
latforms}" | 332 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_
platforms}" |
324 gen_config_files win/x64 "--target=x86_64-win64-vs9 --enable-realtime-only ${all
_platforms}" | 333 gen_config_files win/x64 "--target=x86_64-win64-vs12 --enable-realtime-only ${al
l_platforms}" |
325 gen_config_files mac/ia32 "--target=x86-darwin9-gcc --enable-pic --enable-realti
me-only ${all_platforms}" | 334 gen_config_files mac/ia32 "--target=x86-darwin9-gcc --enable-pic --enable-realti
me-only ${all_platforms}" |
326 gen_config_files mac/x64 "--target=x86_64-darwin9-gcc --enable-pic --enable-real
time-only ${all_platforms}" | 335 gen_config_files mac/x64 "--target=x86_64-darwin9-gcc --enable-pic --enable-real
time-only ${all_platforms}" |
327 gen_config_files nacl "--target=generic-gnu --enable-pic --enable-realtime-only
${all_platforms}" | 336 gen_config_files nacl "--target=generic-gnu --enable-pic --enable-realtime-only
${all_platforms}" |
328 | 337 |
329 echo "Remove temporary directory." | 338 echo "Remove temporary directory." |
330 cd $BASE_DIR | 339 cd $BASE_DIR |
331 rm -rf $TEMP_DIR | 340 rm -rf $TEMP_DIR |
332 | 341 |
333 echo "Lint libvpx configuration." | 342 echo "Lint libvpx configuration." |
334 lint_config linux/ia32 | 343 lint_config linux/ia32 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 make_clean | 425 make_clean |
417 make libvpx_srcs.txt target=libs $config > /dev/null | 426 make libvpx_srcs.txt target=libs $config > /dev/null |
418 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic | 427 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic |
419 | 428 |
420 echo "Remove temporary directory." | 429 echo "Remove temporary directory." |
421 cd $BASE_DIR | 430 cd $BASE_DIR |
422 rm -rf $TEMP_DIR | 431 rm -rf $TEMP_DIR |
423 | 432 |
424 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? | 433 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? |
425 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 434 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
OLD | NEW |