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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using the UtilitiesLDFLAGS = -lcarm -lfparm -lrtarmprog.abs: prog.obj sub.objprog.obj: prog.c inc.hsub.obj: sub.c inc.h# macro used by implicit rules# implicit rule used# implicit rule used# implicit rule used10.2.2.3. Macro DefinitionsA macro is a symbol name that is replaced with its definition be<strong>for</strong>e the makefile is executed. Althoughthe macro name can consist of lowercase or uppercase characters, uppercase is an accepted convention.The general <strong>for</strong>m of a macro definition is:MACRO = textMACRO += and more textSpaces around the equal sign are not significant. With the += operator you can add a string to an existingmacro. An extra space is inserted be<strong>for</strong>e the added string automatically.To use a macro, you must access its contents:$(MACRO)${MACRO}# you can read this as# the contents of macro MACROIf the macro name is a single character, the parentheses are optional. Note that the expansion is donerecursively, so the body of a macro may contain other macros. These macros are expanded when themacro is actually used, not at the point of definition:FOOD = $(EAT) and $(DRINK)EAT = meat and/or vegetablesDRINK = waterexport FOODThe macro FOOD is expanded as meat and/or vegetables and water at the moment it is used inthe export line, and the environment variable FOOD is set accordingly.Predefined macrosMacroMAKEMAKEFLAGSDescriptionHolds the value mkarm. Any line which uses MAKE, temporarily overrides the option-n (Show commands without executing), just <strong>for</strong> the duration of the one line. This wayyou can test nested calls to MAKE with the option -n.Holds the set of options provided to mkarm (except <strong>for</strong> the options -f and -d). If thismacro is exported to set the environment variable MAKEFLAGS, the set of options isprocessed be<strong>for</strong>e any command line options. You can pass this macro explicitly tonested mkarm's, but it is also available to these invocations as an environment variable.243

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

Saved successfully!

Ooh no, something went wrong!