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 .gni files and files in the | 7 # This script is used to generate .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 # |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 # 1. Filter .c, .h, .s, .S and .asm files. | 105 # 1. Filter .c, .h, .s, .S and .asm files. |
106 # 2. Move certain files to a separate lists to allow applying different | 106 # 2. Move certain files to a separate lists to allow applying different |
107 # compiler options. | 107 # compiler options. |
108 # 3. Replace .asm.s to .asm because gn will do the conversion. | 108 # 3. Replace .asm.s to .asm because gn will do the conversion. |
109 | 109 |
110 local source_list=$(grep -E '(\.c|\.h|\.S|\.s|\.asm)$' $1) | 110 local source_list=$(grep -E '(\.c|\.h|\.S|\.s|\.asm)$' $1) |
111 | 111 |
112 # Not sure why vpx_config.c is not included. | 112 # Not sure why vpx_config.c is not included. |
113 source_list=$(echo "$source_list" | grep -v 'vpx_config\.c') | 113 source_list=$(echo "$source_list" | grep -v 'vpx_config\.c') |
114 | 114 |
| 115 # Ignore include files. |
| 116 source_list=$(echo "$source_list" | grep -v 'x86_abi_support\.asm') |
| 117 |
115 # The actual ARM files end in .asm. We have rules to translate them to .S | 118 # The actual ARM files end in .asm. We have rules to translate them to .S |
116 source_list=$(echo "$source_list" | sed s/\.asm\.s$/.asm/) | 119 source_list=$(echo "$source_list" | sed s/\.asm\.s$/.asm/) |
117 | 120 |
118 # Select all x86 files ending with .c | 121 # Select all x86 files ending with .c |
119 local intrinsic_list=$(echo "$source_list" | \ | 122 local intrinsic_list=$(echo "$source_list" | \ |
120 egrep '(mmx|sse2|sse3|ssse3|sse4|avx|avx2).c$') | 123 egrep '(mmx|sse2|sse3|ssse3|sse4|avx|avx2).c$') |
121 | 124 |
122 # Select all neon files ending in C but only when building in RTCD mode | 125 # Select all neon files ending in C but only when building in RTCD mode |
123 if [ "libvpx_srcs_arm_neon_cpu_detect" == "$2" ]; then | 126 if [ "libvpx_srcs_arm_neon_cpu_detect" == "$2" ]; then |
124 # Select all arm neon files ending in _neon.c and all asm files. | 127 # Select all arm neon files ending in _neon.c and all asm files. |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 cd $BASE_DIR | 461 cd $BASE_DIR |
459 rm -rf $TEMP_DIR | 462 rm -rf $TEMP_DIR |
460 | 463 |
461 gn format --in-place $BASE_DIR/BUILD.gn | 464 gn format --in-place $BASE_DIR/BUILD.gn |
462 gn format --in-place $BASE_DIR/libvpx_srcs.gni | 465 gn format --in-place $BASE_DIR/libvpx_srcs.gni |
463 | 466 |
464 cd $BASE_DIR/$LIBVPX_SRC_DIR | 467 cd $BASE_DIR/$LIBVPX_SRC_DIR |
465 update_readme | 468 update_readme |
466 | 469 |
467 cd $BASE_DIR | 470 cd $BASE_DIR |
OLD | NEW |