GNU make knows how to compile simple C programs without a makefile:
Code:
~/tmp/ok$ cat ok.c
#include <stdio.h>
void main()
{
printf("hello world.\n");
exit(0);
}
~/tmp/ok$ make ok
cc ok.c -o ok
ok.c: In function ‘main’:
ok.c:5: warning: incompatible implicit declaration of built-in function ‘exit’
~/tmp/ok$ ./ok
hello world.
The argument is the file you want to make,
not the file you want to compile.
PS the warning is because you didn't #include stdlib.h which declares the exit function.