13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using the UtilitiesStatic pattern rulesStatic pattern rules are rules which specify multiple targets and construct the prerequisite names <strong>for</strong> eachtarget based on the target name.[target ...] : target-pattern : [prerequisite-patterns ...]The target specifies the targets the rules applies to. The target-pattern and prerequisite-patterns specifyhow to compute the prerequisites of each target. Each target is matched against the target-pattern toextract a part of the target name, called the stem. This stem is substituted into each of theprerequisite-patterns to make the prerequisite names (one from each prerequisite-pattern).Each pattern normally contains the character '%' just once. When the target-pattern matches a target,the '%' can match any part of the target name; this part is called the stem. The rest of the pattern mustmatch exactly. For example, the target foo.obj matches the pattern '%.obj', with 'foo' as the stem.The targets foo.c and foo.abs do not match that pattern.The prerequisite names <strong>for</strong> each target are made by substituting the stem <strong>for</strong> the '%' in each prerequisitepattern.Example:objects = test.obj filter.objall: $(objects)$(objects): %.obj: %.cccarm -c $< -o $@echo the stem is $*Here '$

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!