Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


MakeFlat

Tool

SYNTAX

MakeFlat segmentedLib… [-h[elp]] [ -o outputLib] [-omitseghdrs] [-p]
[-packdata off | on | faster] [-share context | global] [-w]

DESCRIPTION

The MakeFlat tool is an essential component in the process of building shared libraries under the CFM-68K runtime model. In general, it converts the 'CODE' and 'rseg' resources of a segmented shared library created by the ILink tool into a single PEF container residing in the data fork of the output file. Each user-created 'CODE' resource in the input file gets mapped into a PEF code section in the output file. Each PEF code section is assigned the same name as its resource, but is assigned a new section number.

MakeFlat modifies the input file's 'cfrg' resource to indicate the new location of the library and copies the resource to the output file.

INPUT

A single segmented shared library (segmentedLib) created by the ILink tool. MakeFlat does not read standard input.

OUTPUT

A flattened shared library residing in the data fork of the output library, importLib.out. You can rename this file using the -o option. MakeFlat sets the output library type to 'shlb' and sets the creator to match the input file's creator.

STATUS

MakeFlat can return the following status codes:

0

Normal termination

1

Parameter or option error

2

Runtime execution error

PARAMETERS

segmentedLib

Specifies a single segmented shared library to convert.

OPTIONS

-h[elp]

Displays the list of supported options. If MakeFlat encounters this option anywhere on the command line, it terminates library processing and simply displays the options.

-o outputLib

Places the flattened library in the output library file, outputLib. The default output filename is importLib.out.

-omitseghdrs

Does not copy segment headers from the input file's resources into the output library's code sections. By default, MakeFlat copies segment headers because they are necessary for debugging.

-p

Passes progress information to diagnostic output.

-packdata off | on | faster

Sets data compression.

off

Suppresses data compression.

on

Compresses the data section.

faster

Sets fast data compression. However, this algorithm may not produce optimal data compression.

-share context | global

Sets the data sharing mode to either context (shared within a context) or global (shared across all contexts).

-w

Suppresses all warning messages.

EXAMPLES

The following two commands perform the same function. The second command illustrates the default settings of the MakeFlat options. Each command converts myLibrary.seg, a segmented library created by ILink, into a flattened library in the data fork of the file myLibrary.68K.

MakeFlat myLibrary.seg -o myLibrary.68K

MakeFlat -packdata on -share context myLibrary.seg -o myLibrary.68K

SEE ALSO

ILink

MergeFragment

 
 


Last Updated July 2000