OLD | NEW |
---|---|
1 # Copyright (c) 2013 Google Inc. All rights reserved. | 1 # Copyright (c) 2016 The Chromium Authors. All rights reserved. |
Dirk Pranke
2016/11/14 21:28:38
I *think* this needs to stay as Google, actually,
| |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Notes: | 5 # Notes: |
6 # | 6 # |
7 # This is all roughly based on the Makefile system used by the Linux | 7 # This is all roughly based on the Makefile system used by the Linux |
8 # kernel, but is a non-recursive make -- we put the entire dependency | 8 # kernel, but is a non-recursive make -- we put the entire dependency |
9 # graph in front of make and let it figure it out. | 9 # graph in front of make and let it figure it out. |
10 # | 10 # |
11 # The code below generates a separate .mk file for each target, but | 11 # The code below generates a separate .mk file for each target, but |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 'generator_additional_path_sections', []) | 85 'generator_additional_path_sections', []) |
86 global generator_extra_sources_for_rules | 86 global generator_extra_sources_for_rules |
87 generator_extra_sources_for_rules = getattr(xcode_generator, | 87 generator_extra_sources_for_rules = getattr(xcode_generator, |
88 'generator_extra_sources_for_rules', []) | 88 'generator_extra_sources_for_rules', []) |
89 COMPILABLE_EXTENSIONS.update({'.m': 'objc', '.mm' : 'objcxx'}) | 89 COMPILABLE_EXTENSIONS.update({'.m': 'objc', '.mm' : 'objcxx'}) |
90 else: | 90 else: |
91 operating_system = flavor | 91 operating_system = flavor |
92 if flavor == 'android': | 92 if flavor == 'android': |
93 operating_system = 'linux' # Keep this legacy behavior for now. | 93 operating_system = 'linux' # Keep this legacy behavior for now. |
94 default_variables.setdefault('OS', operating_system) | 94 default_variables.setdefault('OS', operating_system) |
95 default_variables.setdefault('SHARED_LIB_SUFFIX', '.so') | 95 if flavor == 'aix': |
96 default_variables.setdefault('SHARED_LIB_SUFFIX', '.a') | |
97 else: | |
98 default_variables.setdefault('SHARED_LIB_SUFFIX', '.so') | |
96 default_variables.setdefault('SHARED_LIB_DIR','$(builddir)/lib.$(TOOLSET)') | 99 default_variables.setdefault('SHARED_LIB_DIR','$(builddir)/lib.$(TOOLSET)') |
97 default_variables.setdefault('LIB_DIR', '$(obj).$(TOOLSET)') | 100 default_variables.setdefault('LIB_DIR', '$(obj).$(TOOLSET)') |
98 | 101 |
99 | 102 |
100 def CalculateGeneratorInputInfo(params): | 103 def CalculateGeneratorInputInfo(params): |
101 """Calculate the generator specific info that gets fed to input (called by | 104 """Calculate the generator specific info that gets fed to input (called by |
102 gyp).""" | 105 gyp).""" |
103 generator_flags = params.get('generator_flags', {}) | 106 generator_flags = params.get('generator_flags', {}) |
104 android_ndk_version = generator_flags.get('android_ndk_version', None) | 107 android_ndk_version = generator_flags.get('android_ndk_version', None) |
105 # Android NDK requires a strict link order. | 108 # Android NDK requires a strict link order. |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1342 target_ext = '' | 1345 target_ext = '' |
1343 if self.type == 'static_library': | 1346 if self.type == 'static_library': |
1344 if target[:3] == 'lib': | 1347 if target[:3] == 'lib': |
1345 target = target[3:] | 1348 target = target[3:] |
1346 target_prefix = 'lib' | 1349 target_prefix = 'lib' |
1347 target_ext = '.a' | 1350 target_ext = '.a' |
1348 elif self.type in ('loadable_module', 'shared_library'): | 1351 elif self.type in ('loadable_module', 'shared_library'): |
1349 if target[:3] == 'lib': | 1352 if target[:3] == 'lib': |
1350 target = target[3:] | 1353 target = target[3:] |
1351 target_prefix = 'lib' | 1354 target_prefix = 'lib' |
1352 target_ext = '.so' | 1355 if self.flavor == 'aix': |
1356 target_ext = '.a' | |
1357 else: | |
1358 target_ext = '.so' | |
1353 elif self.type == 'none': | 1359 elif self.type == 'none': |
1354 target = '%s.stamp' % target | 1360 target = '%s.stamp' % target |
1355 elif self.type != 'executable': | 1361 elif self.type != 'executable': |
1356 print ("ERROR: What output file should be generated?", | 1362 print ("ERROR: What output file should be generated?", |
1357 "type", self.type, "target", target) | 1363 "type", self.type, "target", target) |
1358 | 1364 |
1359 target_prefix = spec.get('product_prefix', target_prefix) | 1365 target_prefix = spec.get('product_prefix', target_prefix) |
1360 target = spec.get('product_name', target) | 1366 target = spec.get('product_name', target) |
1361 product_ext = spec.get('product_extension') | 1367 product_ext = spec.get('product_extension') |
1362 if product_ext: | 1368 if product_ext: |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2214 root_makefile.write("endif\n") | 2220 root_makefile.write("endif\n") |
2215 root_makefile.write('\n') | 2221 root_makefile.write('\n') |
2216 | 2222 |
2217 if (not generator_flags.get('standalone') | 2223 if (not generator_flags.get('standalone') |
2218 and generator_flags.get('auto_regeneration', True)): | 2224 and generator_flags.get('auto_regeneration', True)): |
2219 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) | 2225 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) |
2220 | 2226 |
2221 root_makefile.write(SHARED_FOOTER) | 2227 root_makefile.write(SHARED_FOOTER) |
2222 | 2228 |
2223 root_makefile.close() | 2229 root_makefile.close() |
OLD | NEW |