### Define an Inference Rule

You can define an inference rule by including text of the following form in your makefile or in your TOOLS.INI file.

    .fromext.toext:
    commands
    .
    .

The elements of the inference rule are:

fromext | The file-name extension for dependent files to build a target
toext | The file-name extension for target files to be built
commands | The commands to build the toext target from the fromext dependent

For example, an inference rule to convert C source files (with the .C extension) to C object files (with the .OBJ extension) is

    .C.OBJ:
     ICC $<

Note: The predefined macro $< represents the name of a dependent file that is out-of-date relative to the target.

You can also indicate to the Make utility where to look for target and dependent files with following syntax:

    {frompath}.fromext{topath}.toext
    commands
    :

The Make utility looks in the directory specified by frompath for files with the fromext extension. It executes the commands to build files with the toext extension in the directory specified by topath.

Inference Rules

Predefined Macros
Make Utility Macro Precedence Rules