The make utility is designed to help you keep programs organized and save time. The basic idea behind make is to find the specified target file, make sure that all the files that it depends on are there and are up to date, and then re-create the target so that it is as up-to-date as its generators are.
In order to use the command make, you need to create a file called ``Makefile''. This file will contain all the necessary information about the source files that the final program is dependent on. When you execute the command make, it checks to see if the source files have been changed since the last time the target was created. If any of them have been changed it will recompile the changed ones, as well as those which depend on them, and the target file will be created with these new object files. It will not recompile anything that has not been affected, and (provided the Makefile is correct) it will not leave out any which need to be compiled. The basic format for make is:
make targetprogram
There can of course only be one Makefile in any given directory. However, if you wish to keep unrelated programs in the same directory, you can set up the Makefile so that more than one group can be handled by it. If you do not mention the target when you invoke make, the first file listed in the Makefile will be rebuilt. There are many, many ways to tailor make to do the things you want. To find out about fancier options see man make. For a detailed discussion on make see the ``make User's Guide'' in the ``Programmer's Overview'' manual. Here you will find, among other things, examples of Makefiles and how to use macros. If you plan to use make often, it is strongly recommended that you read it.
truein