Make all sources in a folder individually
I have one folder (aka. directory) with many .c & .cpp source files in it. They will each become an executable with the same name. As opposed to compiling each individual source file manually, I thought i'd create a makefile to do the trick:
Makefile:
Code:
# compiles all .c files in a dir
%.c :
gcc -o $*.exe $*.c
...of course it doesn't work, but maybe you can see where im trying to go with it...
Is there a simple way to make all sources in a folder individually & automatically?