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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 | 220 |
221 # Clean files from previous make. | 221 # Clean files from previous make. |
222 function make_clean { | 222 function make_clean { |
223 make clean > /dev/null | 223 make clean > /dev/null |
224 rm -f libvpx_srcs.txt | 224 rm -f libvpx_srcs.txt |
225 } | 225 } |
226 | 226 |
227 # Lint a pair of vpx_config.h and vpx_config.asm to make sure they match. | 227 # Lint a pair of vpx_config.h and vpx_config.asm to make sure they match. |
228 # $1 - Header file directory. | 228 # $1 - Header file directory. |
229 function lint_config { | 229 function lint_config { |
230 $BASE_DIR/lint_config.sh \ | 230 # mips does not contain any assembly so the header does not need to be |
231 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ | 231 # compared to the asm. |
232 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm | 232 if [[ "$1" != *mipsel ]]; then |
Johann
2014/05/16 15:42:53
couple different ways to do this. this is the quic
fgalligan1
2014/05/16 15:49:49
I think this is fine for now.
| |
233 $BASE_DIR/lint_config.sh \ | |
234 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ | |
235 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm | |
236 fi | |
233 } | 237 } |
234 | 238 |
235 # Print the configuration. | 239 # Print the configuration. |
236 # $1 - Header file directory. | 240 # $1 - Header file directory. |
237 function print_config { | 241 function print_config { |
238 $BASE_DIR/lint_config.sh -p \ | 242 $BASE_DIR/lint_config.sh -p \ |
239 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ | 243 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ |
240 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm | 244 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm |
241 } | 245 } |
242 | 246 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
326 cd $TEMP_DIR | 330 cd $TEMP_DIR |
327 | 331 |
328 echo "Generate Config Files" | 332 echo "Generate Config Files" |
329 # TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available | 333 # TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available |
330 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" | 334 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" |
331 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi c --enable-realtime-only ${all_platforms}" | 335 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi c --enable-realtime-only ${all_platforms}" |
332 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable- pic --enable-realtime-only ${all_platforms}" | 336 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable- pic --enable-realtime-only ${all_platforms}" |
333 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt ime-only --disable-install-bins --disable-install-libs ${all_platforms}" | 337 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt ime-only --disable-install-bins --disable-install-libs ${all_platforms}" |
334 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable- realtime-only ${all_platforms}" | 338 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable- realtime-only ${all_platforms}" |
335 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi c --enable-realtime-only --enable-runtime-cpu-detect ${all_platforms}" | 339 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi c --enable-realtime-only --enable-runtime-cpu-detect ${all_platforms}" |
340 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab le-realtime-only ${all_platforms}" | |
336 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne d ${all_platforms}" | 341 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne d ${all_platforms}" |
337 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt ime-only ${all_platforms}" | 342 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt ime-only ${all_platforms}" |
338 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_ platforms}" | 343 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_ platforms}" |
339 gen_config_files win/x64 "--target=x86_64-win64-vs12 --enable-realtime-only ${al l_platforms}" | 344 gen_config_files win/x64 "--target=x86_64-win64-vs12 --enable-realtime-only ${al l_platforms}" |
340 gen_config_files mac/ia32 "--target=x86-darwin9-gcc --enable-pic --enable-realti me-only ${all_platforms}" | 345 gen_config_files mac/ia32 "--target=x86-darwin9-gcc --enable-pic --enable-realti me-only ${all_platforms}" |
341 gen_config_files mac/x64 "--target=x86_64-darwin9-gcc --enable-pic --enable-real time-only ${all_platforms}" | 346 gen_config_files mac/x64 "--target=x86_64-darwin9-gcc --enable-pic --enable-real time-only ${all_platforms}" |
342 gen_config_files nacl "--target=generic-gnu --enable-pic --enable-realtime-only ${all_platforms}" | 347 gen_config_files nacl "--target=generic-gnu --enable-pic --enable-realtime-only ${all_platforms}" |
343 | 348 |
344 echo "Remove temporary directory." | 349 echo "Remove temporary directory." |
345 cd $BASE_DIR | 350 cd $BASE_DIR |
346 rm -rf $TEMP_DIR | 351 rm -rf $TEMP_DIR |
347 | 352 |
348 echo "Lint libvpx configuration." | 353 echo "Lint libvpx configuration." |
349 lint_config linux/ia32 | 354 lint_config linux/ia32 |
350 lint_config linux/x64 | 355 lint_config linux/x64 |
351 lint_config linux/arm | 356 lint_config linux/arm |
352 lint_config linux/arm-neon | 357 lint_config linux/arm-neon |
353 lint_config linux/arm-neon-cpu-detect | 358 lint_config linux/arm-neon-cpu-detect |
359 lint_config linux/arm64 | |
360 lint_config linux/mipsel | |
354 lint_config linux/generic | 361 lint_config linux/generic |
355 lint_config win/ia32 | 362 lint_config win/ia32 |
356 lint_config win/x64 | 363 lint_config win/x64 |
357 lint_config mac/ia32 | 364 lint_config mac/ia32 |
358 lint_config mac/x64 | 365 lint_config mac/x64 |
359 lint_config nacl | 366 lint_config nacl |
360 | 367 |
361 echo "Create temporary directory." | 368 echo "Create temporary directory." |
362 TEMP_DIR="$LIBVPX_SRC_DIR.temp" | 369 TEMP_DIR="$LIBVPX_SRC_DIR.temp" |
363 rm -rf $TEMP_DIR | 370 rm -rf $TEMP_DIR |
364 cp -R $LIBVPX_SRC_DIR $TEMP_DIR | 371 cp -R $LIBVPX_SRC_DIR $TEMP_DIR |
365 cd $TEMP_DIR | 372 cd $TEMP_DIR |
366 | 373 |
367 gen_rtcd_header linux/ia32 x86 | 374 gen_rtcd_header linux/ia32 x86 |
368 gen_rtcd_header linux/x64 x86_64 | 375 gen_rtcd_header linux/x64 x86_64 |
369 gen_rtcd_header linux/arm armv6 | 376 gen_rtcd_header linux/arm armv6 |
370 gen_rtcd_header linux/arm-neon armv7 | 377 gen_rtcd_header linux/arm-neon armv7 |
371 gen_rtcd_header linux/arm-neon-cpu-detect armv7 | 378 gen_rtcd_header linux/arm-neon-cpu-detect armv7 |
379 gen_rtcd_header linux/arm64 armv8 | |
372 gen_rtcd_header linux/mipsel mipsel | 380 gen_rtcd_header linux/mipsel mipsel |
373 gen_rtcd_header linux/generic generic | 381 gen_rtcd_header linux/generic generic |
374 gen_rtcd_header win/ia32 x86 | 382 gen_rtcd_header win/ia32 x86 |
375 gen_rtcd_header win/x64 x86_64 | 383 gen_rtcd_header win/x64 x86_64 |
376 gen_rtcd_header mac/ia32 x86 | 384 gen_rtcd_header mac/ia32 x86 |
377 gen_rtcd_header mac/x64 x86_64 | 385 gen_rtcd_header mac/x64 x86_64 |
378 gen_rtcd_header nacl nacl | 386 gen_rtcd_header nacl nacl |
379 | 387 |
380 echo "Prepare Makefile." | 388 echo "Prepare Makefile." |
381 ./configure --target=generic-gnu > /dev/null | 389 ./configure --target=generic-gnu > /dev/null |
(...skipping 25 matching lines...) Expand all Loading... | |
407 make_clean | 415 make_clean |
408 make libvpx_srcs.txt target=libs $config > /dev/null | 416 make libvpx_srcs.txt target=libs $config > /dev/null |
409 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm_neon | 417 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm_neon |
410 | 418 |
411 echo "Generate ARM NEON CPU DETECT source list." | 419 echo "Generate ARM NEON CPU DETECT source list." |
412 config=$(print_config linux/arm-neon-cpu-detect) | 420 config=$(print_config linux/arm-neon-cpu-detect) |
413 make_clean | 421 make_clean |
414 make libvpx_srcs.txt target=libs $config > /dev/null | 422 make libvpx_srcs.txt target=libs $config > /dev/null |
415 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm_neon_cpu_detect | 423 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm_neon_cpu_detect |
416 | 424 |
425 echo "Generate ARM64 source list." | |
426 config=$(print_config linux/arm64) | |
427 make_clean | |
428 make libvpx_srcs.txt target=libs $config > /dev/null | |
429 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_arm64 | |
430 | |
417 echo "Generate MIPS source list." | 431 echo "Generate MIPS source list." |
418 config=$(print_config_basic linux/mipsel) | 432 config=$(print_config_basic linux/mipsel) |
419 make_clean | 433 make_clean |
420 make libvpx_srcs.txt target=libs $config > /dev/null | 434 make libvpx_srcs.txt target=libs $config > /dev/null |
421 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_mips | 435 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_mips |
422 | 436 |
423 echo "Generate NaCl source list." | 437 echo "Generate NaCl source list." |
424 config=$(print_config_basic nacl) | 438 config=$(print_config_basic nacl) |
425 make_clean | 439 make_clean |
426 make libvpx_srcs.txt target=libs $config > /dev/null | 440 make libvpx_srcs.txt target=libs $config > /dev/null |
427 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_nacl | 441 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_nacl |
428 | 442 |
429 echo "Generate GENERIC source list." | 443 echo "Generate GENERIC source list." |
430 config=$(print_config_basic linux/generic) | 444 config=$(print_config_basic linux/generic) |
431 make_clean | 445 make_clean |
432 make libvpx_srcs.txt target=libs $config > /dev/null | 446 make libvpx_srcs.txt target=libs $config > /dev/null |
433 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic | 447 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic |
434 | 448 |
435 echo "Remove temporary directory." | 449 echo "Remove temporary directory." |
436 cd $BASE_DIR | 450 cd $BASE_DIR |
437 rm -rf $TEMP_DIR | 451 rm -rf $TEMP_DIR |
438 | 452 |
439 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? | 453 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? |
440 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 454 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
OLD | NEW |