Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
becki:linux:gnu_make [2018-03-29 06:26] becki created |
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 51: | Zeile 52: | ||
| == CFLAGS usage | == CFLAGS usage | ||
| - | useres expect FIXME | + | > 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#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 | ||