依照VS6样式,Listing file type:assembly,Machine Code,and Source
sources文件中:
TARGETNAME=first
TARGETTYPE=DRIVER
SOURCES=first.c
TARGETPATH=obj
USER_C_FLAGS = /FAs
MSC_OPTIMIZATION = /Od /Oi
TARGETLIBS = $(SDK_LIB_PATH)ws2_32.lib # the only new line...
/////////////////////////////sources/////////////////////////////////////////////////////
TARGETNAME=hello # your program name (it'll compile to "hello.exe")
TARGETTYPE=PROGRAM # PROGRAM means that it will be a normal executable program
# other common choices for TARGETTYPE are: DYNLINK, LIBRARY, DRIVER
UMTYPE=console # usermode target type CONSOLE. this is a 32bit user-mode console app
# the other common choice for UMTYPE is: WINDOWS (gui app)
UMENTRY=main # default entry point shoudl be "main"
# other choices for UMENTRY are: WINMAIN, WMAIN, ...
USE_MSVCRT=1 # use the multithreaded runtime library
USER_C_FLAGS = /FAs # compiler flags (/FAs = produce a .asm file as well)
# reading the .asm file is a good way to learn assembly
MSC_OPTIMIZATION = /Od /Oi # optimization flags (/Od = disable all optimization)
# i normally disable all optimization for debugging purposes
SOURCES=hello.c # the name of the source file