Makeprojects
Loading...
Searching...
No Matches
makeprojects.codewarrior Namespace Reference

Sub file for makeprojects. More...

Classes

class  BuildCodeWarriorFile
 Class to build CodeWarrior files. More...
class  C_CPP_Preprocessor
 C_CPP_Preprocessor generator. More...
class  FILE
 File name object. More...
class  FILEREF
 File reference object. More...
class  GlobalOptimizer_X86
 GlobalOptimizer_X86 generator. More...
class  GROUP
 Each file group. More...
class  MWCodeGen_X86
 MWCodeGen_X86 generator. More...
class  MWFrontEnd_C
 MWFrontEnd_C generator. More...
class  MWLinker_X86
 MWLinker_X86 generator. More...
class  MWProject_X86
 Write out the settings for MWProject_X86. More...
class  MWWarning_C
 MWWarning_C generator. More...
class  ORDEREDTARGET
 Each TARGETORDER entry. More...
class  PDisasmX86
 PDisasmX86 generator. More...
class  Project
 Root object for an CodeWarrior IDE project file. More...
class  SearchPath
 Create a path entry for UserSearchPaths or SystemSearchPaths. More...
class  SearchPathAndFlags
 Create a path entry for with flags for recursion. More...
class  SETTING
 Class for a simple setting entry. More...
class  SUBTARGET
 Class for a sub target entry for the master target list. More...
class  TARGET
 Each TARGET entry. More...
class  UserSourceTree
 Create an entry for UserSourceTrees. More...

Functions

 parse_mcp_file (full_pathname)
 Extract configurations from a Metrowerks CodeWarrior project file.
 match (filename)
 Check if the filename is a type that this module supports.
 create_build_object (file_name, priority=50, configurations=None, verbose=False)
 Create BuildMakeFile build records for every desired configuration.
 create_clean_object (file_name, priority=50, configurations=None, verbose=False)
 Create BuildMakeFile build records for every desired configuration.
 test (ide, platform_type)
 Filter for supported platforms.
 generate (solution)
 Create a project file for Metrowerks CodeWarrior.

Variables

 _MCPFILE_MATCH
 Regex for matching files with *.mcp.
 unicode = str
 Py3 compatiblity for unicode in Python 2.
tuple SUPPORTED_IDES
 List of IDETypes the codewarrior module supports.
tuple CODEWARRIOR_ERRORS
 Tuple of Codewarrior IDE error messages.
tuple _CW_SUPPORTED_LINKERS
 Tuple of supported codewarrior linkers.
str TAB = "\t"
 Tab character for XML output.

Detailed Description

Sub file for makeprojects.

This module contains classes needed to generate project files intended for use by Metrowerks / Freescale Codewarrior

  • Version 5.0 is MacOS Codewarrior 9 and Windows Codewarrior 9
  • Version 5.8 is MacOS Codewarrior 10
  • Version 5.9 is Freescale Codewarrior for Nintendo

Function Documentation

◆ create_build_object()

makeprojects.codewarrior.create_build_object ( file_name,
priority = 50,
configurations = None,
verbose = False )

Create BuildMakeFile build records for every desired configuration.

Parameters
file_namePathname to the *.mcp to build
priorityPriority to build this object
configurationsConfiguration list to build
verboseTrue if verbose output
Returns
list of BuildMakeFile classes

◆ create_clean_object()

makeprojects.codewarrior.create_clean_object ( file_name,
priority = 50,
configurations = None,
verbose = False )

Create BuildMakeFile build records for every desired configuration.

Parameters
file_namePathname to the *.mcp to build
priorityPriority to build this object
configurationsConfiguration list to build
verboseTrue if verbose output
Returns
list of BuildMakeFile classes

◆ generate()

makeprojects.codewarrior.generate ( solution)

Create a project file for Metrowerks CodeWarrior.

Given a Solution object, create an appropriate Watcom WMAKE file to allow this project to build.

Parameters
solutionSolution instance.
Returns
Zero if no error, non-zero on error.

◆ match()

makeprojects.codewarrior.match ( filename)

Check if the filename is a type that this module supports.

Parameters
filenameFilename to match
Returns
False if not a match, True if supported

◆ parse_mcp_file()

makeprojects.codewarrior.parse_mcp_file ( full_pathname)

Extract configurations from a Metrowerks CodeWarrior project file.

Given an .mcp file for Metrowerks Codewarrior, determine which version of Codewarrrior was used to build it.

It will parse Freescale Codewarrior for Nintendo (59), Metrowerks Codewarrior 9.0 for Windows (50) and Metrowerks Codewarrior 10.0 for macOS (58)

Parameters
full_pathnamePathname to the .mcp file
Returns
tuple(list of configuration strings, integer CodeWarrior Version)
See also
build_codewarrior

◆ test()

makeprojects.codewarrior.test ( ide,
platform_type )

Filter for supported platforms.

Parameters
ideIDETypes
platform_typePlatformTypes
Returns
True if supported, False if not

Variable Documentation

◆ CODEWARRIOR_ERRORS

tuple makeprojects.codewarrior.CODEWARRIOR_ERRORS
Initial value:
1= (
2 None,
3 "error opening file",
4 "project not open",
5 "IDE is already building",
6 "invalid target name (for /t flag)",
7 "error changing current target",
8 "error removing objects",
9 "build was cancelled",
10 "build failed",
11 "process aborted",
12 "error importing project",
13 "error executing debug script",
14 "attempted use of /d together with /b and/or /r"
15)

Tuple of Codewarrior IDE error messages.

◆ SUPPORTED_IDES

tuple makeprojects.codewarrior.SUPPORTED_IDES
Initial value:
1= (
2 IDETypes.codewarrior50,
3 IDETypes.codewarrior58,
4 IDETypes.codewarrior59)

List of IDETypes the codewarrior module supports.