| OLD | NEW |
| 1 # Copyright (c) 2013 Google Inc. All rights reserved. | 1 # Copyright (c) 2013 Google Inc. All rights reserved. |
| 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 # |
| (...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 self.WriteDoCmd([self.output_binary], link_deps, 'link_host', | 1572 self.WriteDoCmd([self.output_binary], link_deps, 'link_host', |
| 1573 part_of_all, postbuilds=postbuilds) | 1573 part_of_all, postbuilds=postbuilds) |
| 1574 else: | 1574 else: |
| 1575 self.WriteDoCmd([self.output_binary], link_deps, 'link', part_of_all, | 1575 self.WriteDoCmd([self.output_binary], link_deps, 'link', part_of_all, |
| 1576 postbuilds=postbuilds) | 1576 postbuilds=postbuilds) |
| 1577 | 1577 |
| 1578 elif self.type == 'static_library': | 1578 elif self.type == 'static_library': |
| 1579 for link_dep in link_deps: | 1579 for link_dep in link_deps: |
| 1580 assert ' ' not in link_dep, ( | 1580 assert ' ' not in link_dep, ( |
| 1581 "Spaces in alink input filenames not supported (%s)" % link_dep) | 1581 "Spaces in alink input filenames not supported (%s)" % link_dep) |
| 1582 if (self.flavor not in ('mac', 'openbsd', 'win') and not | 1582 if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not |
| 1583 self.is_standalone_static_library): | 1583 self.is_standalone_static_library): |
| 1584 self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin', | 1584 self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin', |
| 1585 part_of_all, postbuilds=postbuilds) | 1585 part_of_all, postbuilds=postbuilds) |
| 1586 else: | 1586 else: |
| 1587 self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all, | 1587 self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all, |
| 1588 postbuilds=postbuilds) | 1588 postbuilds=postbuilds) |
| 1589 elif self.type == 'shared_library': | 1589 elif self.type == 'shared_library': |
| 1590 self.WriteLn('%s: LD_INPUTS := %s' % ( | 1590 self.WriteLn('%s: LD_INPUTS := %s' % ( |
| 1591 QuoteSpaces(self.output_binary), | 1591 QuoteSpaces(self.output_binary), |
| 1592 ' '.join(map(QuoteSpaces, link_deps)))) | 1592 ' '.join(map(QuoteSpaces, link_deps)))) |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2204 root_makefile.write("endif\n") | 2204 root_makefile.write("endif\n") |
| 2205 root_makefile.write('\n') | 2205 root_makefile.write('\n') |
| 2206 | 2206 |
| 2207 if (not generator_flags.get('standalone') | 2207 if (not generator_flags.get('standalone') |
| 2208 and generator_flags.get('auto_regeneration', True)): | 2208 and generator_flags.get('auto_regeneration', True)): |
| 2209 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) | 2209 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) |
| 2210 | 2210 |
| 2211 root_makefile.write(SHARED_FOOTER) | 2211 root_makefile.write(SHARED_FOOTER) |
| 2212 | 2212 |
| 2213 root_makefile.close() | 2213 root_makefile.close() |
| OLD | NEW |