Adding a Build Rule to a Target

    Steps
  1. In the project editor, select the target to which you want to add a build rule.

  2. Click Build Rules at the top of the project editor.

  3. Select Target at the top of the Build Rules pane.

  4. Click Add Build Rule in the lower-right corner.

  5. Choose a file type from the Process pop-up menu.

  6. Choose a compiler from the Using pop-up menu.

Prerequisite

image: ../Art/AddingaBuildRule.png

Change the way files are processed with build rules.

You can define build rules on a per-target basis. Target-specific build rules can specify files that the system build rules do not directly address and can override the existing system build rules, which are predefined and unmodifiable.

The Process and Using menus include many types of files and many compilers, but you can specify custom file types or compilers by choosing “Source files with names matching:” from the Process menu or “Custom script:” from the Using menu.

The screenshot shows a build rule that compiles C source files with GCC 4.2 rather than the default compiler.