Make Primer

Make is a utility program included in all serious compiler-packages that automates the recompilation process for large programs made up of several files. When making changes to a particular file only those files which are directly influenced by these changes (i.e. which are dependant ) are recompiled, usually not all of them, which can result in tremendous time savings as well as relieving the programer from the burden of remembering and typing endless lines of compiler commands. Make uses the file time-stamp in its considerations. The Make program is driven by a Makefile which consists of a list of file dependancies and command lines. Consider the following simple example:

main.o : main.c
dcc -c main.c -o main.o
Here main.o (target file) depends on main.c (dependant file). If the dependant file is newer than the target file or the target does not exist, the dependancy is resolved, that is the command below is executed. Several other forms of declaring dependancies are available. Furthermore commands may be AmigaDOS commands such as Delete etc. For details of the syntax see the DMake manual. (A feature not documented is the prefixing of commands with a minus sign which will inhibit premature termination of DMake if a command returns an error or warning).

Anyway, with VisualMaker you should not have to worry about this!! Even if you are just compiling a single file, a DMakefile can still be of use. Your particular compiler options are saved and you don't have to worry about deleting the 'errorfile' (if redirected) prior to a new run (remember, the errors and warnings are always appended).

An option I particularly recommend is the precompilation of header files. If you have enough memory, all headers, including the system headers (e.g. <intuition/intuition.h>) may be precompiled. Since the compiler will then only have to read them once from your diskdrive, this saves a lot of time. To do this put all your definitions and (system) include files in one header, say defs.h, and reference them with #include "defs.h" from every source file which needs them.