3 # Copyright (c) 2007, Intel Corporation
4 # All rights reserved. This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 """Generate build file for given platform"""
15 import xml
.dom
.minidom
, pprint
16 import FrameworkElement
18 from SurfaceAreaElement
import *
19 from XmlRoutines
import *
20 from AntTasks
import *
24 def __init__(self
, workspace
, platform
, toolchain
, target
):
25 if workspace
== None or workspace
== "":
26 raise Exception("No workspace, no build")
27 if platform
== None or platform
== "":
28 raise Exception("No platform, no build")
29 if toolchain
== None or toolchain
== "":
30 raise Exception("No toolchain, no build")
31 if target
== None or target
== "":
32 raise Exception("No target, no build")
34 self
.Workspace
= workspace
35 self
.Platform
= platform
36 self
.Toolchain
= toolchain
41 """Generate the build file"""
44 # generating build.xml for platform
45 class AntPlatformBuildFile(BuildFile
):
46 def __init__(self
, workspace
, platform
, toolchain
, target
):
47 BuildFile
.__init
__(self
, workspace
, platform
, toolchain
, target
)
48 # Form the build file path, hard-coded at present. It should be specified by a configuration file
49 self
.Path
= os
.path
.join(self
.Workspace
.Path
, self
.Platform
.OutputPath
, target
+ "_" + toolchain
, "build.xml")
51 # Generate a common build option property file in the format of Java's property file
52 self
.DefaultBuildOptions()
54 # new a build file object
55 self
.BuildXml
= AntBuildFile(name
="platform", basedir
=".", default
="all")
57 # generate the top level properties, tasks, etc.
60 # generate "prebuild" target
63 # generate "libraries" target for building library modules
66 # generate "modules" target for building non-library modules
69 # generate "fvs" target for building firmware volume. (not supported yet)
71 # generate "fds" target for building FlashDevice. (not supported yet)
73 # generate "postbuild" target
77 print "Generating platform build file ...", self
.Path
78 self
.BuildXml
.Create(self
.Path
)
81 _topLevel
= self
.BuildXml
82 # import external tasks
83 _topLevel
.SubTask("taskdef", resource
="GenBuild.tasks")
84 _topLevel
.SubTask("taskdef", resource
="frameworktasks.tasks")
85 _topLevel
.SubTask("taskdef", resource
="net/sf/antcontrib/antlib.xml")
87 # platform wide properties
89 _topLevel
.Comment("WORKSPACE wide attributes")
90 _topLevel
.SubTask("property", environment
="env")
91 _topLevel
.SubTask("property", name
="WORKSPACE_DIR", value
="${env.WORKSPACE}")
92 _topLevel
.SubTask("property", name
="CONFIG_DIR", value
="${WORKSPACE_DIR}/Tools/Conf")
95 _topLevel
.Comment("Common build attributes")
96 _topLevel
.SubTask("property", name
="THREAD_COUNT", value
=self
.Workspace
.ThreadCount
)
97 _topLevel
.SubTask("property", name
="SINGLE_MODULE_BUILD", value
="no")
98 _topLevel
.SubTask("property", name
="MODULE_BUILD_TARGET", value
="platform_module_build")
100 _topLevel
.Blankline()
101 _topLevel
.SubTask("property", name
="TOOLCHAIN", value
=self
.Toolchain
)
102 _topLevel
.SubTask("property", name
="TARGET", value
=self
.Target
)
104 _topLevel
.Blankline()
105 _topLevel
.Comment("Platform attributes")
106 _topLevel
.SubTask("property", name
="PLATFORM", value
=self
.Platform
.Name
)
107 _topLevel
.SubTask("property", name
="PLATFORM_GUID", value
=self
.Platform
.GuidValue
)
108 _topLevel
.SubTask("property", name
="PLATFORM_VERSION", value
=self
.Platform
.Version
)
109 _topLevel
.SubTask("property", name
="PLATFORM_RELATIVE_DIR", value
=self
.Platform
.Dir
)
110 _topLevel
.SubTask("property", name
="PLATFORM_DIR", value
="${WORKSPACE_DIR}/${PLATFORM_RELATIVE_DIR}")
111 _topLevel
.SubTask("property", name
="PLATFORM_OUTPUT_DIR", value
=self
.Platform
.OutputPath
)
113 # user configurable build path for platform
114 _topLevel
.Blankline()
115 _topLevel
.Comment("Common path definition for platform build")
116 _topLevel
.SubTask("property", file="${WORKSPACE_DIR}/Tools/Python/buildgen/platform_build_path.txt")
118 # common build tasks in the form of Ant macro
119 _topLevel
.Blankline()
120 _topLevel
.Comment("Task Macros for Compiling, Assembling, Linking, etc.")
121 _topLevel
.SubTask("import", file="${CONFIG_DIR}/BuildMacro.xml")
122 _topLevel
.Blankline()
123 _topLevel
.SubTask("echo", message
="${PLATFORM}-${PLATFORM_VERSION} (${PLATFORM_RELATIVE_DIR})", level
="info")
125 # define the targets execution sequence
126 _topLevel
.Blankline()
127 _topLevel
.Comment("Default target")
128 _topLevel
.SubTask("target", name
="all", depends
="prebuild, libraries, modules, postbuild")
131 _topLevel
= self
.BuildXml
132 _topLevel
.Blankline()
133 _topLevel
.Comment(" TARGET: prebuild ")
135 # prebuild is defined by user in the fpd file through <UserExtionsion> element,
136 # which has attribute "identifier=0" or "identifier=prebuild"
138 if self
.Platform
.UserExtensions
.has_key("0"):
139 prebuildTasks
= self
.Platform
.UserExtensions
["0"]
140 elif self
.Platform
.UserExtensions
.has_key("postbuild"):
141 prebuildTasks
= self
.Platform
.UserExtensions
["prebuild"]
143 _topLevel
.SubTask("target", prebuildTasks
, name
="prebuild")
146 _topLevel
= self
.BuildXml
147 _topLevel
.Blankline()
148 _topLevel
.Comment(" TARGET: libraries ")
150 librariesTarget
= _topLevel
.SubTask("target", name
="libraries")
151 parallelBuild
= librariesTarget
.SubTask("parallel", threadCount
="${THREAD_COUNT}")
154 for arch
in self
.Platform
.Libraries
:
155 libraryNumber
+= len(self
.Platform
.Libraries
[arch
])
157 for arch
in self
.Platform
.Libraries
:
158 for lib
in self
.Platform
.Libraries
[arch
]:
160 print "Generating library build files ... %d%%\r" % int((float(libraryIndex
) / float(libraryNumber
)) * 100),
161 buildFile
= AntModuleBuildFile(self
.Workspace
, self
.Platform
, lib
, self
.Toolchain
, self
.Target
, arch
)
163 buildDir
= os
.path
.join("${TARGET_DIR}", arch
, lib
.Module
.Package
.SubPath(lib
.Module
.Dir
),
164 lib
.Module
.FileBaseName
)
165 parallelBuild
.SubTask("ant", dir=buildDir
,
166 #antfile="build.xml",
168 target
="${MODULE_BUILD_TARGET}")
172 _topLevel
= self
.BuildXml
173 _topLevel
.Blankline()
174 _topLevel
.Comment(" TARGET: modules ")
176 modulesTarget
= _topLevel
.SubTask("target", name
="modules")
177 parallelBuild
= modulesTarget
.SubTask("parallel", threadCount
="${THREAD_COUNT}")
180 for arch
in self
.Platform
.Modules
:
181 moduleNumber
+= len(self
.Platform
.Modules
[arch
])
184 for arch
in self
.Platform
.Modules
:
185 for module
in self
.Platform
.Modules
[arch
]:
187 print "Generating module build files ... %d%%\r" % int((float(moduleIndex
) / float(moduleNumber
)) * 100),
189 buildDir
= os
.path
.join("${TARGET_DIR}", arch
, module
.Module
.Package
.SubPath(module
.Module
.Dir
),
190 module
.Module
.FileBaseName
)
191 parallelBuild
.SubTask("ant", dir=buildDir
,
192 #antfile="build.xml",
194 target
="${MODULE_BUILD_TARGET}")
195 buildFile
= AntModuleBuildFile(self
.Workspace
, self
.Platform
, module
, self
.Toolchain
, self
.Target
, arch
)
206 _topLevel
= self
.BuildXml
207 _topLevel
.Blankline()
208 _topLevel
.Comment(" TARGET: postbuild ")
210 # postbuild is defined by user in the fpd file through <UserExtionsion> element,
211 # which has attribute "identifier=1" or "identifier=postbuild"
213 if self
.Platform
.UserExtensions
.has_key("1"):
214 postbuildTasks
= self
.Platform
.UserExtensions
["1"]
215 elif self
.Platform
.UserExtensions
.has_key("postbuild"):
216 postbuildTasks
= self
.Platform
.UserExtensions
["postbuild"]
218 _topLevel
.SubTask("target", postbuildTasks
, name
="postbuild")
226 def UserExtensions(self
):
229 def DefaultBuildOptions(self
):
230 """Generate ${ARCH}_build.opt which contains the default build&tool definitions"""
231 tools
= self
.Workspace
.ToolConfig
.ToolCodes
232 for arch
in self
.Workspace
.ActiveArchs
:
233 optFileDir
= os
.path
.join(self
.Workspace
.Path
, self
.Platform
.OutputPath
,
234 self
.Target
+ "_" + self
.Toolchain
)
235 optFileName
= arch
+ "_build.opt"
236 if not os
.path
.exists(optFileDir
): os
.makedirs(optFileDir
)
237 f
= open(os
.path
.join(optFileDir
, optFileName
), "w")
239 key
= (self
.Toolchain
, self
.Target
, arch
, tool
, "FLAGS")
240 flag
= self
.Workspace
.ToolConfig
[key
]
241 f
.write("DEFAULT_%s_FLAGS=%s\n" % (tool
, flag
))
245 key
= (self
.Toolchain
, self
.Target
, arch
, tool
, "FLAGS")
246 if key
in self
.Platform
.BuildOptions
:
247 flag
= self
.Platform
.BuildOptions
[key
]
249 key
= (self
.Toolchain
, self
.Target
, arch
, tool
, "FAMILY")
250 family
= self
.Workspace
.ToolConfig
[key
]
251 key
= (family
, self
.Target
, arch
, tool
, "FLAGS")
252 if key
in self
.Platform
.BuildOptions
:
253 flag
= self
.Platform
.BuildOptions
[key
]
256 f
.write("PLATFORM_%s_FLAGS=%s\n" % (tool
, flag
))
260 for attr
in self
.Workspace
.ToolConfig
.Attributes
:
261 if attr
== "FLAGS": continue
262 key
= (self
.Toolchain
, self
.Target
, arch
, tool
, attr
)
263 value
= self
.Workspace
.ToolConfig
[key
]
265 f
.write("%s=%s\n" % (tool
, value
))
267 f
.write("%s_%s=%s\n" % (tool
, attr
, value
))
268 f
.write("%s_FLAGS=${DEFAULT_%s_FLAGS} ${DEFAULT_MODULE_%s_FLAGS} ${PLATFORM_%s_FLAGS} ${MODULE_%s_FLAGS}\n" %
269 (tool
, tool
, tool
, tool
, tool
))
274 class AntModuleBuildFile(BuildFile
):
275 def __init__(self
, workspace
, platform
, module
, toolchain
, target
, arch
):
276 BuildFile
.__init
__(self
, workspace
, platform
, toolchain
, target
)
279 self
.Path
= os
.path
.join(self
.Workspace
.Path
, self
.Platform
.OutputPath
,
280 target
+ "_" + toolchain
, arch
, self
.Module
.Module
.Package
.Dir
,
281 self
.Module
.Module
.Dir
, self
.Module
.Module
.FileBaseName
, "build.xml")
282 self
.BuildXml
= AntBuildFile(self
.Module
.Module
.Name
)
284 self
.SourceFiles
= self
.GetSourceFiles()
295 # print self.Path,"\r",
296 self
.BuildXml
.Create(self
.Path
)
299 _topLevel
= self
.BuildXml
300 _topLevel
.SubTask("taskdef", resource
="frameworktasks.tasks")
301 _topLevel
.SubTask("taskdef", resource
="cpptasks.tasks")
302 _topLevel
.SubTask("taskdef", resource
="cpptasks.types")
303 _topLevel
.SubTask("taskdef", resource
="net/sf/antcontrib/antlib.xml")
305 _topLevel
.Blankline()
306 _topLevel
.Comment(" TODO ")
307 _topLevel
.SubTask("property", environment
="env")
308 _topLevel
.SubTask("property", name
="WORKSPACE_DIR", value
="${env.WORKSPACE}")
310 _topLevel
.Blankline()
311 _topLevel
.Comment("Common build attributes")
312 _topLevel
.SubTask("property", name
="SINGLE_MODULE_BUILD", value
="yes")
313 _topLevel
.SubTask("property", name
="MODULE_BUILD_TARGET", value
="single_module_build")
314 _topLevel
.SubTask("property", name
="PLATFORM_PREBUILD", value
="yes")
315 _topLevel
.SubTask("property", name
="PLATFORM_POSTBUILD", value
="no")
317 _topLevel
.Blankline()
318 _topLevel
.Comment(" TODO ")
319 ifTask
= _topLevel
.SubTask("if")
320 ifTask
.SubTask("istrue", value
="${SINGLE_MODULE_BUILD}")
321 thenTask
= ifTask
.SubTask("then")
322 platformBuildFile
= os
.path
.join("${WORKSPACE_DIR}", self
.Platform
.OutputPath
,
323 self
.Target
+ "_" + self
.Toolchain
, "build.xml")
324 thenTask
.SubTask("import", file=platformBuildFile
)
326 _topLevel
.Blankline()
327 _topLevel
.SubTask("property", name
="ARCH", value
=self
.Arch
)
329 module
= self
.Module
.Module
330 package
= module
.Package
331 _topLevel
.Blankline()
332 _topLevel
.SubTask("property", name
="PACKAGE", value
=package
.Name
)
333 _topLevel
.SubTask("property", name
="PACKAGE_GUID", value
=package
.GuidValue
)
334 _topLevel
.SubTask("property", name
="PACKAGE_VERSION", value
=package
.Version
)
335 _topLevel
.SubTask("property", name
="PACKAGE_RELATIVE_DIR", value
=package
.Dir
)
336 _topLevel
.SubTask("property", name
="PACKAGE_DIR", value
=os
.path
.join("${WORKSPACE_DIR}","${PACKAGE_RELATIVE_DIR}"))
338 _topLevel
.Blankline()
339 _topLevel
.SubTask("property", name
="MODULE", value
=module
.Name
)
340 _topLevel
.SubTask("property", name
="MODULE_GUID", value
=module
.GuidValue
)
341 _topLevel
.SubTask("property", name
="MODULE_VERSION", value
=module
.Version
)
342 _topLevel
.SubTask("property", name
="MODULE_TYPE", value
=module
.Type
)
343 _topLevel
.SubTask("property", name
="MODULE_FILE_BASE_NAME", value
=module
.FileBaseName
)
344 _topLevel
.SubTask("property", name
="MODULE_RELATIVE_DIR", value
=module
.Dir
)
345 _topLevel
.SubTask("property", name
="MODULE_DIR", value
=os
.path
.join("${PACKAGE_DIR}", "${MODULE_RELATIVE_DIR}"))
346 _topLevel
.SubTask("property", name
="BASE_NAME", value
=module
.BaseName
)
348 _topLevel
.Blankline()
349 _topLevel
.SubTask("property", file="${WORKSPACE_DIR}/Tools/Python/buildgen/module_build_path.txt")
353 _topLevel
.Blankline()
354 _topLevel
.SubTask("property", name
="ENTRYPOINT", value
="_ModuleEntryPoint")
356 _topLevel
.SubTask("property", name
="SOURCE_FILES", value
="\n ".join(self
._GetSourceFileList
()))
357 _topLevel
.SubTask("property", name
="LIBS", value
="\n ".join(self
._GetLibList
()))
359 _topLevel
.Blankline()
360 _topLevel
.SubTask("property", file="${PLATFORM_BUILD_DIR}/%s_build.opt" % self
.Arch
)
361 _topLevel
.Blankline()
362 _topLevel
.SubTask("echo", message
="${MODULE}-${MODULE_VERSION} [${ARCH}] from package ${PACKAGE}-${PACKAGE_VERSION} (${MODULE_RELATIVE_DIR})", level
="info")
364 _topLevel
.Blankline()
365 _topLevel
.Comment("Default target")
366 _topLevel
.SubTask("target", name
="all", depends
="single_module_build")
367 _topLevel
.SubTask("target", name
="platform_module_build", depends
="prebuild, sourcefiles, sections, output, postbuild")
368 _topLevel
.SubTask("target", name
="single_module_build", depends
="prebuild, libraries, sourcefiles, sections, output, postbuild")
370 def _BuildOption(self
):
371 _topLevel
= self
.BuildXml
372 _topLevel
.Blankline()
373 baseModule
= self
.Module
.Module
374 tools
= self
.Workspace
.ToolConfig
.ToolCodes
377 key
= (self
.Toolchain
, self
.Target
, self
.Arch
, tool
, "FLAGS")
379 if key
in baseModule
.BuildOptions
:
380 flag
= baseModule
.BuildOptions
[key
]
381 _topLevel
.SubTask("property", name
="DEFAULT_MODULE_%s_FLAGS" % tool
, value
=flag
)
383 _topLevel
.Blankline()
385 key
= (self
.Toolchain
, self
.Target
, self
.Arch
, tool
, "FLAGS")
387 if key
in self
.Module
.BuildOptions
:
388 flag
= self
.Module
.BuildOptions
[key
]
389 _topLevel
.SubTask("property", name
="MODULE_%s_FLAGS" % tool
, value
=flag
)
392 _topLevel
= self
.BuildXml
393 _topLevel
.Blankline()
394 _topLevel
.Comment(" TARGET: prebuild ")
397 module
= self
.Module
.Module
398 if module
.UserExtensions
.has_key("0"):
399 prebuildTasks
= module
.UserExtensions
["0"]
400 elif module
.UserExtensions
.has_key("postbuild"):
401 prebuildTasks
= module
.UserExtensions
["prebuild"]
403 _topLevel
.SubTask("target", prebuildTasks
, name
="prebuild")
407 _topLevel
= self
.BuildXml
408 _topLevel
.Blankline()
409 _topLevel
.Comment(" TARGET: libraries ")
411 librariesTarget
= _topLevel
.SubTask("target", name
="libraries")
412 parallelBuild
= librariesTarget
.SubTask("parallel", threadCount
="${THREAD_COUNT}")
413 for lib
in self
.Module
.Libraries
:
415 buildDir
= os
.path
.join("${BIN_DIR}", module
.Package
.SubPath(module
.Dir
), module
.FileBaseName
)
416 libTask
= parallelBuild
.SubTask("ant", dir=buildDir
,
418 target
="${MODULE_BUILD_TARGET}")
419 libTask
.SubTask("property", name
="PLATFORM_PREBUILD", value
="false")
420 libTask
.SubTask("property", name
="PLATFORM_POSTBUILD", value
="false")
422 def Sourcefiles(self
):
423 _topLevel
= self
.BuildXml
424 _topLevel
.Blankline()
425 _topLevel
.Comment(" TARGET: sourcefiles ")
426 _sourcefilesTarget
= _topLevel
.SubTask("target", name
="sourcefiles")
428 _incTask
= AntTask(self
.BuildXml
.Document
, "EXTRA.INC")
429 _incTask
.SubTask("includepath", path
="${WORKSPACE_DIR}")
430 _incTask
.SubTask("includepath", path
="${MODULE_DIR}")
431 _incTask
.SubTask("includepath", path
=os
.path
.join("${MODULE_DIR}", self
.Arch
.capitalize()))
432 _incTask
.SubTask("includepath", path
="${DEST_DIR_DEBUG}")
433 if self
.Arch
in self
.Module
.Module
.IncludePaths
:
434 for inc
in self
.Module
.Module
.IncludePaths
[self
.Arch
]:
435 _incTask
.SubTask("includepath", path
=os
.path
.join("${WORKSPACE_DIR}", inc
))
438 if not self
.Module
.Module
.IsBinary
:
439 _buildTask
= _sourcefilesTarget
.SubTask("Build_Init")
440 _buildTask
.AddSubTask(_incTask
)
443 _buildTask
= _sourcefilesTarget
.SubTask("Build_AUTOGEN", FILEEXT
="c", FILENAME
="AutoGen", FILEPATH
=".")
444 _buildTask
.AddSubTask(_incTask
)
448 if type in self
.SourceFiles
:
449 for srcpath
in self
.SourceFiles
[type]:
450 taskName
= "Build_" + type
451 fileDir
= os
.path
.dirname(srcpath
)
452 if fileDir
== "": fileDir
= "."
453 fileBaseName
,fileExt
= os
.path
.basename(srcpath
).rsplit(".", 1)
454 _buildTask
= _sourcefilesTarget
.SubTask(taskName
, FILENAME
=fileBaseName
, FILEEXT
=fileExt
, FILEPATH
=fileDir
)
455 _buildTask
.AddSubTask(_incTask
)
457 # others: c, vfr, ...
458 for type in self
.SourceFiles
:
459 if type == "Unicode": continue
460 for srcpath
in self
.SourceFiles
[type]:
461 taskName
= "Build_" + type
462 fileDir
= os
.path
.dirname(srcpath
)
463 if fileDir
== "": fileDir
= "."
464 fileBaseName
,fileExt
= os
.path
.basename(srcpath
).rsplit(".", 1)
465 _buildTask
= _sourcefilesTarget
.SubTask(taskName
, FILENAME
=fileBaseName
, FILEEXT
=fileExt
, FILEPATH
=fileDir
)
466 _buildTask
.AddSubTask(_incTask
)
469 _topLevel
= self
.BuildXml
470 _topLevel
.Blankline()
471 _topLevel
.Comment(" TARGET: sections ")
472 _sectionsTarget
= _topLevel
.SubTask("target", name
="sections")
475 _topLevel
= self
.BuildXml
476 _topLevel
.Blankline()
477 _topLevel
.Comment(" TARGET: output ")
478 _sectionsTarget
= _topLevel
.SubTask("target", name
="output")
481 _topLevel
= self
.BuildXml
482 _topLevel
.Blankline()
483 _topLevel
.Comment(" TARGET: postbuild ")
486 module
= self
.Module
.Module
487 if module
.UserExtensions
.has_key("1"):
488 postbuildTasks
= module
.UserExtensions
["1"]
489 elif module
.UserExtensions
.has_key("postbuild"):
490 postbuildTasks
= module
.UserExtensions
["postbuild"]
492 _topLevel
.SubTask("target", postbuildTasks
, name
="postbuild")
500 def UserExtensions(self
):
503 def GetSourceFiles(self
):
504 ## check arch, toolchain, family, toolcode, ext
505 ## if the arch of source file supports active arch
506 ## if the toolchain of source file supports active toolchain
507 ## if the toolchain family of source file supports active toolchain family
508 ## if the ext of the source file is supported by the toolcode
509 module
= self
.Module
.Module
510 files
= {} # file type -> src
511 for type in module
.SourceFiles
[self
.Arch
]:
512 if not module
.IsBuildable(type):
513 # print type,"is not buildable"
516 if type not in files
:
518 for src
in module
.SourceFiles
[self
.Arch
][type]:
519 if self
.Toolchain
not in src
.Toolchains
:
520 # print self.Toolchain,"not in ",src.Toolchains
522 if not self
.IsCompatible(src
.Families
, self
.Workspace
.ActiveFamilies
):
523 # print src.Families,"not compatible with",self.Workspace.ActiveFamilies
525 toolcode
= src
.GetToolCode(src
.Type
)
527 ext
= self
.Workspace
.GetToolDef(self
.Toolchain
, self
.Target
, self
.Arch
, toolcode
, "EXT")
528 if ext
!= "" and ext
!= src
.Ext
:
529 # print ext,"in tools_def.txt is not the same as",src.Ext
531 ## fileFullPath = os.path.join("${MODULE_DIR}", )
532 ## print fileFullPath
533 files
[type].append(src
.Path
)
537 def Intersection(self
, list1
, list2
):
538 return list(Set(list1
) & Set(list2
))
540 def IsCompatible(self
, list1
, list2
):
541 return len(self
.Intersection(list1
, list2
)) > 0
543 def _GetLibList(self
):
545 for lib
in self
.Module
.Libraries
:
547 libList
.append(os
.path
.join("${BIN_DIR}", module
.Name
+ ".lib"))
550 def _GetSourceFileList(self
):
552 for type in self
.SourceFiles
:
553 srcList
.extend(self
.SourceFiles
[type])
556 class NmakeFile(BuildFile
):
559 class GmakeFile(BuildFile
):
563 if __name__
== "__main__":
564 workspacePath
= os
.getenv("WORKSPACE", os
.getcwd())
565 startTime
= time
.clock()
566 ws
= Workspace(workspacePath
, [], [])
569 ap
= ws
.ActivePlatform
570 for target
in ws
.ActiveTargets
:
571 ant
= AntPlatformBuildFile(ws
, ap
, ws
.ActiveToolchain
, target
)
574 print "\n[Finished in %fs]" % (time
.clock() - startTime
)