#makefile file definition
#********************************************************************************************************************************************************************************************************************************************************************************** + x.res is
linked to test.exe
via Link.exe #**************************************************************************
#Comment: A line starting with # is a comment, and comments cannot be written after the newline character "/"
#Macrodefinition
#************************************************************************************************************************************************************************************************************************************************************************
#
When there is a space in it, use double quotation marks
(such as no space : ML_FLAG=/c)
# ********************************************************************************
EXE = Test.exe #Specify the output file
OBJS = x.obj \
y.obj #Required target file
RES = x.res #Required resource file
LINK_FLAG = /subsystem:windows #Link option
ML_FLAG = /c /coff #Compile option
#Display rule definition dependencies and execute commands
#****************************************************************************** #
1. By default, nmake regards the target file in the first rule of the entire description file as the final file
#2. In the command line parameters of nmake, you can specify the target to be generated, such as: nmake x.res # Parameters can
have several target file names, and namke will process them one by one. If the specified target file
# has no corresponding rules, nmake will return an error message: #
fatal error U1073: don't know how to make 'xxx file' #********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** c
#Implicit rules define the default rules for assembly compilation and resource compilation
#**************************************************************************
#1. Implicit rules cannot have dependent files
#2. Implicit rules cannot specify a definite input file name, because the input file name generally refers to
a whole class of files with the same extension as #. At this time, several special default macros are required to specify the file name: # $@————The target file of the
full path
# $*—————The target file of the full path with the extension removed
# $? ————all source filenames# $
<————source filenames (can only be used in implicit rules)
#**************************************************************************
.asm.obj:
ml $(ML_FLAG) $<
.rc.res: rc
$<
#Clear temporary files #
****************************************************************************************************************************************************************************************************************************************************************************** * .obj del *.res