3 ms·
If you want to write less makefile, you don't need to define foo. `foo` is an implicit target if foo.c is present. You can use make in this form without a make
by raggi 3y ago
If you want to write less makefile, you don't need to define foo. `foo` is an implicit target if foo.c is present.
You can use make in this form without a makefile even:
~ % echo '#include <stdio.h>\nvoid main() { printf("OHAI\\n"); }' > ohai.c
~ % make CFLAGS=-DDEFINE_ME_A_MAKEFILE ohai
cc -DDEFINE_ME_A_MAKEFILE ohai.c -o ohai
~ % ./ohai
OHAI