Skip to content

Comment on Understanding C by learning assemblyparent

Comments

Note that this uses the Bourne shell feature of modifying the environment of the make process by prefixing the command with an environmental variable assignment. The more portable/shell-agnostic version is to pass such assignments as arguments to make instead, i.e:

    make CFLAGS="-g -O0" simple
(This also works with many other build tools like CMake or configure scripts generated by autoconf.)

If you're curious which rules exist by default, try running:

    make -p
(This produces a lot of output; a bit much to study in detail, but still useful to scan just to get an idea of what default rules exist.)

"make -p"

Of course this only applies to GNU make.

Works on FreeBSD's make as well (with a sligthly different output format).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.