<<>> <> <> <> <<>> MAKEDOEXTENSIONSDOC CEDAR 10.1 MakeDoExtensionsDoc.tioga Willie-Sue Orr Ó Copyright 1993 Xerox Corporation. All rights reserved. Abstract: How to extend MakeDo to compile for new classes of machines. Created by: Mike Spreitzer Maintained by: Mike Spreitzer Keywords: MakeDo, cross compiling XEROX Xerox Corporation Palo Alto Research Center 3333 Coyote Hill Road Palo Alto, California 94304 1. Extending MakeDo To make it possible to c-compile for a new class of machines (not one of the built-in types, i.e., cross compiling), profile entries and commander commands have been added. The new profile entries are: MakeDo.UserClasses: name* For each xxx in the name list, the program looks for a profile entry of the form: MakeDo.UserClass.xxx: { dir switches }* One can then use the command: SetMakeDoClass name to force MakeDo to compile for a particular class of machine. NOTE: -fsingle is not longer forced for compiles, so if you want this behavior, you must include -fsingle in your switches. If the dirs used in the MakeDo.UserClass.name entry are distinct, it is not necessary (nor is it desirable) to set the MakeDo class explicitly; compiles will be done on the basis of the dir for the goals. The other new commands are: MakeDo.UserClass class { dir switches }* MakeDo.PrintUserClasses There is another profile entry needed when compiling for a new class of machine, if that machine has a different object file format: MobStuff.Checkers: { offset numBytes value }* -- brackets are optional, for readability The commands are: MobStuff.Checkers { offset numBytes value }* -- brackets are optional, for readability MobStuff.PrintCheckers In both defining cases, 0 < numBytes < 5. Any error in converting from ropes to numbers causes that entry to be ignored. See CcCommandsDoc.tioga for other profile entries and commands. 2. Example To compile for solaris, one might have profile entries like: MakeDo.UserClasses: sun4_solaris MakeDo.UserClass.sun4_solaris: sun4_solaris "-c -g -fsingle" sun4_solaris-O3 "-c -O3 -fsingle" MobStuff.Checkers: { 0 4 magicNumber } -- whatever it is for ELF files ComplexCc.sun4_solaris.cc: "rsh intrepid -l yourNameHere /opt2/SUNWspro/bin/cc" ComplexCc.sun4_solaris.ld: "rsh intrepid -l yourNameHere /usr/ccs/bin/ld"