Article ID: 60340 - View products that this article applies to.
This article was previously published under Q60340
The text below includes an NMAKE makefile that uses paths in macros, inference rules, and target dependencies (descriptor blocks).
The makefile compares the modification dates of the header (.H) and source code (.C) files with the object (.OBJ) files and the dates of the object files with the executable (.EXE) file. If any of the dependent files changed more recently than the target file changed, NMAKE executes the specified commands. The dates of the header and source code files in the WORK directory are compared to the dates of the object files in the LIB directory.
If any of the source files changed since its associated object file was created, NMAKE calls the compiler to create the object file and copies it from the current directory to the LIB directory. Then NMAKE compares the dates of the object files in the LIB directory with the date of the executable file in the current directory. If any of the object files changed since the executable file was created, NMAKE calls LINK to rebuild the executable file.
The following makefile example uses several predefined macro modifiers. For more information on the macro modifiers, please refer to the macro section of the NMAKE documentation provided with your compiler.
If none of the object files exist, NMAKE executes the following commands when it runs this makefile:
Article ID: 60340 - Last Review: December 1, 2003 - Revision: 2.0
Contact us for more help
Connect with Answer Desk for expert help.