Skip to content

Comment on Understanding C by learning assemblyparent

Comments

You can use the default makefile with no targets to set options globally for a directory as well i.e.:

   echo 'void main() { printf("omg\n"); }' > simple.c
   echo 'CFLAGS=-g' > Makefile
   make simple
   ./simple
(yes I know that is not valid C but it serves this example and compiles fine :-)

If you set CC=c99, then you can change void to int.

AboutSource Built by g1lg1l

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