OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import buildbot_common | 6 import buildbot_common |
7 import make_rules | 7 import make_rules |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import sys | 10 import sys |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 project = target['NAME'] | 152 project = target['NAME'] |
153 ptype = target['TYPE'] | 153 ptype = target['TYPE'] |
154 srcs = GetSourcesDict(target['SOURCES']) | 154 srcs = GetSourcesDict(target['SOURCES']) |
155 objs = GetProjectObjects(srcs) | 155 objs = GetProjectObjects(srcs) |
156 defs = target.get('DEFINES', []) | 156 defs = target.get('DEFINES', []) |
157 incs = target.get('INCLUDES', []) | 157 incs = target.get('INCLUDES', []) |
158 libs = target.get('LIBS', []) | 158 libs = target.get('LIBS', []) |
159 lpaths = target.get('LIBPATHS', []) | 159 lpaths = target.get('LIBPATHS', []) |
160 ipaths = target.get('INCPATHS', []) | 160 ipaths = target.get('INCPATHS', []) |
161 makeobj.SetProject(project, ptype, defs=defs, incs=incs, libs=libs) | 161 makeobj.SetProject(project, ptype, defs=defs, incs=incs, libs=libs) |
| 162 if ptype == 'main': |
| 163 rules += makeobj.GetPepperPlugin() |
162 for arch in arches: | 164 for arch in arches: |
163 makeobj.SetArch(arch) | 165 makeobj.SetArch(arch) |
164 for src in srcs.get('.c', []): | 166 for src in srcs.get('.c', []): |
165 rules += makeobj.BuildCompileRule('CC', src) | 167 rules += makeobj.BuildCompileRule('CC', src) |
166 for src in srcs.get('.cc', []): | 168 for src in srcs.get('.cc', []): |
167 rules += makeobj.BuildCompileRule('CXX', src) | 169 rules += makeobj.BuildCompileRule('CXX', src) |
168 rules += '\n' | 170 rules += '\n' |
169 rules += makeobj.BuildObjectList() | 171 rules += makeobj.BuildObjectList() |
170 rules += makeobj.BuildLinkRule() | 172 rules += makeobj.BuildLinkRule() |
171 if main: | 173 if main: |
172 rules += GenerateNMFRules(tc, main, dlls, cfg, arches) | 174 rules += GenerateNMFRules(tc, main, dlls, cfg, arches) |
173 | 175 |
174 rules += GenerateCleanRules(tools, configs) | 176 rules += GenerateCleanRules(tools, configs) |
175 rules += '\nall: $(ALL_TARGETS)\n' | 177 rules += '\nall: $(ALL_TARGETS)\n' |
| 178 |
176 return '', rules | 179 return '', rules |
177 | 180 |
178 | 181 |
179 | 182 |
180 def GenerateReplacements(desc, tools): | 183 def GenerateReplacements(desc, tools): |
181 # Generate target settings | 184 # Generate target settings |
182 plats = GetPlatforms(desc['TOOLS'], tools) | 185 plats = GetPlatforms(desc['TOOLS'], tools) |
183 | 186 |
184 settings = GenerateSettings(desc, tools) | 187 settings = GenerateSettings(desc, tools) |
185 tool_def = GenerateToolDefaults(desc, tools) | 188 tool_def = GenerateToolDefaults(desc, tools) |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 if options.master: | 538 if options.master: |
536 master_in = os.path.join(SDK_EXAMPLE_DIR, 'Makefile') | 539 master_in = os.path.join(SDK_EXAMPLE_DIR, 'Makefile') |
537 for dest, projects in master_projects.iteritems(): | 540 for dest, projects in master_projects.iteritems(): |
538 master_out = os.path.join(options.dstroot, dest, 'Makefile') | 541 master_out = os.path.join(options.dstroot, dest, 'Makefile') |
539 GenerateMasterMakefile(master_in, master_out, projects) | 542 GenerateMasterMakefile(master_in, master_out, projects) |
540 return 0 | 543 return 0 |
541 | 544 |
542 | 545 |
543 if __name__ == '__main__': | 546 if __name__ == '__main__': |
544 sys.exit(main(sys.argv[1:])) | 547 sys.exit(main(sys.argv[1:])) |
OLD | NEW |