3 ms·
You don't need a Makefile, but you can just run "make foo" and it'll automatically run "cc -o foo foo.c" for you.
by chungy 3y ago
You don't need a Makefile, but you can just run "make foo" and it'll automatically run "cc -o foo foo.c" for you.
- anyfoo 3y agoAlmost thirty years and I never knew that.
- wruza 3y agoMake has builtin rules for most obvious build jobs: https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html https://www.gnu.org/software/make/manual/html_node/Catalogue... You also can pass env vars to it: $ CC=clang make foo https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html https://www.gnu.org/software/make/manual/html_node/Implicit-... And (with care) define your own in: https://www.gnu.org/software/make/manual/make.html#MAKEFILES-Variable https://www.gnu.org/software/make/manual/make.html#MAKEFILES...