| 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 Modified version of gyp_skia, used by gyp_to_android.py to generate Android.mk | 9 Modified version of gyp_skia, used by gyp_to_android.py to generate Android.mk |
| 10 """ | 10 """ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 assert os.path.exists(gyp_source_dir) | 56 assert os.path.exists(gyp_source_dir) |
| 57 | 57 |
| 58 sys.path.insert(0, os.path.join(gyp_source_dir, 'pylib')) | 58 sys.path.insert(0, os.path.join(gyp_source_dir, 'pylib')) |
| 59 | 59 |
| 60 import gyp | 60 import gyp |
| 61 | 61 |
| 62 # Set GYP_DEFINES for building for the android framework. | 62 # Set GYP_DEFINES for building for the android framework. |
| 63 gyp_defines = ('skia_android_framework=1 OS=android skia_arch_type=%s ' | 63 gyp_defines = ('skia_android_framework=1 OS=android skia_arch_type=%s ' |
| 64 % skia_arch_type) | 64 % skia_arch_type) |
| 65 if skia_arch_type == 'arm': | 65 if skia_arch_type == 'arm': |
| 66 # Always use thumb and version 7 for arm | 66 # Always version 7 (which implies thumb) for arm |
| 67 gyp_defines += 'arm_thumb=1 arm_version=7 ' | 67 gyp_defines += 'arm_version=7 ' |
| 68 if have_neon: | 68 if have_neon: |
| 69 gyp_defines += 'arm_neon=1 ' | 69 gyp_defines += 'arm_neon=1 ' |
| 70 else: | 70 else: |
| 71 gyp_defines += 'arm_neon=0 ' | 71 gyp_defines += 'arm_neon=0 ' |
| 72 | 72 |
| 73 os.environ['GYP_DEFINES'] = gyp_defines | 73 os.environ['GYP_DEFINES'] = gyp_defines |
| 74 | 74 |
| 75 args = [] | 75 args = [] |
| 76 args.extend(['--depth', '.']) | 76 args.extend(['--depth', '.']) |
| 77 full_path = os.path.join(target_dir, target_file) | 77 full_path = os.path.join(target_dir, target_file) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 100 """Remove the gypd files generated by main(). | 100 """Remove the gypd files generated by main(). |
| 101 | 101 |
| 102 Args: | 102 Args: |
| 103 folder: Folder in which to delete all files ending with 'gypd'. | 103 folder: Folder in which to delete all files ending with 'gypd'. |
| 104 """ | 104 """ |
| 105 assert os.path.isdir(folder) | 105 assert os.path.isdir(folder) |
| 106 files = os.listdir(folder) | 106 files = os.listdir(folder) |
| 107 for f in files: | 107 for f in files: |
| 108 if f.endswith('gypd'): | 108 if f.endswith('gypd'): |
| 109 os.remove(os.path.join(folder, f)) | 109 os.remove(os.path.join(folder, f)) |
| OLD | NEW |