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 # |
11 # For example: | 11 # Usage: |
12 # $ ./generate_gypi.sh | 12 # $ ./generate_gypi.sh [--disable-avx] [--only-configs] |
13 # | 13 # |
14 # And this will update all the .gypi, .gni and config files needed. | 14 # The following optional flags are supported: |
| 15 # --disable-avx : AVX+AVX2 support is disabled. |
| 16 # --only-configs: Excludes generation of GN and GYP files (i.e. only |
| 17 # configuration headers are generated). |
15 # | 18 # |
16 # !!! It's highly recommended to install yasm before running this script. | 19 # !!! It's highly recommended to install yasm before running this script. |
17 | 20 |
18 export LC_ALL=C | 21 export LC_ALL=C |
19 BASE_DIR=$(pwd) | 22 BASE_DIR=$(pwd) |
20 LIBVPX_SRC_DIR="source/libvpx" | 23 LIBVPX_SRC_DIR="source/libvpx" |
21 LIBVPX_CONFIG_DIR="source/config" | 24 LIBVPX_CONFIG_DIR="source/config" |
| 25 unset DISABLE_AVX |
| 26 |
| 27 for i in "$@" |
| 28 do |
| 29 case $i in |
| 30 --disable-avx) |
| 31 DISABLE_AVX="--disable-avx --disable-avx2" |
| 32 shift |
| 33 ;; |
| 34 --only-configs) |
| 35 ONLY_CONFIGS=true |
| 36 shift |
| 37 ;; |
| 38 *) |
| 39 echo "Unknown option: $i" |
| 40 exit 1 |
| 41 ;; |
| 42 esac |
| 43 done |
22 | 44 |
23 # Print license header. | 45 # Print license header. |
24 # $1 - Output base name | 46 # $1 - Output base name |
25 function write_license { | 47 function write_license { |
26 echo "# This file is generated. Do not edit." >> $1 | 48 echo "# This file is generated. Do not edit." >> $1 |
27 echo "# Copyright (c) 2014 The Chromium Authors. All rights reserved." >> $1 | 49 echo "# Copyright (c) 2014 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 | 50 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 | 51 echo "# found in the LICENSE file." >> $1 |
30 echo "" >> $1 | 52 echo "" >> $1 |
31 } | 53 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 echo " ['clang==0 and use_lto==1', {" >> "$2" | 133 echo " ['clang==0 and use_lto==1', {" >> "$2" |
112 echo " 'cflags!': [" >> "$2" | 134 echo " 'cflags!': [" >> "$2" |
113 echo " '-flto'," >> "$2" | 135 echo " '-flto'," >> "$2" |
114 echo " '-ffat-lto-objects'," >> "$2" | 136 echo " '-ffat-lto-objects'," >> "$2" |
115 echo " ]," >> "$2" | 137 echo " ]," >> "$2" |
116 echo " }]," >> "$2" | 138 echo " }]," >> "$2" |
117 echo " ]," >> "$2" | 139 echo " ]," >> "$2" |
118 fi | 140 fi |
119 echo " 'cflags': [ '-m$4', ]," >> "$2" | 141 echo " 'cflags': [ '-m$4', ]," >> "$2" |
120 echo " 'xcode_settings': { 'OTHER_CFLAGS': [ '-m$4' ] }," >> "$2" | 142 echo " 'xcode_settings': { 'OTHER_CFLAGS': [ '-m$4' ] }," >> "$2" |
121 if [[ $4 == avx2 ]]; then | 143 if [[ -z $DISABLE_AVX && $4 == avx2 ]]; then |
122 echo " 'msvs_settings': {" >> "$2" | 144 echo " 'msvs_settings': {" >> "$2" |
123 echo " 'VCCLCompilerTool': {" >> "$2" | 145 echo " 'VCCLCompilerTool': {" >> "$2" |
124 echo " 'EnableEnhancedInstructionSet': '5', # /arch:AVX2" >> "$2" | 146 echo " 'EnableEnhancedInstructionSet': '5', # /arch:AVX2" >> "$2" |
125 echo " }," >> "$2" | 147 echo " }," >> "$2" |
126 echo " }," >> "$2" | 148 echo " }," >> "$2" |
127 elif [[ $4 == ssse3 || $4 == sse4.1 ]]; then | 149 elif [[ $4 == ssse3 || $4 == sse4.1 ]]; then |
128 echo " 'conditions': [" >> "$2" | 150 echo " 'conditions': [" >> "$2" |
129 echo " ['OS==\"win\" and clang==1', {" >> "$2" | 151 echo " ['OS==\"win\" and clang==1', {" >> "$2" |
130 echo " # cl.exe's /arch flag doesn't have a setting for SSSE3/4, and
cl.exe" >> "$2" | 152 echo " # cl.exe's /arch flag doesn't have a setting for SSSE3/4, and
cl.exe" >> "$2" |
131 echo " # doesn't need it for intrinsics. clang-cl does need it, thoug
h." >> "$2" | 153 echo " # doesn't need it for intrinsics. clang-cl does need it, thoug
h." >> "$2" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 #write_target_definition sse3_sources[@] "$2" libvpx_intrinsics_sse3 sse3 | 198 #write_target_definition sse3_sources[@] "$2" libvpx_intrinsics_sse3 sse3 |
177 echo "ERROR: Uncomment sse3 sections in libvpx.gyp" | 199 echo "ERROR: Uncomment sse3 sections in libvpx.gyp" |
178 exit 1 | 200 exit 1 |
179 fi | 201 fi |
180 if [ 0 -ne ${#ssse3_sources} ]; then | 202 if [ 0 -ne ${#ssse3_sources} ]; then |
181 write_target_definition ssse3_sources[@] "$2" libvpx_intrinsics_ssse3 ssse3 | 203 write_target_definition ssse3_sources[@] "$2" libvpx_intrinsics_ssse3 ssse3 |
182 fi | 204 fi |
183 if [ 0 -ne ${#sse4_1_sources} ]; then | 205 if [ 0 -ne ${#sse4_1_sources} ]; then |
184 write_target_definition sse4_1_sources[@] "$2" libvpx_intrinsics_sse4_1 sse4
.1 | 206 write_target_definition sse4_1_sources[@] "$2" libvpx_intrinsics_sse4_1 sse4
.1 |
185 fi | 207 fi |
186 if [ 0 -ne ${#avx_sources} ]; then | 208 if [[ -z $DISABLE_AVX && 0 -ne ${#avx_sources} ]]; then |
187 #write_target_definition avx_sources[@] "$2" libvpx_intrinsics_avx avx | 209 #write_target_definition avx_sources[@] "$2" libvpx_intrinsics_avx avx |
188 echo "ERROR: Uncomment avx sections in libvpx.gyp" | 210 echo "ERROR: Uncomment avx sections in libvpx.gyp" |
189 exit 1 | 211 exit 1 |
190 fi | 212 fi |
191 if [ 0 -ne ${#avx2_sources} ]; then | 213 if [[ -z $DISABLE_AVX && 0 -ne ${#avx2_sources} ]]; then |
192 write_target_definition avx2_sources[@] "$2" libvpx_intrinsics_avx2 avx2 | 214 write_target_definition avx2_sources[@] "$2" libvpx_intrinsics_avx2 avx2 |
193 fi | 215 fi |
194 | 216 |
195 # arm neon | 217 # arm neon |
196 if [ 0 -ne ${#neon_sources} ]; then | 218 if [ 0 -ne ${#neon_sources} ]; then |
197 write_target_definition neon_sources[@] "$2" libvpx_intrinsics_neon fpu=neon | 219 write_target_definition neon_sources[@] "$2" libvpx_intrinsics_neon fpu=neon |
198 fi | 220 fi |
199 | 221 |
200 echo " ]," >> "$2" | 222 echo " ]," >> "$2" |
201 | 223 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 local avx_sources=$(echo "$intrinsic_list" | grep '_avx\.c$') | 282 local avx_sources=$(echo "$intrinsic_list" | grep '_avx\.c$') |
261 local avx2_sources=$(echo "$intrinsic_list" | grep '_avx2\.c$') | 283 local avx2_sources=$(echo "$intrinsic_list" | grep '_avx2\.c$') |
262 | 284 |
263 write_gni c_sources $2 "$BASE_DIR/libvpx_srcs.gni" | 285 write_gni c_sources $2 "$BASE_DIR/libvpx_srcs.gni" |
264 write_gni assembly_sources $2_assembly "$BASE_DIR/libvpx_srcs.gni" | 286 write_gni assembly_sources $2_assembly "$BASE_DIR/libvpx_srcs.gni" |
265 write_gni mmx_sources $2_mmx "$BASE_DIR/libvpx_srcs.gni" | 287 write_gni mmx_sources $2_mmx "$BASE_DIR/libvpx_srcs.gni" |
266 write_gni sse2_sources $2_sse2 "$BASE_DIR/libvpx_srcs.gni" | 288 write_gni sse2_sources $2_sse2 "$BASE_DIR/libvpx_srcs.gni" |
267 write_gni sse3_sources $2_sse3 "$BASE_DIR/libvpx_srcs.gni" | 289 write_gni sse3_sources $2_sse3 "$BASE_DIR/libvpx_srcs.gni" |
268 write_gni ssse3_sources $2_ssse3 "$BASE_DIR/libvpx_srcs.gni" | 290 write_gni ssse3_sources $2_ssse3 "$BASE_DIR/libvpx_srcs.gni" |
269 write_gni sse4_1_sources $2_sse4_1 "$BASE_DIR/libvpx_srcs.gni" | 291 write_gni sse4_1_sources $2_sse4_1 "$BASE_DIR/libvpx_srcs.gni" |
270 write_gni avx_sources $2_avx "$BASE_DIR/libvpx_srcs.gni" | 292 if [ -z "$DISABLE_AVX" ]; then |
271 write_gni avx2_sources $2_avx2 "$BASE_DIR/libvpx_srcs.gni" | 293 write_gni avx_sources $2_avx "$BASE_DIR/libvpx_srcs.gni" |
| 294 write_gni avx2_sources $2_avx2 "$BASE_DIR/libvpx_srcs.gni" |
| 295 fi |
272 else | 296 else |
273 local c_sources=$(echo "$source_list" | egrep '.(c|h)$') | 297 local c_sources=$(echo "$source_list" | egrep '.(c|h)$') |
274 local assembly_sources=$(echo -e "$source_list\n$intrinsic_list" | \ | 298 local assembly_sources=$(echo -e "$source_list\n$intrinsic_list" | \ |
275 egrep '.asm$') | 299 egrep '.asm$') |
276 local neon_sources=$(echo "$intrinsic_list" | grep '_neon\.c$') | 300 local neon_sources=$(echo "$intrinsic_list" | grep '_neon\.c$') |
277 write_gni c_sources $2 "$BASE_DIR/libvpx_srcs.gni" | 301 write_gni c_sources $2 "$BASE_DIR/libvpx_srcs.gni" |
278 write_gni assembly_sources $2_assembly "$BASE_DIR/libvpx_srcs.gni" | 302 write_gni assembly_sources $2_assembly "$BASE_DIR/libvpx_srcs.gni" |
279 if [ 0 -ne ${#neon_sources} ]; then | 303 if [ 0 -ne ${#neon_sources} ]; then |
280 write_gni neon_sources $2_neon "$BASE_DIR/libvpx_srcs.gni" | 304 write_gni neon_sources $2_neon "$BASE_DIR/libvpx_srcs.gni" |
281 fi | 305 fi |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 print_config_basic $1 > $BASE_DIR/$TEMP_DIR/libvpx.config | 358 print_config_basic $1 > $BASE_DIR/$TEMP_DIR/libvpx.config |
335 else | 359 else |
336 $BASE_DIR/lint_config.sh -p \ | 360 $BASE_DIR/lint_config.sh -p \ |
337 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ | 361 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ |
338 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \ | 362 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \ |
339 -o $BASE_DIR/$TEMP_DIR/libvpx.config | 363 -o $BASE_DIR/$TEMP_DIR/libvpx.config |
340 fi | 364 fi |
341 | 365 |
342 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 366 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
343 --arch=$2 \ | 367 --arch=$2 \ |
344 --sym=vp8_rtcd \ | 368 --sym=vp8_rtcd $DISABLE_AVX \ |
345 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 369 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
346 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \ | 370 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \ |
347 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h | 371 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h |
348 | 372 |
349 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 373 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
350 --arch=$2 \ | 374 --arch=$2 \ |
351 --sym=vp9_rtcd \ | 375 --sym=vp9_rtcd $DISABLE_AVX \ |
352 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 376 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
353 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \ | 377 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \ |
354 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h | 378 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h |
355 | 379 |
356 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 380 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
357 --arch=$2 \ | 381 --arch=$2 \ |
358 --sym=vpx_scale_rtcd \ | 382 --sym=vpx_scale_rtcd $DISABLE_AVX \ |
359 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 383 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
360 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \ | 384 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \ |
361 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h | 385 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h |
362 | 386 |
363 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ | 387 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ |
364 --arch=$2 \ | 388 --arch=$2 \ |
365 --sym=vpx_dsp_rtcd \ | 389 --sym=vpx_dsp_rtcd $DISABLE_AVX \ |
366 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ | 390 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ |
367 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_dsp/vpx_dsp_rtcd_defs.pl \ | 391 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_dsp/vpx_dsp_rtcd_defs.pl \ |
368 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_dsp_rtcd.h | 392 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_dsp_rtcd.h |
369 | 393 |
370 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config | 394 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config |
371 } | 395 } |
372 | 396 |
373 # Generate Config files. "--enable-external-build" must be set to skip | 397 # Generate Config files. "--enable-external-build" must be set to skip |
374 # detection of capabilities on specific targets. | 398 # detection of capabilities on specific targets. |
375 # $1 - Header file directory. | 399 # $1 - Header file directory. |
376 # $2 - Config command line. | 400 # $2 - Config command line. |
377 function gen_config_files { | 401 function gen_config_files { |
378 ./configure $2 > /dev/null | 402 ./configure $2 > /dev/null |
379 | 403 |
380 # Disable HAVE_UNISTD_H as it causes vp8 to try to detect how many cpus | 404 # Disable HAVE_UNISTD_H as it causes vp8 to try to detect how many cpus |
381 # available, which doesn't work from iniside a sandbox on linux. | 405 # available, which doesn't work from iniside a sandbox on linux. |
382 ( echo '/HAVE_UNISTD_H/s/[01]/0/' ; echo 'w' ; echo 'q' ) | ed -s vpx_config.h | 406 ( echo '/HAVE_UNISTD_H/s/[01]/0/' ; echo 'w' ; echo 'q' ) | ed -s vpx_config.h |
383 | 407 |
384 # Generate vpx_config.asm. Do not create one for mips. | 408 # Generate vpx_config.asm. Do not create one for mips. |
385 if [[ "$1" != *mipsel && "$1" != *mips64el ]]; then | 409 if [[ "$1" != *mipsel && "$1" != *mips64el ]]; then |
386 if [[ "$1" == *x64* ]] || [[ "$1" == *ia32* ]]; then | 410 if [[ "$1" == *x64* ]] || [[ "$1" == *ia32* ]]; then |
387 egrep "#define [A-Z0-9_]+ [01]" vpx_config.h | awk '{print "%define " $2 "
" $3}' > vpx_config.asm | 411 egrep "#define [A-Z0-9_]+ [01]" vpx_config.h | awk '{print "%define " $2 "
" $3}' > vpx_config.asm |
388 else | 412 else |
389 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 | 413 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 |
390 fi | 414 fi |
391 fi | 415 fi |
392 | 416 |
393 cp vpx_config.* $BASE_DIR/$LIBVPX_CONFIG_DIR/$1 | 417 cp vpx_config.* $BASE_DIR/$LIBVPX_CONFIG_DIR/$1 |
394 make_clean | 418 make_clean |
395 rm -rf vpx_config.* | 419 rm -rf vpx_config.* |
396 } | 420 } |
397 | 421 |
398 echo "Create temporary directory." | 422 echo "Create temporary directory." |
399 TEMP_DIR="$LIBVPX_SRC_DIR.temp" | 423 TEMP_DIR="$LIBVPX_SRC_DIR.temp" |
400 rm -rf $TEMP_DIR | 424 rm -rf $TEMP_DIR |
401 cp -R $LIBVPX_SRC_DIR $TEMP_DIR | 425 cp -R $LIBVPX_SRC_DIR $TEMP_DIR |
402 cd $TEMP_DIR | 426 cd $TEMP_DIR |
403 | 427 |
404 echo "Generate config files." | 428 echo "Generate config files." |
405 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 --enable-
vp9-postproc --size-limit=16384x16384" | 429 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 --enable-
vp9-postproc --size-limit=16384x16384 $DISABLE_AVX" |
406 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" | 430 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi
c --enable-realtime-only ${all_platforms}" |
407 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" | 431 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-
pic --enable-realtime-only ${all_platforms}" |
408 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}" | 432 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}" |
409 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only --disable-edsp ${all_platforms}" | 433 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable-
realtime-only --disable-edsp ${all_platforms}" |
410 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}" | 434 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}" |
411 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab
le-realtime-only --disable-edsp ${all_platforms}" | 435 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab
le-realtime-only --disable-edsp ${all_platforms}" |
412 gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}" | 436 gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}" |
413 gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}" | 437 gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}" |
414 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" | 438 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt
ime-only ${all_platforms}" |
415 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_
platforms}" | 439 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_
platforms}" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 gen_rtcd_header win/ia32 x86 | 480 gen_rtcd_header win/ia32 x86 |
457 gen_rtcd_header win/x64 x86_64 | 481 gen_rtcd_header win/x64 x86_64 |
458 gen_rtcd_header mac/ia32 x86 | 482 gen_rtcd_header mac/ia32 x86 |
459 gen_rtcd_header mac/x64 x86_64 | 483 gen_rtcd_header mac/x64 x86_64 |
460 gen_rtcd_header nacl nacl | 484 gen_rtcd_header nacl nacl |
461 | 485 |
462 echo "Prepare Makefile." | 486 echo "Prepare Makefile." |
463 ./configure --target=generic-gnu > /dev/null | 487 ./configure --target=generic-gnu > /dev/null |
464 make_clean | 488 make_clean |
465 | 489 |
466 # Remove existing .gni file. | 490 if [ -z $ONLY_CONFIGS ]; then |
467 rm -rf $BASE_DIR/libvpx_srcs.gni | 491 # Remove existing .gni file. |
468 write_license $BASE_DIR/libvpx_srcs.gni | 492 rm -rf $BASE_DIR/libvpx_srcs.gni |
| 493 write_license $BASE_DIR/libvpx_srcs.gni |
469 | 494 |
470 echo "Generate X86 source list." | 495 echo "Generate X86 source list." |
471 config=$(print_config linux/ia32) | 496 config=$(print_config linux/ia32) |
472 make_clean | 497 make_clean |
473 make libvpx_srcs.txt target=libs $config > /dev/null | 498 make libvpx_srcs.txt target=libs $config > /dev/null |
474 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_x86 | 499 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_x86 |
475 | 500 |
476 # Copy vpx_version.h. The file should be the same for all platforms. | 501 # Copy vpx_version.h. The file should be the same for all platforms. |
477 cp vpx_version.h $BASE_DIR/$LIBVPX_CONFIG_DIR | 502 cp vpx_version.h $BASE_DIR/$LIBVPX_CONFIG_DIR |
478 | 503 |
479 echo "Generate X86_64 source list." | 504 echo "Generate X86_64 source list." |
480 config=$(print_config linux/x64) | 505 config=$(print_config linux/x64) |
481 make_clean | 506 make_clean |
482 make libvpx_srcs.txt target=libs $config > /dev/null | 507 make libvpx_srcs.txt target=libs $config > /dev/null |
483 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_x86_64 | 508 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_x86_64 |
484 | 509 |
485 echo "Generate ARM source list." | 510 echo "Generate ARM source list." |
486 config=$(print_config linux/arm) | 511 config=$(print_config linux/arm) |
487 make_clean | 512 make_clean |
488 make libvpx_srcs.txt target=libs $config > /dev/null | 513 make libvpx_srcs.txt target=libs $config > /dev/null |
489 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm | 514 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm |
490 | 515 |
491 echo "Generate ARM NEON source list." | 516 echo "Generate ARM NEON source list." |
492 config=$(print_config linux/arm-neon) | 517 config=$(print_config linux/arm-neon) |
493 make_clean | 518 make_clean |
494 make libvpx_srcs.txt target=libs $config > /dev/null | 519 make libvpx_srcs.txt target=libs $config > /dev/null |
495 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon | 520 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon |
496 | 521 |
497 echo "Generate ARM NEON CPU DETECT source list." | 522 echo "Generate ARM NEON CPU DETECT source list." |
498 config=$(print_config linux/arm-neon-cpu-detect) | 523 config=$(print_config linux/arm-neon-cpu-detect) |
499 make_clean | 524 make_clean |
500 make libvpx_srcs.txt target=libs $config > /dev/null | 525 make libvpx_srcs.txt target=libs $config > /dev/null |
501 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon_cpu_detect | 526 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon_cpu_detect |
502 | 527 |
503 echo "Generate ARM64 source list." | 528 echo "Generate ARM64 source list." |
504 config=$(print_config linux/arm64) | 529 config=$(print_config linux/arm64) |
505 make_clean | 530 make_clean |
506 make libvpx_srcs.txt target=libs $config > /dev/null | 531 make libvpx_srcs.txt target=libs $config > /dev/null |
507 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm64 | 532 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm64 |
508 | 533 |
509 echo "Generate MIPS source list." | 534 echo "Generate MIPS source list." |
510 config=$(print_config_basic linux/mipsel) | 535 config=$(print_config_basic linux/mipsel) |
511 make_clean | 536 make_clean |
512 make libvpx_srcs.txt target=libs $config > /dev/null | 537 make libvpx_srcs.txt target=libs $config > /dev/null |
513 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_mips | 538 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_mips |
514 | 539 |
515 echo "MIPS64 source list is identical to MIPS source list. No need to generate i
t." | 540 echo "MIPS64 source list is identical to MIPS source list. No need to generate
it." |
516 | 541 |
517 echo "Generate NaCl source list." | 542 echo "Generate NaCl source list." |
518 config=$(print_config_basic nacl) | 543 config=$(print_config_basic nacl) |
519 make_clean | 544 make_clean |
520 make libvpx_srcs.txt target=libs $config > /dev/null | 545 make libvpx_srcs.txt target=libs $config > /dev/null |
521 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_nacl | 546 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_nacl |
522 | 547 |
523 echo "Generate GENERIC source list." | 548 echo "Generate GENERIC source list." |
524 config=$(print_config_basic linux/generic) | 549 config=$(print_config_basic linux/generic) |
525 make_clean | 550 make_clean |
526 make libvpx_srcs.txt target=libs $config > /dev/null | 551 make libvpx_srcs.txt target=libs $config > /dev/null |
527 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic | 552 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic |
| 553 fi |
528 | 554 |
529 echo "Remove temporary directory." | 555 echo "Remove temporary directory." |
530 cd $BASE_DIR | 556 cd $BASE_DIR |
531 rm -rf $TEMP_DIR | 557 rm -rf $TEMP_DIR |
532 | 558 |
533 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 559 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
OLD | NEW |