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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSE
T)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl
,--end-group $(LIBS) | 159 cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSE
T)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl
,--end-group $(LIBS) |
160 """ | 160 """ |
161 | 161 |
162 LINK_COMMANDS_MAC = """\ | 162 LINK_COMMANDS_MAC = """\ |
163 quiet_cmd_alink = LIBTOOL-STATIC $@ | 163 quiet_cmd_alink = LIBTOOL-STATIC $@ |
164 cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS
) -static -o $@ $(filter %.o,$^) | 164 cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS
) -static -o $@ $(filter %.o,$^) |
165 | 165 |
166 quiet_cmd_link = LINK($(TOOLSET)) $@ | 166 quiet_cmd_link = LINK($(TOOLSET)) $@ |
167 cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_
INPUTS) $(LIBS) | 167 cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_
INPUTS) $(LIBS) |
168 | 168 |
169 # TODO(thakis): Find out and document the difference between shared_library and | |
170 # loadable_module on mac. | |
171 quiet_cmd_solink = SOLINK($(TOOLSET)) $@ | 169 quiet_cmd_solink = SOLINK($(TOOLSET)) $@ |
172 cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o
"$@" $(LD_INPUTS) $(LIBS) | 170 cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o
"$@" $(LD_INPUTS) $(LIBS) |
173 | 171 |
174 # TODO(thakis): The solink_module rule is likely wrong. Xcode seems to pass | |
175 # -bundle -single_module here (for osmesa.so). | |
176 quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ | 172 quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ |
177 cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSE
T)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) | 173 cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSE
T)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) |
178 """ | 174 """ |
179 | 175 |
180 LINK_COMMANDS_ANDROID = """\ | 176 LINK_COMMANDS_ANDROID = """\ |
181 quiet_cmd_alink = AR($(TOOLSET)) $@ | 177 quiet_cmd_alink = AR($(TOOLSET)) $@ |
182 cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) | 178 cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) |
183 | 179 |
184 quiet_cmd_alink_thin = AR($(TOOLSET)) $@ | 180 quiet_cmd_alink_thin = AR($(TOOLSET)) $@ |
185 cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) | 181 cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) |
186 | 182 |
187 # Due to circular dependencies between libraries :(, we wrap the | 183 # Due to circular dependencies between libraries :(, we wrap the |
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2150 root_makefile.write("endif\n") | 2146 root_makefile.write("endif\n") |
2151 root_makefile.write('\n') | 2147 root_makefile.write('\n') |
2152 | 2148 |
2153 if (not generator_flags.get('standalone') | 2149 if (not generator_flags.get('standalone') |
2154 and generator_flags.get('auto_regeneration', True)): | 2150 and generator_flags.get('auto_regeneration', True)): |
2155 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) | 2151 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) |
2156 | 2152 |
2157 root_makefile.write(SHARED_FOOTER) | 2153 root_makefile.write(SHARED_FOOTER) |
2158 | 2154 |
2159 root_makefile.close() | 2155 root_makefile.close() |
OLD | NEW |