|
发表于 2020-1-2 23:15:01
|
显示全部楼层
Refers to MSDN:
================
Create a Project in the Development Environment That Can Be Built with NMAKE
There are two ways to export a makefile from the development environment. You can choose to export a makefile whenever you save a project, or export a makefile only for specific projects. Note that creating an export makefile increases project save time, and you should only do it when necessary.
The export makefile stores all the information required to build the project and can be used from the command line. The makefile specifies the same project build settings you set in the development environment. If you use NMAKE on the command line to build the project, the NMAKE syntax needed is given in the makefile as a comment that begins !MESSAGE NMAKE. For example, for a file test.mak the NMAKE syntax line is:
!MESSAGE NMAKE /f "test.mak" CFG="test - Win32 Debug"
To export an NMAKE makefile whenever you save a project
From the Tools menu, click Options.
The Options dialog box appears.
On the Options dialog box, click the Build tab.
Select the Always export makefile when saving project option.
Click OK.
To export an NMAKE makefile for a particular project
Open the project.
From the Project menu, click Export Makefile.
A .MAK file with the project name is immediately created and saved to the project directory.
|
|