Building on MacOS X

The build system now supports "Classic" and  "MacOS X" builds. The 'BUILD_ON_PLATFORM' environment variable defined in RMA Build Prefs determines which type of build is running. A MacOS X build uses the following tools:

CodeWarrior 7 or later
Python 2.2.2
MacCVS Pro 2.7d    ( MacCVS Pro 2.5 may also be used)


Copy OSAm.carbon.slb and StuffIt.carbon.slb from (....) to Python 2.2.2:Lib:site-packages:


Add the following environment variables to your RMA Build Prefs (under OS X, it resides in:  user(you)/library/Preferences/)

'BUILD_ON_PLATFORM'   : 'MacOSX',
'COMPILER'            : 'mac-cw',
'COMPILER_VERSION'    : '7',
'TARGET_ARCHITECTURE' : 'mac-carbon',
'TARGET_LINKER'       : 'mac-cfm'

Running umake still creates an AppleScript file named Makefile. Makefile used to launch CodeWarrior and then send Apple Events to it. The Makefile now writes out the project in CodeWarrior XML format in a file called {module}.xml in the project_xml directory of the module. The file is then imported into CodeWarrior. This is faster than the previous method of sending Apple Events to CodeWarrior.

The Makefile also generates another xml file called {module}_uber.xml. It is used to create an uber-project, the holy grail for Mac developers. It's actually one very large CodeWarrior project for the top level app being built that contains all its dependent projects. To build an uber-project (instead of building individual DLLs and libs) do a custom build with "-t uber". In an uber build, only the xml for each project is created. At the end all the xml is imported into a large CW project. This takes several minutes.



Changes to mac.pcf files:

Specifying CodeWarrior prefs in mac.pcf files is done differently when building on MacOS X. Specify
the prefs differently for each platform eg.

if os.environ.get('BUILDING_ON_PLATFORM','') == 'MacOSX':
    project.preferences['PPC Linker']['MWLinker_PPC_initname']    = "InitEntryPoint"
    project.preferences['PPC Linker']['MWLinker_PPC_mainname']    = ""
    project.preferences['PPC Linker']['MWLinker_PPC_termname']    = "TermEntryPoint"
else:
    project.preferences['PPC Linker']['Initialization Name'] = '"InitEntryPoint"'
    project.preferences['PPC Linker']['Main Name']           = '""'
    project.preferences['PPC Linker']['Termination Name']    = '"TermEntryPoint"'

Look at the <SETTINGS> section of the project.xml file to find the correct name of the pref key.