| 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, .gni files and files in the |
| 8 # 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 # |
| 11 # For example: | 11 # For example: |
| 12 # $ ./generate_gypi.sh | 12 # $ ./generate_gypi.sh |
| 13 # | 13 # |
| 14 # And this will update all the .gypi and config files needed. | 14 # And this will update all the .gypi, .gni and config files needed. |
| 15 # | 15 # |
| 16 # !!! It's highly recommended to install yasm before running this script. | 16 # !!! It's highly recommended to install yasm before running this script. |
| 17 | 17 |
| 18 export LC_ALL=C | 18 export LC_ALL=C |
| 19 BASE_DIR=`pwd` | 19 BASE_DIR=`pwd` |
| 20 LIBVPX_SRC_DIR="source/libvpx" | 20 LIBVPX_SRC_DIR="source/libvpx" |
| 21 LIBVPX_CONFIG_DIR="source/config" | 21 LIBVPX_CONFIG_DIR="source/config" |
| 22 | 22 |
| 23 # Print gypi boilerplate header | 23 # Print license header. |
| 24 # $1 - Output base name | 24 # $1 - Output base name |
| 25 function write_gypi_header { | 25 function write_license { |
| 26 echo "# This file is generated. Do not edit." > $1 | 26 echo "# This file is generated. Do not edit." >> $1 |
| 27 echo "# Copyright (c) 2013 The Chromium Authors. All rights reserved." >> $1 | 27 echo "# Copyright (c) 2013 The Chromium Authors. All rights reserved." >> $1 |
| 28 echo "# Use of this source code is governed by a BSD-style license that can be
" >> $1 | 28 echo "# Use of this source code is governed by a BSD-style license that can be
" >> $1 |
| 29 echo "# found in the LICENSE file." >> $1 | 29 echo "# found in the LICENSE file." >> $1 |
| 30 echo "" >> $1 | 30 echo "" >> $1 |
| 31 } |
| 32 |
| 33 # Print gypi boilerplate header. |
| 34 # $1 - Output base name |
| 35 function write_gypi_header { |
| 31 echo "{" >> $1 | 36 echo "{" >> $1 |
| 32 } | 37 } |
| 33 | 38 |
| 34 # Print gypi boilerplate footer | 39 # Print gypi boilerplate footer. |
| 35 # $1 - Output base name | 40 # $1 - Output base name |
| 36 function write_gypi_footer { | 41 function write_gypi_footer { |
| 37 echo "}" >> $1 | 42 echo "}" >> $1 |
| 38 } | 43 } |
| 39 | 44 |
| 40 # Generate a gypi with a list of source files. | 45 # Generate a gypi with a list of source files. |
| 41 # $1 - Array name for file list. This is processed with 'declare' below to | 46 # $1 - Array name for file list. This is processed with 'declare' below to |
| 42 # regenerate the array locally. | 47 # regenerate the array locally. |
| 43 # $2 - Output file | 48 # $2 - Output file |
| 44 function write_file_list { | 49 function write_gypi { |
| 45 # Convert the first argument back in to an array. | 50 # Convert the first argument back in to an array. |
| 46 declare -a file_list=("${!1}") | 51 declare -a file_list=("${!1}") |
| 47 | 52 |
| 53 rm -rf $2 |
| 54 write_license $2 |
| 48 write_gypi_header $2 | 55 write_gypi_header $2 |
| 49 | 56 |
| 50 echo " 'sources': [" >> $2 | 57 echo " 'sources': [" >> $2 |
| 51 for f in $file_list | 58 for f in $file_list |
| 52 do | 59 do |
| 53 echo " '<(libvpx_source)/$f'," >> $2 | 60 echo " '<(libvpx_source)/$f'," >> $2 |
| 54 done | 61 done |
| 55 echo " ]," >> $2 | 62 echo " ]," >> $2 |
| 56 | 63 |
| 57 write_gypi_footer $2 | 64 write_gypi_footer $2 |
| 58 } | 65 } |
| 59 | 66 |
| 67 # Generate a gni with a list of source files. |
| 68 # $1 - Array name for file list. This is processed with 'declare' below to |
| 69 # regenerate the array locally. |
| 70 # $2 - GN variable name. |
| 71 # $3 - Output file. |
| 72 function write_gni { |
| 73 # Convert the first argument back in to an array. |
| 74 declare -a file_list=("${!1}") |
| 75 |
| 76 echo $2 "= [" >> $3 |
| 77 for f in $file_list |
| 78 do |
| 79 echo " \"//third_party/libvpx/source/libvpx/$f\"," >> $3 |
| 80 done |
| 81 echo "]" >> $3 |
| 82 } |
| 83 |
| 60 # Target template function | 84 # Target template function |
| 61 # $1 - Array name for file list. | 85 # $1 - Array name for file list. |
| 62 # $2 - Output file | 86 # $2 - Output file |
| 63 # $3 - Target name | 87 # $3 - Target name |
| 64 # $4 - Compiler flag | 88 # $4 - Compiler flag |
| 65 function write_target_definition { | 89 function write_target_definition { |
| 66 declare -a sources_list=("${!1}") | 90 declare -a sources_list=("${!1}") |
| 67 | 91 |
| 68 echo " {" >> $2 | 92 echo " {" >> $2 |
| 69 echo " 'target_name': '$3'," >> $2 | 93 echo " 'target_name': '$3'," >> $2 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 echo " ]," >> $2 | 135 echo " ]," >> $2 |
| 112 fi | 136 fi |
| 113 echo " }," >> $2 | 137 echo " }," >> $2 |
| 114 } | 138 } |
| 115 | 139 |
| 116 | 140 |
| 117 # Generate a gypi which applies additional compiler flags based on the file | 141 # Generate a gypi which applies additional compiler flags based on the file |
| 118 # name. | 142 # name. |
| 119 # $1 - Array name for file list. | 143 # $1 - Array name for file list. |
| 120 # $2 - Output file | 144 # $2 - Output file |
| 121 function write_special_flags { | 145 function write_intrinsics_gypi { |
| 122 declare -a file_list=("${!1}") | 146 declare -a file_list=("${!1}") |
| 123 | 147 |
| 124 local mmx_sources=$(echo "$file_list" | grep '_mmx\.c$') | 148 local mmx_sources=$(echo "$file_list" | grep '_mmx\.c$') |
| 125 local sse2_sources=$(echo "$file_list" | grep '_sse2\.c$') | 149 local sse2_sources=$(echo "$file_list" | grep '_sse2\.c$') |
| 126 local sse3_sources=$(echo "$file_list" | grep '_sse3\.c$') | 150 local sse3_sources=$(echo "$file_list" | grep '_sse3\.c$') |
| 127 local ssse3_sources=$(echo "$file_list" | grep '_ssse3\.c$') | 151 local ssse3_sources=$(echo "$file_list" | grep '_ssse3\.c$') |
| 128 local sse4_1_sources=$(echo "$file_list" | grep '_sse4\.c$') | 152 local sse4_1_sources=$(echo "$file_list" | grep '_sse4\.c$') |
| 129 local avx_sources=$(echo "$file_list" | grep '_avx\.c$') | 153 local avx_sources=$(echo "$file_list" | grep '_avx\.c$') |
| 130 local avx2_sources=$(echo "$file_list" | grep '_avx2\.c$') | 154 local avx2_sources=$(echo "$file_list" | grep '_avx2\.c$') |
| 131 | |
| 132 local neon_sources=$(echo "$file_list" | grep '_neon\.c$') | 155 local neon_sources=$(echo "$file_list" | grep '_neon\.c$') |
| 133 | 156 |
| 134 # Intrinsic functions and files are in flux. We can selectively generate them | 157 # Intrinsic functions and files are in flux. We can selectively generate them |
| 135 # but we can not selectively include them in libvpx.gyp. Throw some errors | 158 # but we can not selectively include them in libvpx.gyp. Throw some errors |
| 136 # when new targets are needed. | 159 # when new targets are needed. |
| 137 | 160 |
| 161 rm -rf $2 |
| 162 write_license $2 |
| 138 write_gypi_header $2 | 163 write_gypi_header $2 |
| 139 | 164 |
| 140 echo " 'targets': [" >> $2 | 165 echo " 'targets': [" >> $2 |
| 141 | 166 |
| 142 # x86[_64] | 167 # x86[_64] |
| 143 if [ 0 -ne ${#mmx_sources} ]; then | 168 if [ 0 -ne ${#mmx_sources} ]; then |
| 144 write_target_definition mmx_sources[@] $2 libvpx_intrinsics_mmx mmx | 169 write_target_definition mmx_sources[@] $2 libvpx_intrinsics_mmx mmx |
| 145 fi | 170 fi |
| 146 if [ 0 -ne ${#sse2_sources} ]; then | 171 if [ 0 -ne ${#sse2_sources} ]; then |
| 147 write_target_definition sse2_sources[@] $2 libvpx_intrinsics_sse2 sse2 | 172 write_target_definition sse2_sources[@] $2 libvpx_intrinsics_sse2 sse2 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 171 # arm neon | 196 # arm neon |
| 172 if [ 0 -ne ${#neon_sources} ]; then | 197 if [ 0 -ne ${#neon_sources} ]; then |
| 173 write_target_definition neon_sources[@] $2 libvpx_intrinsics_neon fpu=neon | 198 write_target_definition neon_sources[@] $2 libvpx_intrinsics_neon fpu=neon |
| 174 fi | 199 fi |
| 175 | 200 |
| 176 echo " ]," >> $2 | 201 echo " ]," >> $2 |
| 177 | 202 |
| 178 write_gypi_footer $2 | 203 write_gypi_footer $2 |
| 179 } | 204 } |
| 180 | 205 |
| 181 # Convert a list of source files into gypi file. | 206 # Convert a list of source files into gypi and gni files. |
| 182 # $1 - Input file. | 207 # $1 - Input file. |
| 183 # $2 - Output gypi file base. Will generate additional .gypi files when | 208 # $2 - Output gypi file base. Will generate additional .gypi files when |
| 184 # different compilation flags are required. | 209 # different compilation flags are required. |
| 185 function convert_srcs_to_gypi { | 210 function convert_srcs_to_project_files { |
| 186 # Do the following here: | 211 # Do the following here: |
| 187 # 1. Filter .c, .h, .s, .S and .asm files. | 212 # 1. Filter .c, .h, .s, .S and .asm files. |
| 188 # 2. Move certain files to a separate include to allow applying different | 213 # 2. Move certain files to a separate include to allow applying different |
| 189 # compiler options. | 214 # compiler options. |
| 190 # 3. Replace .asm.s to .asm because gyp will do the conversion. | 215 # 3. Replace .asm.s to .asm because gyp will do the conversion. |
| 191 | 216 |
| 192 local source_list=$(grep -E '(\.c|\.h|\.S|\.s|\.asm)$' $1) | 217 local source_list=$(grep -E '(\.c|\.h|\.S|\.s|\.asm)$' $1) |
| 193 | 218 |
| 194 # _offsets are used in pre-processing to generate files for assembly. They are | 219 # _offsets are used in pre-processing to generate files for assembly. They are |
| 195 # not part of the compiled library. | 220 # not part of the compiled library. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 211 # Select all arm neon files ending in _neon.c | 236 # Select all arm neon files ending in _neon.c |
| 212 # the pattern may need to be updated if vpx_scale gets intrinics | 237 # the pattern may need to be updated if vpx_scale gets intrinics |
| 213 local intrinsic_list=$(echo "$source_list" | \ | 238 local intrinsic_list=$(echo "$source_list" | \ |
| 214 egrep 'vp[89]/(encoder|decoder|common)/arm/neon/' | \ | 239 egrep 'vp[89]/(encoder|decoder|common)/arm/neon/' | \ |
| 215 egrep '_neon.c$') | 240 egrep '_neon.c$') |
| 216 fi | 241 fi |
| 217 | 242 |
| 218 # Remove these files from the main list. | 243 # Remove these files from the main list. |
| 219 source_list=$(comm -23 <(echo "$source_list") <(echo "$intrinsic_list")) | 244 source_list=$(comm -23 <(echo "$source_list") <(echo "$intrinsic_list")) |
| 220 | 245 |
| 221 write_file_list source_list $BASE_DIR/$2.gypi | 246 local x86_list=$(echo "$source_list" | egrep '/x86/') |
| 247 |
| 248 write_gypi source_list $BASE_DIR/$2.gypi |
| 222 | 249 |
| 223 # All the files are in a single "element." Check if the first element has | 250 # All the files are in a single "element." Check if the first element has |
| 224 # length 0. | 251 # length 0. |
| 225 if [ 0 -ne ${#intrinsic_list} ]; then | 252 if [ 0 -ne ${#intrinsic_list} ]; then |
| 226 write_special_flags intrinsic_list[@] $BASE_DIR/$2_intrinsics.gypi | 253 write_intrinsics_gypi intrinsic_list[@] $BASE_DIR/$2_intrinsics.gypi |
| 227 fi | 254 fi |
| 228 | 255 |
| 256 # Write a single .gni file that includes all source files for all archs. |
| 257 if [ 0 -ne ${#x86_list} ]; then |
| 258 # X86 systems need to separate C and assembly files for GN. |
| 259 local c_sources=$(echo "$source_list" | egrep '.(c|h)$') |
| 260 local assembly_sources=$(echo "$source_list" | egrep '.asm$') |
| 261 local mmx_sources=$(echo "$intrinsic_list" | grep '_mmx\.c$') |
| 262 local sse2_sources=$(echo "$intrinsic_list" | grep '_sse2\.c$') |
| 263 local sse3_sources=$(echo "$intrinsic_list" | grep '_sse3\.c$') |
| 264 local ssse3_sources=$(echo "$intrinsic_list" | grep '_ssse3\.c$') |
| 265 local sse4_1_sources=$(echo "$intrinsic_list" | grep '_sse4\.c$') |
| 266 local avx_sources=$(echo "$intrinsic_list" | grep '_avx\.c$') |
| 267 local avx2_sources=$(echo "$intrinsic_list" | grep '_avx2\.c$') |
| 268 |
| 269 write_gni c_sources $2 $BASE_DIR/libvpx_srcs.gni |
| 270 write_gni assembly_sources $2_assembly $BASE_DIR/libvpx_srcs.gni |
| 271 write_gni mmx_sources $2_mmx $BASE_DIR/libvpx_srcs.gni |
| 272 write_gni sse2_sources $2_sse2 $BASE_DIR/libvpx_srcs.gni |
| 273 write_gni sse3_sources $2_sse3 $BASE_DIR/libvpx_srcs.gni |
| 274 write_gni ssse3_sources $2_ssse3 $BASE_DIR/libvpx_srcs.gni |
| 275 write_gni sse4_1_sources $2_sse4_1 $BASE_DIR/libvpx_srcs.gni |
| 276 write_gni avx_sources $2_avx $BASE_DIR/libvpx_srcs.gni |
| 277 write_gni avx2_sources $2_avx2 $BASE_DIR/libvpx_srcs.gni |
| 278 else |
| 279 local neon_sources=$(echo "$intrinsic_list" | grep '_neon\.c$') |
| 280 write_gni source_list $2 $BASE_DIR/libvpx_srcs.gni |
| 281 if [ 0 -ne ${#neon_sources} ]; then |
| 282 write_gni neon_sources $2_neon $BASE_DIR/libvpx_srcs.gni |
| 283 fi |
| 284 fi |
| 229 } | 285 } |
| 230 | 286 |
| 231 # Clean files from previous make. | 287 # Clean files from previous make. |
| 232 function make_clean { | 288 function make_clean { |
| 233 make clean > /dev/null | 289 make clean > /dev/null |
| 234 rm -f libvpx_srcs.txt | 290 rm -f libvpx_srcs.txt |
| 235 } | 291 } |
| 236 | 292 |
| 237 # Lint a pair of vpx_config.h and vpx_config.asm to make sure they match. | 293 # Lint a pair of vpx_config.h and vpx_config.asm to make sure they match. |
| 238 # $1 - Header file directory. | 294 # $1 - Header file directory. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 # Generate Config files. "--enable-external-build" must be set to skip | 371 # Generate Config files. "--enable-external-build" must be set to skip |
| 316 # detection of capabilities on specific targets. | 372 # detection of capabilities on specific targets. |
| 317 # $1 - Header file directory. | 373 # $1 - Header file directory. |
| 318 # $2 - Config command line. | 374 # $2 - Config command line. |
| 319 function gen_config_files { | 375 function gen_config_files { |
| 320 ./configure $2 > /dev/null | 376 ./configure $2 > /dev/null |
| 321 | 377 |
| 322 # Generate vpx_config.asm. Do not create one for mips. | 378 # Generate vpx_config.asm. Do not create one for mips. |
| 323 if [[ "$1" != *mipsel ]]; then | 379 if [[ "$1" != *mipsel ]]; then |
| 324 if [[ "$1" == *x64* ]] || [[ "$1" == *ia32* ]]; then | 380 if [[ "$1" == *x64* ]] || [[ "$1" == *ia32* ]]; then |
| 325 egrep "#define [A-Z0-9_]+ [01]" vpx_config.h | awk '{print $2 " equ " $3}'
> vpx_config.asm | 381 egrep "#define [A-Z0-9_]+ [01]" vpx_config.h | awk '{print "%define " $2 "
" $3}' > vpx_config.asm |
| 326 else | 382 else |
| 327 egrep "#define [A-Z0-9_]+ [01]" vpx_config.h | awk '{print $2 " EQU " $3}'
| perl $BASE_DIR/$LIBVPX_SRC_DIR/build/make/ads2gas.pl > vpx_config.asm | 383 egrep "#define [A-Z0-9_]+ [01]" vpx_config.h | awk '{print $2 " EQU " $3}'
| perl $BASE_DIR/$LIBVPX_SRC_DIR/build/make/ads2gas.pl > vpx_config.asm |
| 328 fi | 384 fi |
| 329 fi | 385 fi |
| 330 | 386 |
| 331 cp vpx_config.* $BASE_DIR/$LIBVPX_CONFIG_DIR/$1 | 387 cp vpx_config.* $BASE_DIR/$LIBVPX_CONFIG_DIR/$1 |
| 332 make_clean | 388 make_clean |
| 333 rm -rf vpx_config.* | 389 rm -rf vpx_config.* |
| 334 } | 390 } |
| 335 | 391 |
| 336 echo "Create temporary directory." | 392 echo "Create temporary directory." |
| 337 TEMP_DIR="$LIBVPX_SRC_DIR.temp" | 393 TEMP_DIR="$LIBVPX_SRC_DIR.temp" |
| 338 rm -rf $TEMP_DIR | 394 rm -rf $TEMP_DIR |
| 339 cp -R $LIBVPX_SRC_DIR $TEMP_DIR | 395 cp -R $LIBVPX_SRC_DIR $TEMP_DIR |
| 340 cd $TEMP_DIR | 396 cd $TEMP_DIR |
| 341 | 397 |
| 342 echo "Generate Config Files" | 398 echo "Generate config files." |
| 343 # TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available | 399 # TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available |
| 344 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" | 400 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" |
| 345 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" | 401 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" |
| 346 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" | 402 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" |
| 347 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}" | 403 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}" |
| 348 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only --disable-edsp ${all_platforms}" | 404 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only --disable-edsp ${all_platforms}" |
| 349 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}" | 405 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}" |
| 350 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab
le-realtime-only --disable-edsp ${all_platforms}" | 406 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab
le-realtime-only --disable-edsp ${all_platforms}" |
| 351 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne
d ${all_platforms}" | 407 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne
d ${all_platforms}" |
| 352 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" | 408 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 gen_rtcd_header win/ia32 x86 | 448 gen_rtcd_header win/ia32 x86 |
| 393 gen_rtcd_header win/x64 x86_64 | 449 gen_rtcd_header win/x64 x86_64 |
| 394 gen_rtcd_header mac/ia32 x86 | 450 gen_rtcd_header mac/ia32 x86 |
| 395 gen_rtcd_header mac/x64 x86_64 | 451 gen_rtcd_header mac/x64 x86_64 |
| 396 gen_rtcd_header nacl nacl | 452 gen_rtcd_header nacl nacl |
| 397 | 453 |
| 398 echo "Prepare Makefile." | 454 echo "Prepare Makefile." |
| 399 ./configure --target=generic-gnu > /dev/null | 455 ./configure --target=generic-gnu > /dev/null |
| 400 make_clean | 456 make_clean |
| 401 | 457 |
| 458 # Remove existing .gni file. |
| 459 rm -rf $BASE_DIR/libvpx_srcs.gni |
| 460 write_license $BASE_DIR/libvpx_srcs.gni |
| 461 |
| 402 echo "Generate X86 source list." | 462 echo "Generate X86 source list." |
| 403 config=$(print_config linux/ia32) | 463 config=$(print_config linux/ia32) |
| 404 make_clean | 464 make_clean |
| 405 make libvpx_srcs.txt target=libs $config > /dev/null | 465 make libvpx_srcs.txt target=libs $config > /dev/null |
| 406 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_x86 | 466 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_x86 |
| 407 | 467 |
| 408 # Copy vpx_version.h. The file should be the same for all platforms. | 468 # Copy vpx_version.h. The file should be the same for all platforms. |
| 409 cp vpx_version.h $BASE_DIR/$LIBVPX_CONFIG_DIR | 469 cp vpx_version.h $BASE_DIR/$LIBVPX_CONFIG_DIR |
| 410 | 470 |
| 411 echo "Generate X86_64 source list." | 471 echo "Generate X86_64 source list." |
| 412 config=$(print_config linux/x64) | 472 config=$(print_config linux/x64) |
| 413 make_clean | 473 make_clean |
| 414 make libvpx_srcs.txt target=libs $config > /dev/null | 474 make libvpx_srcs.txt target=libs $config > /dev/null |
| 415 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_x86_64 | 475 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_x86_64 |
| 416 | 476 |
| 417 echo "Generate ARM source list." | 477 echo "Generate ARM source list." |
| 418 config=$(print_config linux/arm) | 478 config=$(print_config linux/arm) |
| 419 make_clean | 479 make_clean |
| 420 make libvpx_srcs.txt target=libs $config > /dev/null | 480 make libvpx_srcs.txt target=libs $config > /dev/null |
| 421 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm | 481 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm |
| 422 | 482 |
| 423 echo "Generate ARM NEON source list." | 483 echo "Generate ARM NEON source list." |
| 424 config=$(print_config linux/arm-neon) | 484 config=$(print_config linux/arm-neon) |
| 425 make_clean | 485 make_clean |
| 426 make libvpx_srcs.txt target=libs $config > /dev/null | 486 make libvpx_srcs.txt target=libs $config > /dev/null |
| 427 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm_neon | 487 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon |
| 428 | 488 |
| 429 echo "Generate ARM NEON CPU DETECT source list." | 489 echo "Generate ARM NEON CPU DETECT source list." |
| 430 config=$(print_config linux/arm-neon-cpu-detect) | 490 config=$(print_config linux/arm-neon-cpu-detect) |
| 431 make_clean | 491 make_clean |
| 432 make libvpx_srcs.txt target=libs $config > /dev/null | 492 make libvpx_srcs.txt target=libs $config > /dev/null |
| 433 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm_neon_cpu_detect | 493 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon_cpu_detect |
| 434 | 494 |
| 435 echo "Generate ARM64 source list." | 495 echo "Generate ARM64 source list." |
| 436 config=$(print_config linux/arm64) | 496 config=$(print_config linux/arm64) |
| 437 make_clean | 497 make_clean |
| 438 make libvpx_srcs.txt target=libs $config > /dev/null | 498 make libvpx_srcs.txt target=libs $config > /dev/null |
| 439 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm64 | 499 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm64 |
| 440 | 500 |
| 441 echo "Generate MIPS source list." | 501 echo "Generate MIPS source list." |
| 442 config=$(print_config_basic linux/mipsel) | 502 config=$(print_config_basic linux/mipsel) |
| 443 make_clean | 503 make_clean |
| 444 make libvpx_srcs.txt target=libs $config > /dev/null | 504 make libvpx_srcs.txt target=libs $config > /dev/null |
| 445 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_mips | 505 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_mips |
| 446 | 506 |
| 447 echo "Generate NaCl source list." | 507 echo "Generate NaCl source list." |
| 448 config=$(print_config_basic nacl) | 508 config=$(print_config_basic nacl) |
| 449 make_clean | 509 make_clean |
| 450 make libvpx_srcs.txt target=libs $config > /dev/null | 510 make libvpx_srcs.txt target=libs $config > /dev/null |
| 451 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_nacl | 511 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_nacl |
| 452 | 512 |
| 453 echo "Generate GENERIC source list." | 513 echo "Generate GENERIC source list." |
| 454 config=$(print_config_basic linux/generic) | 514 config=$(print_config_basic linux/generic) |
| 455 make_clean | 515 make_clean |
| 456 make libvpx_srcs.txt target=libs $config > /dev/null | 516 make libvpx_srcs.txt target=libs $config > /dev/null |
| 457 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic | 517 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic |
| 458 | 518 |
| 459 echo "Remove temporary directory." | 519 echo "Remove temporary directory." |
| 460 cd $BASE_DIR | 520 cd $BASE_DIR |
| 461 rm -rf $TEMP_DIR | 521 rm -rf $TEMP_DIR |
| 462 | 522 |
| 463 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? | 523 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? |
| 464 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 524 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
| OLD | NEW |