make clean

Re: make clean

by Ramses van Zon -
Number of replies: 0
It's a bit a matter of style and what you want "make clean" to mean. In the slides and example, it means 'get ready for a complete, clean rebuild'. Removing the object files is necessary and sufficient for that (provided every cpp file is first compiled to an object file, which is good practice). If you want it to mean 'clean up the directory', then you can also delete the target executables, and that is fine too. Some Makefiles have a "distclean" or "realclean" target to mean cleaning up all produced artifacts.