3 ms·
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
by eckyptang 14y ago
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 :-)
- sigjuice 14y agoIf you set CC=c99, then you can change void to int.