Trouble with makefiles...
I'm a heavy C programmer, so I made a makefile from scratch to handle the simple stuff; here's the initial file:
object : *.c
gcc -c *.c
$@ : *.o
gcc -o $@ *.o
clean :
rm -f *.o
EOF
This is just about all I really need, but I figured out another function that would be useful. I'd like to be able to simply delete the executables WITHOUT deleting everything else in the folder. I tried to create a "make new" rule that would rm anything NOT ending in an extension (except for the makefile, of course), but had no luck. I tried something like this:
new :
ls | grep '.*[^\..*]' | rm -f
(Yes, I know that rule would delete the makefile as well... I'm still working on that part as well.)
Any help?
|