Adding a Build Rule to a Target
In the project editor, select the target to which you want to add a build rule.
Click Build Rules at the top of the project editor.
Select Target at the top of the Build Rules pane.
Click Add Build Rule in the lower-right corner.
Choose a file type from the Process pop-up menu.
Choose a compiler from the Using pop-up menu.
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.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-01-09)