Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
becki:linux:gnu_make [2018-03-29 12:51] becki |
becki:linux:gnu_make [2018-04-04 13:38] (aktuell) becki [CFLAGS usage] |
||
---|---|---|---|
Zeile 22: | Zeile 22: | ||
== Automatic variables | == Automatic variables | ||
- | * ''$@'' or ''$(@)'' contains the name of the target. It does oviously not work in prerequsites, only in recipie! | + | * ''$@'' contains the name of the target. It does oviously not work in prerequsites, only in recipie! |
* ''$<'' The name of the first prerequisite. Useful in the recipe | * ''$<'' The name of the first prerequisite. Useful in the recipe | ||
+ | * ''$^'' The names of all prerequisites, with spaces between them | ||
* ''$*'' is useful for constructing names of related files. FIXME | * ''$*'' is useful for constructing names of related files. FIXME | ||
Zeile 53: | Zeile 54: | ||
> If there are C compiler options that must be used for proper compilation of certain files, do not include them in CFLAGS. **Users expect to be able to specify CFLAGS freely themselves**. Instead, arrange to pass the necessary options to the C compiler independently of CFLAGS, by writing them explicitly in the compilation commands or by defining an implicit rule. | > If there are C compiler options that must be used for proper compilation of certain files, do not include them in CFLAGS. **Users expect to be able to specify CFLAGS freely themselves**. Instead, arrange to pass the necessary options to the C compiler independently of CFLAGS, by writing them explicitly in the compilation commands or by defining an implicit rule. | ||
- | [[https://www.gnu.org/software/make/manual/html_node/Command-Variables.html|See Command-Variables]] | + | See also: [[https://www.gnu.org/software/make/manual/html_node/Command-Variables.html|See Command-Variables]], [[gnu_gcc]] |
== Implicit rules | == Implicit rules |