Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
becki:linux:build_tools [2011-10-18 14:06] becki |
becki:linux:build_tools [2018-03-29 10:12] (aktuell) becki |
||
---|---|---|---|
Zeile 21: | Zeile 21: | ||
find -name '*.c' -print0 | xargs -0 indent | find -name '*.c' -print0 | xargs -0 indent | ||
+ | <note important>indent needs files with Unix line ends (''\n'') as input. Files with other line endings can be converted with ''fromdos'' or ''sbfromdos''</note> | ||
- | ===== gcc / g++ == | + | ===== GNU gcc / g++ == |
- | [[http://gcc.gnu.org/onlinedocs/gcc/|Manual]] (Current Development) | + | See [[GNU GCC]] |
- | * -c : Do not link | + | ===== GNU Gprof == |
- | * -o file : Place output in file file. Applies to object files and executables | + | |
- | * -Wall : enable most warnings | + | See [[GNU Gprof]] |
===== Make == | ===== Make == | ||
- | [[http://www.gnu.org/software/make/manual/html_node/|Manual]] | + | See [[GNU Make]] |
- | + | ||
- | === Misc == | + | |
- | + | ||
- | * A line beginning with ''#'' is a comment | + | |
- | * The variable ''$*'' contains FIXME | + | |
- | * The variable ''$@'' or ''$(@)'' contains the name of the target (tested) | + | |
- | * '@' at the beginning of a command runs the command but does not copy the line to stdout | + | |
- | * Implicit rules example: ''file.o'' is made automatically from ''file.c'' with a command of the form `$(CC) -c $(CPPFLAGS) $(CFLAGS)' | + | |
- | * To ignore errors in a command line, write a `-' at the beginning of the line's text (after the initial tab). | + | |
- | * ''%%make -n%%'' or ''%%make --dry-run%%'' - Don't actually run any commands; just print them. | + | |
- | + | ||
- | === Variable assignment == | + | |
- | <code bash> | + | ===== pkg-config == |
- | a = Peter | + | |
- | c = $(a) | + | |
- | d := $(a) | + | |
- | a = Franz | + | |
- | test: | + | http://people.freedesktop.org/~dbn/pkg-config-guide.html |
- | @echo c expands to $(c) # Franz | + | |
- | @echo d expands to $(d) # Peter | + | |
- | </code> | + | |
===== Automake == | ===== Automake == |