|
没有标准的Sources文件 怎么看这个MAKEFILE文件 是怎么样生成.sys文件的 ?
[复制链接]
如题 比较困惑!!!
望达人指点 万分感激!!!
由于刚刚看关于驱动开发方面的东东
MAKEFILE文件如下:
#
# Windows Driver Development Kit Makefile
#
# Windows Driver Development Kit base path
DDK = C:\WINDDK\3790.1830
!IFDEF WINDDK_3790_1830
DDK = $(WINDDK_3790_1830)
!ENDIF
BASENAME = svd
OS = wxp
ARCH = i386
MACHINE = IX86
DEFS = -D_X86_ -Di386
CC = $(DDK)\bin\x86\cl.exe
LD = $(DDK)\bin\x86\link.exe
CFLAGS = -nologo $(CFLAGS) \
-EHs-c- -Zp8 -GS -Gy -cbstring -Gz -Gm- \
-GR- -GF -W3 -Wp64 -FI$(DDK)\inc\$(OS)\warning.h \
-I$(DDK)\inc\$(OS) -I$(DDK)\inc\ddk\$(OS) \
-I$(DDK)\inc\ddk\wdm\$(OS) -I$(DDK)\inc\crt \
-I..\..\SVD -I..\..
DEFS = $(DEFS) -DNT4_DRIVER -DSTD_CALL -DCONDITION_HANDLING=1 \
-DNT_UP=1 -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 \
-DWINNT=1 -D_WIN32_WINNT=0x0400 -DWIN32_LEAN_AND_MEAN=1 -DDEVL=1 \
-D_UNICODE -DLITTLE_ENDIAN -DFPO=0 -D_DLL=1 -D_IDWBUILD
LINK_OPTS = -nologo -machine:$(MACHINE) \
-MERGE:_PAGE=PAGE -MERGE:_TEXT=.text -SECTION:INIT,d \
-INCREMENTAL:NO -FORCE:MULTIPLE -RELEASE -FULLBUILD \
-IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096 -NODEFAULTLIB \
-MERGE:.rdata=.text -MAP:$(BASENAME).map -svd -align:0x20 \
-subsystem:native -base:0x10000 -entry:DriverEntry
# Cryptography Objects
OBJECTS = RijndaelCryptograpy.obj RijndaelKeySchedule.obj RijndaelTable.obj \
Serpent.obj SHA1.obj Whirlpool.obj NTDriver.obj \
CRC.obj Cryptography.obj Endian.obj GfMul.obj PKCS5.obj Volumes.obj \
SVD.res
# NTVolume.obj
LIBS = $(DDK)\lib\$(OS)\$(ARCH)\ntoskrnl.lib \
$(DDK)\lib\$(OS)\$(ARCH)\hal.lib \
$(DDK)\lib\$(OS)\$(ARCH)\bufferoverflowK.lib
# Debug
CFLAGS = $(CFLAGS) -Gs -Z7 -Od -Oi -Oy-
DEFS = $(DEFS) -DDBG=1 -D_DEBUG -DDEBUG -DRDRDBG -DSRVDBG -DDBG_MESSAGES=1
LINK_OPTS = -debug $(LINK_OPTS)
COPYRELEASE =
!ENDIF
CFLAGS = $(CFLAGS) $(DEFS)
all: $(BASENAME).sys
{..}.c{}.obj :
@$(CC) -c $(CFLAGS) $<
{..\..\SVD}.c{}.obj :
@$(CC) -c $(CFLAGS) $<
{..}.rc{}.res :
@echo SVD.rc
@rc -r -fo SVD.res $<
$(BASENAME).sys : $(OBJECTS) $(LIBS)
@echo Linking...
@echo $(BASENAME).sys
@$(LD) $(LINK_OPTS) $(OBJECTS) $(LIBS) -out:$(BASENAME).sys
@$(COPYRELEASE)
|
|