A decent Makefile

This document introduces you to the features of a decent Makefile which, in addition to a few extra helpful features, automatically does most of the work of updating itself! After you've installed the Makefile, the only time you'll need to update it is to add and remove from the list of .cc files. (No need to mention dependencies or .h files!)

  1. Switch to the directory of your integer point lab. Replace the Makefile with the one in ~mc38/labs/makefile-fancy/Makefile.

  2. Refer to the top of the file to find the suggested changes. Do them. In particular, be sure to type, touch .depend.mk. This just makes an empty file which can then legally be included at the end of your Makefile. The Makefile will automagically update this each time it runs.

  3. Notice the following new features of this Makefile:
You can refer back to using makefiles for more information.