| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright 2014 Google Inc. | 3 # Copyright 2014 Google Inc. |
| 4 # | 4 # |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 """ | 8 """ |
| 9 Script for generating the Android framework's version of Skia from gyp | 9 Script for generating the Android framework's version of Skia from gyp |
| 10 files. | 10 files. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 # variable definitions. | 96 # variable definitions. |
| 97 default_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'other', | 97 default_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'other', |
| 98 False) | 98 False) |
| 99 arm_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm', False) | 99 arm_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm', False) |
| 100 arm_neon_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm', | 100 arm_neon_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm', |
| 101 True) | 101 True) |
| 102 x86_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'x86', False) | 102 x86_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'x86', False) |
| 103 | 103 |
| 104 mips_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'mips', False) | 104 mips_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'mips', False) |
| 105 | 105 |
| 106 mips64_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'mips64', |
| 107 False) |
| 108 |
| 106 arm64_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm64', | 109 arm64_var_dict = generate_var_dict(tmp_folder, main_gyp_file, 'arm64', |
| 107 False) | 110 False) |
| 108 | 111 |
| 109 # Compute the intersection of all targets. All the files in the intersection | 112 # Compute the intersection of all targets. All the files in the intersection |
| 110 # should be part of the makefile always. Each dict will now contain trimmed | 113 # should be part of the makefile always. Each dict will now contain trimmed |
| 111 # lists containing only variable definitions specific to that configuration. | 114 # lists containing only variable definitions specific to that configuration. |
| 112 var_dict_list = [default_var_dict, arm_var_dict, arm_neon_var_dict, | 115 var_dict_list = [default_var_dict, arm_var_dict, arm_neon_var_dict, |
| 113 x86_var_dict, mips_var_dict, arm64_var_dict] | 116 x86_var_dict, mips_var_dict, mips64_var_dict, |
| 117 arm64_var_dict] |
| 114 common = vars_dict_lib.intersect(var_dict_list) | 118 common = vars_dict_lib.intersect(var_dict_list) |
| 115 | 119 |
| 116 common.LOCAL_MODULE.add('libskia') | 120 common.LOCAL_MODULE.add('libskia') |
| 117 | 121 |
| 118 # Create SkUserConfig | 122 # Create SkUserConfig |
| 119 user_config = os.path.join(SKIA_DIR, 'include', 'config', 'SkUserConfig.h') | 123 user_config = os.path.join(SKIA_DIR, 'include', 'config', 'SkUserConfig.h') |
| 120 if target_dir: | 124 if target_dir: |
| 121 dst_dir = target_dir | 125 dst_dir = target_dir |
| 122 else: | 126 else: |
| 123 dst_dir = os.path.join(SKIA_DIR, 'include', 'core') | 127 dst_dir = os.path.join(SKIA_DIR, 'include', 'core') |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 arm_neon_var_dict, 'arm', 'ARCH_ARM_HAVE_NEON')) | 183 arm_neon_var_dict, 'arm', 'ARCH_ARM_HAVE_NEON')) |
| 180 deviations_from_common.append(makefile_writer.VarsDictData(x86_var_dict, | 184 deviations_from_common.append(makefile_writer.VarsDictData(x86_var_dict, |
| 181 'x86')) | 185 'x86')) |
| 182 # Currently, x86_64 is identical to x86 | 186 # Currently, x86_64 is identical to x86 |
| 183 deviations_from_common.append(makefile_writer.VarsDictData(x86_var_dict, | 187 deviations_from_common.append(makefile_writer.VarsDictData(x86_var_dict, |
| 184 'x86_64')) | 188 'x86_64')) |
| 185 | 189 |
| 186 deviations_from_common.append(makefile_writer.VarsDictData(mips_var_dict, | 190 deviations_from_common.append(makefile_writer.VarsDictData(mips_var_dict, |
| 187 'mips')) | 191 'mips')) |
| 188 | 192 |
| 193 deviations_from_common.append(makefile_writer.VarsDictData(mips64_var_dict, |
| 194 'mips64')) |
| 195 |
| 189 deviations_from_common.append(makefile_writer.VarsDictData(arm64_var_dict, | 196 deviations_from_common.append(makefile_writer.VarsDictData(arm64_var_dict, |
| 190 'arm64')) | 197 'arm64')) |
| 191 | 198 |
| 192 makefile_writer.write_android_mk(target_dir=target_dir, | 199 makefile_writer.write_android_mk(target_dir=target_dir, |
| 193 common=common, deviations_from_common=deviations_from_common) | 200 common=common, deviations_from_common=deviations_from_common) |
| 194 | 201 |
| 195 finally: | 202 finally: |
| 196 shutil.rmtree(tmp_folder) | 203 shutil.rmtree(tmp_folder) |
| 197 | 204 |
| 198 if __name__ == '__main__': | 205 if __name__ == '__main__': |
| 199 main() | 206 main() |
| OLD | NEW |