Running NMAKE on the command line
To
run NMAKE, issue the command in the format that is shown below.
nmake options macrodefinitions targets /F filename
- options
- Specifies options that modify NMAKE's actions. To see a
list of supported options, type the following command on the command line:
nmake /?
- macrodefinitions
- Lists macro definitions for NMAKE to use. Macro definitions
that contain spaces must be enclosed by quotation marks.
- targets
- Specifies the names of one or more target files to build. If you do
not list any targets, NMAKE builds the first target in the
description file.
- filename
- Names the description file where you specify file dependencies and
the commands to execute when a file is out-of-date. A common convention is
to name the file program.MAK, but you can give it any
name. If you do not specify a file name, NMAKE will look for and
use a file named makefile.
nmake /s “program = flash” sort.exe search.exe
The example above takes the following actions:
- Invokes NMAKE with the /s option to suppress the
command display
- Defines a macro, assigning the string flash to the macro program
- Specifies two targets: sort.exe and search.exe
- Looks for a file named makefile and uses it if it is
available
|