| |||
| Home > Working with Projects > Working with multiple build targets and sub-projects > Assigning files to build targets | |||
You can assign files to build targets using either:
the Target column in the project window Files view (see Including a file in a build target using the Target column)
the Project Inspector (see Including a file in a build target using the Project Inspector).
You can assign the same file to any number of defined build targets in a project.
The Target column in the project window Files view indicates whether a file is in the current build target. The CodeWarrior IDE displays this column only if the project has more than one build target. If a file is in the current build target, a dot is displayed in the Target column next to the file (see Figure 3.28).
To toggle the inclusion of a file in a build target:
Ensure that the build target you want to assign the file to is the currently active build target. See Setting the current build target for information on how to change the active build target.
Click in the Target column next to the file (Figure 3.28):
Here:
If the file is not already marked as being included in the current build, the CodeWarrior IDE places the build marker in the column to indicate that the file is included in the current build.
If the file is already included in the current build, the CodeWarrior IDE removes the file from the build.
To assign (or remove) all the files to the current build target, Alt+click in the Target column.
You can use the Project Inspector window to assign a file to any defined build target. To use the Project Inspector:
Select the file you want to assign in the project window.
Select Project Inspector from the View menu. The CodeWarrior IDE displays the Project Inspector window.
Click the Targets tab. The CodeWarrior IDE displays a Target window for the file you selected (see Figure 3.29).
Select the check box next to a build target to include the file in that build target. Deselect the check box to exclude the file from that build target.
Click either:
Revert, to undo the changes you have made
Save, to apply the changes.