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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 echo " 'include_dirs': [" >> $2 | 71 echo " 'include_dirs': [" >> $2 |
72 echo " 'source/config/<(OS_CATEGORY)/<(target_arch_full)'," >> $2 | 72 echo " 'source/config/<(OS_CATEGORY)/<(target_arch_full)'," >> $2 |
73 echo " '<(libvpx_source)'," >> $2 | 73 echo " '<(libvpx_source)'," >> $2 |
74 echo " ]," >> $2 | 74 echo " ]," >> $2 |
75 echo " 'sources': [" >> $2 | 75 echo " 'sources': [" >> $2 |
76 for f in $sources_list | 76 for f in $sources_list |
77 do | 77 do |
78 echo " '<(libvpx_source)/$f'," >> $2 | 78 echo " '<(libvpx_source)/$f'," >> $2 |
79 done | 79 done |
80 echo " ]," >> $2 | 80 echo " ]," >> $2 |
81 echo " 'conditions': [" >> $2 | 81 if [[ $4 == fpu=neon ]]; then |
82 echo " ['os_posix==1 and OS!=\"mac\" and OS!=\"ios\"', {" >> $2 | 82 echo " 'cflags!': [ '-mfpu=vfpv3-d16' ]," >> $2 |
83 echo " 'cflags!': [ '-mfpu=vfpv3-d16' ]," >> $2 | 83 fi |
84 echo " 'cflags': [ '-m$4', ]," >> $2 | 84 echo " 'cflags': [ '-m$4', ]," >> $2 |
85 echo " }]," >> $2 | 85 echo " 'xcode_settings': { 'OTHER_CFLAGS': [ '-m$4' ] }," >> $2 |
86 echo " ['OS==\"mac\" or OS==\"ios\"', {" >> $2 | |
87 echo " 'xcode_settings': {" >> $2 | |
88 echo " 'OTHER_CFLAGS': [ '-m$4', ]," >> $2 | |
89 echo " }," >> $2 | |
90 echo " }]," >> $2 | |
91 if [[ $4 == avx* ]]; then | 86 if [[ $4 == avx* ]]; then |
92 echo " ['OS==\"win\"', {" >> $2 | 87 echo " 'msvs_settings': {" >> $2 |
93 echo " 'msvs_settings': {" >> $2 | 88 echo " 'VCCLCompilerTool': {" >> $2 |
94 echo " 'VCCLCompilerTool': {" >> $2 | 89 echo " 'EnableEnhancedInstructionSet': '3', # /arch:AVX" >> $2 |
95 echo " 'EnableEnhancedInstructionSet': '3', # /arch:AVX" >> $2 | 90 echo " }," >> $2 |
96 echo " }," >> $2 | 91 echo " }," >> $2 |
97 echo " }," >> $2 | |
98 echo " }]," >> $2 | |
99 fi | 92 fi |
100 echo " ]," >> $2 | |
101 echo " }," >> $2 | 93 echo " }," >> $2 |
102 } | 94 } |
103 | 95 |
104 | 96 |
105 # Generate a gypi which applies additional compiler flags based on the file | 97 # Generate a gypi which applies additional compiler flags based on the file |
106 # name. | 98 # name. |
107 # $1 - Array name for file list. | 99 # $1 - Array name for file list. |
108 # $2 - Output file | 100 # $2 - Output file |
109 function write_special_flags { | 101 function write_special_flags { |
110 declare -a file_list=("${!1}") | 102 declare -a file_list=("${!1}") |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 make_clean | 435 make_clean |
444 make libvpx_srcs.txt target=libs $config > /dev/null | 436 make libvpx_srcs.txt target=libs $config > /dev/null |
445 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic | 437 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic |
446 | 438 |
447 echo "Remove temporary directory." | 439 echo "Remove temporary directory." |
448 cd $BASE_DIR | 440 cd $BASE_DIR |
449 rm -rf $TEMP_DIR | 441 rm -rf $TEMP_DIR |
450 | 442 |
451 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? | 443 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? |
452 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 444 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
OLD | NEW |