OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 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 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 # so we need lots of escaping. | 1447 # so we need lots of escaping. |
1448 ldflags.append(r'-Wl,-rpath=\$$ORIGIN/lib.%s/' % self.toolset) | 1448 ldflags.append(r'-Wl,-rpath=\$$ORIGIN/lib.%s/' % self.toolset) |
1449 ldflags.append(r'-Wl,-rpath-link=\$(builddir)/lib.%s/' % | 1449 ldflags.append(r'-Wl,-rpath-link=\$(builddir)/lib.%s/' % |
1450 self.toolset) | 1450 self.toolset) |
1451 self.WriteList(ldflags, 'LDFLAGS_%s' % configname) | 1451 self.WriteList(ldflags, 'LDFLAGS_%s' % configname) |
1452 libraries = spec.get('libraries') | 1452 libraries = spec.get('libraries') |
1453 if libraries: | 1453 if libraries: |
1454 # Remove duplicate entries | 1454 # Remove duplicate entries |
1455 libraries = gyp.common.uniquer(libraries) | 1455 libraries = gyp.common.uniquer(libraries) |
1456 if self.flavor == 'mac': | 1456 if self.flavor == 'mac': |
1457 libraries = self.xcode_settings.AdjustFrameworkLibraries(libraries) | 1457 libraries = self.xcode_settings.AdjustLibraries(libraries) |
1458 self.WriteList(libraries, 'LIBS') | 1458 self.WriteList(libraries, 'LIBS') |
1459 self.WriteLn('%s: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))' % | 1459 self.WriteLn('%s: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))' % |
1460 QuoteSpaces(self.output_binary)) | 1460 QuoteSpaces(self.output_binary)) |
1461 self.WriteLn('%s: LIBS := $(LIBS)' % QuoteSpaces(self.output_binary)) | 1461 self.WriteLn('%s: LIBS := $(LIBS)' % QuoteSpaces(self.output_binary)) |
1462 | 1462 |
1463 postbuilds = [] | 1463 postbuilds = [] |
1464 if self.flavor == 'mac': | 1464 if self.flavor == 'mac': |
1465 if has_target_postbuilds: | 1465 if has_target_postbuilds: |
1466 postbuilds.append('$(TARGET_POSTBUILDS_$(BUILDTYPE))') | 1466 postbuilds.append('$(TARGET_POSTBUILDS_$(BUILDTYPE))') |
1467 # Postbuild actions. Like actions, but implicitly depend on the target's | 1467 # Postbuild actions. Like actions, but implicitly depend on the target's |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2177 # Add a check to make sure we tried to process all the .d files. | 2177 # Add a check to make sure we tried to process all the .d files. |
2178 all_deps += """ | 2178 all_deps += """ |
2179 ifneq ($(word %(last)d,$(d_files)),) | 2179 ifneq ($(word %(last)d,$(d_files)),) |
2180 $(error Found unprocessed dependency files (gyp didn't generate enough rules
!)) | 2180 $(error Found unprocessed dependency files (gyp didn't generate enough rules
!)) |
2181 endif | 2181 endif |
2182 """ % { 'last': ((num_outputs / 1000) + 1) * 1000 + 1 } | 2182 """ % { 'last': ((num_outputs / 1000) + 1) * 1000 + 1 } |
2183 | 2183 |
2184 root_makefile.write(SHARED_FOOTER % { 'generate_all_deps': all_deps }) | 2184 root_makefile.write(SHARED_FOOTER % { 'generate_all_deps': all_deps }) |
2185 | 2185 |
2186 root_makefile.close() | 2186 root_makefile.close() |
OLD | NEW |