Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

203 lines
4.6 KiB

  1. _STDCALL=1
  2. # Set this to 1 if you use an older compiler and link386.exe (OMB format)
  3. # dont set this if you use MSVC20 compiler and link.exe (COFF format, default)
  4. #OMB=1
  5. !IFNDEF DEBLEVEL
  6. DEBLEVEL=1
  7. !ENDIF
  8. DDEB = -DDEBUG -DDBG=1 -DDEBLEVEL=$(DEBLEVEL) -DNDIS2=1 -DCHICAGO -Zi
  9. RDEB = -DDEBLEVEL=0 -DCHICAGO
  10. TARGETPATH = $(BASEDIR)\lib\i386\$(DDKBUILDENV)
  11. !if "$(DDKBUILDENV)" == "checked"
  12. DEBUG = 1
  13. BINTYPE = debug
  14. DEB = $(DDEB)
  15. BIN = obj\i386\$(DDKBUILDENV)
  16. !else
  17. BINTYPE = retail
  18. DEB = $(RDEB)
  19. BIN = obj\i386\$(DDKBUILDENV)
  20. !endif
  21. WIN32 = $(DDKROOT)
  22. NETROOT = $(DDKROOT)\src\net
  23. INCLUDE = $(INC32);$(INCLUDE);.;.\inc
  24. DDKTOOLS = $(WIN32)\bin
  25. ASM = ml
  26. CL = cl -bzalign
  27. CHGNAM = chgnam.exe
  28. CHGNAMSRC = $(DDKTOOLS)\chgnam.vxd
  29. INCLUDES = $(NETROOT)\bin\includes.exe
  30. MAPSYM = mapsym
  31. !ifdef OMB
  32. LIBVXD = $(DDKROOT)\lib\i386\free\vxdwraps.lib
  33. LINK = link386.exe
  34. !else
  35. LIBVXD = $(DDKROOT)\lib\i386\free\vxdwraps.clb
  36. LINK = link.exe
  37. !endif
  38. LFLAGS = /m /NOD /MA /LI /NOLOGO /NOI
  39. CFLAGS = -nologo -W2 -Zp -Gs -DIS_32 -Zl -c
  40. AFLAGS = -DIS_32 -nologo -W2 -Zm -Cx -DMASM6 -DVMMSYS -Zm -DDEVICE=$(DEVICE)
  41. !ifdef OMB
  42. AFLAGS = $(AFLAGS) -DNDIS_WIN -c
  43. !else
  44. AFLAGS = $(AFLAGS) -DNDIS_WIN -c -coff -DBLD_COFF
  45. !endif
  46. !ifdef NDIS_MINI_DRIVER
  47. NDIS_STDCALL=1
  48. CFLAGS = $(CFLAGS) -DNDIS_MINI_DRIVER
  49. AFLAGS = $(AFLAGS) -DNDIS_MINI_DRIVER
  50. !endif
  51. !ifdef NDIS_STDCALL
  52. CFLAGS = $(CFLAGS) -Gz -DNDIS_STDCALL
  53. AFLAGS = $(AFLAGS) -DNDIS_STDCALL
  54. !endif
  55. .asm{$(BIN)}.obj:
  56. set INCLUDE=$(INCLUDE)
  57. set ML= $(AFLAGS) $(DEB)
  58. $(ASM) -Fo$*.obj $<
  59. .asm{$(BIN)}.lst:
  60. set INCLUDE=$(INCLUDE)
  61. set ML= $(AFLAGS) $(DEB)
  62. $(ASM) -Fl$*.obj $<
  63. .c{$(BIN)}.obj:
  64. set INCLUDE=$(INCLUDE)
  65. set CL= $(CFLAGS) $(DEB)
  66. $(CL) -Fo$*.obj $<
  67. # $(CHGNAM) $(CHGNAMSRC) $*.obj
  68. {$(NDISSRC)}.asm{$(BIN)}.obj:
  69. set INCLUDE=$(INCLUDE)
  70. set ML= $(AFLAGS) $(DEB) -DMAC=$(DEVICE)
  71. $(ASM) -Fo$*.obj $<
  72. {$(NDISSRC)}.asm{$(BIN)}.lst:
  73. set INCLUDE=$(INCLUDE)
  74. set ML= $(AFLAGS) $(DEB) -DMAC=$(DEVICE)
  75. $(ASM) -Fl$*.obj $<
  76. {$(NDISSRC)}.c{$(BIN)}.obj:
  77. set INCLUDE=$(INCLUDE)
  78. set CL= $(CFLAGS) $(DEB)
  79. $(CL) -Fo$*.obj $<
  80. # $(CHGNAM) $(CHGNAMSRC) $*.obj
  81. target: $(BIN) $(TARGETPATH)\$(DEVICE).VXD
  82. $(BIN):
  83. if not exist $(BIN)\nul md $(BIN)
  84. dbg: depend
  85. $(MAKE) BIN=debug DEB="$(DDEB)"
  86. rtl: depend
  87. $(MAKE) BIN=retail DEB="$(RDEB)"
  88. all: rtl dbg
  89. !if EXIST (depend.mk)
  90. !include depend.mk
  91. !endif
  92. VERSION = 4.0
  93. !ifdef OMB
  94. $(TARGETPATH)\$(DEVICE).VXD: $(OBJS) $(DEVICE).def $(LIBVXD)
  95. ! ifndef PASS0ONLY
  96. @echo link -OUT:$@
  97. $(LINK) @<<
  98. $(OBJS: =+^
  99. )
  100. $(TARGETPATH)\$(DEVICE).VXD $(LFLAGS)
  101. $(BIN)\$(DEVICE).map
  102. $(LIBNDIS) $(LIBVXD)
  103. $(DEVICE).def
  104. <<
  105. ! endif
  106. !else
  107. $(TARGETPATH)\$(DEVICE).VXD: $(OBJS) $(DEVICE).def $(LIBNDIS) $(LIBVXD)
  108. ! ifndef PASS0ONLY
  109. @echo link -OUT:$@
  110. $(LINK) @<<
  111. -MACHINE:i386
  112. -DEBUG:NONE
  113. -PDB:NONE
  114. -DEF:$(DEVICE).def
  115. -OUT:$(TARGETPATH)\$(DEVICE).VXD
  116. -MAP:$(BIN)\$(DEVICE).map
  117. -VXD
  118. $(LIBNDIS) $(LIBVXD)
  119. $(OBJS: =^
  120. )
  121. <<
  122. ! endif
  123. !endif
  124. copy $(DEVICE).inf $(TARGETPATH)
  125. copy myndi.dll $(TARGETPATH)
  126. cd $(BIN)
  127. $(MAPSYM) $(DEVICE)
  128. cd ..\..
  129. depend:
  130. # -mkdir debug
  131. # -mkdir retail
  132. set INCLUDE=$(INCLUDE)
  133. $(INCLUDES) -i -L$$(BIN) -S$$(BIN) *.asm *.c > depend.mk
  134. $(INCLUDES) -i -L$$(BIN) -S$$(BIN) $(NDISSRC)\ndisdev.asm >> depend.mk
  135. clean :
  136. - @if exist obj\i386\*.obj del obj\i386\*.obj
  137. - @if exist obj\i386\*.sym del obj\i386\*.sym
  138. - @if exist obj\i386\*.vxd del obj\i386\*.VXD
  139. - @if exist obj\i386\*.map del obj\i386\*.map
  140. - @if exist obj\i386\*.lst del obj\i386\*.lst
  141. - @if exist obj\i386\*.exp del obj\i386\*.exp
  142. - @if exist obj\i386\*.lib del obj\i386\*.lib
  143. - @if exist debug\*.obj del debug\*.obj
  144. - @if exist debug\*.sym del debug\*.sym
  145. - @if exist debug\*.vxd del debug\*.VXD
  146. - @if exist debug\*.map del debug\*.map
  147. - @if exist debug\*.lst del debug\*.lst
  148. - @if exist debug\*.exp del debug\*.exp
  149. - @if exist debug\*.lib del debug\*.lib
  150. - @if exist depend.mk del depend.mk
  151. - @if exist retail\*.obj del retail\*.obj
  152. - @if exist retail\*.sym del retail\*.sym
  153. - @if exist retail\*.VXD del retail\*.VXD
  154. - @if exist retail\*.map del retail\*.map
  155. - @if exist retail\*.lst del retail\*.lst
  156. - @if exist retail\*.exp del retail\*.exp
  157. - @if exist retail\*.lib del retail\*.lib
  158. - @if exist depend.mk del depend.mk