About Targets

A target builds a product from specified files in a project. It consists of a list of the necessary files and specifications on how to build them. Some common types of targets build frameworks, libraries, applications, and command-line tools.

Two unusual targets are an aggregate target, which contains other targets but doesn't contain any files of its own, and legacy targets, which let you define exactly how its product is created.


About Aggregate Targets

An aggregate target lets you group together several related targets that don't have link dependencies. It doesn't contain any files or build settings of its own, just other targets. When you perform an action on an aggregate target, such as build or install, the action is performed on all its member targets. An aggregate target could contain a suite of applications or several related command-line tools.

If you have targets with link dependencies, such as an application and the framework it uses, it's better to make one target dependant on the other. See Managing Dependencies.


About Legacy Targets

Project Builder doesn't maintain build rules for a legacy target. For all other targets, Project Builder stores information on how its product should be built and installed. As you add and remove files, Project Builder keeps track of how to compile them for you. For a legacy target, you have to maintain that information yourself, usually by creating your own build file. A legacy target is useful when you're importing a project that has a heavily customized makefile that you can't otherwise convert to a Project Builder project.

The default build system for legacy projects is GNU Make. See /System/Developer/Documentation/Commands/gnumake/.

Related Topics

Build Variables
About Projects