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.

237 lines
7.2 KiB

  1. NAME = dinput
  2. EXT = dll
  3. IS_32 = 1
  4. USEDDK32 = 1
  5. GOALS = $(PINC)\$(NAME).h \
  6. $(PINC)\dinputd.h \
  7. $(PBIN)\$(NAME).$(EXT) \
  8. $(PBIN)\$(NAME).sym \
  9. $(PLIB)\$(NAME).lib \
  10. LIBS = kernel32.lib advapi32.lib user32.lib uuid.lib ..\diguid.lib
  11. !if "$(DEBUG:_0=)" == "debug"
  12. LIBS = $(LIBS) user32.lib
  13. !endif
  14. OBJ1 = dinput.obj dicf.obj diobj.obj didenum.obj didev.obj didevdf.obj
  15. OBJ2 = didevef.obj digenm.obj digenk.obj digenj.obj digenx.obj
  16. OBJ3 = digendef.obj dical.obj dijoytyp.obj dieffj.obj dieffv.obj
  17. OBJ4 = dioledup.obj common.obj dimem.obj diutil.obj dilist.obj assert.obj
  18. OBJ5 = valid.obj direg.obj dihel.obj diem.obj diemm.obj diemk.obj diemh.obj
  19. OBJ6 = disubcls.obj diexcl.obj diextdll.obj dihidenm.obj dihid.obj
  20. OBJ7 = dihidini.obj dihiddat.obj dihidusg.obj dieff.obj dieshep.obj
  21. OBJ8 = diguid.obj dijoycfg.obj diaddhw.obj dithunk.obj dijoyreg.obj
  22. OBJ9 = diregutl.obj diport.obj diwinnt.obj dijoyhid.obj
  23. OBJLIB = dilib1.obj dilib2.obj dilib3.obj dilib4.obj
  24. OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) \
  25. $(OBJ9)
  26. # do not build COFF
  27. ASMNOCOFF = 1
  28. !if "$(DEBUG:_0=)" == "internal" || "$(DEBUG:_0=)" == "intern" #[
  29. COPT =-DDEBUG -Zi #-FAs
  30. AOPT =-DDEBUG
  31. LOPT =-debug:full -debugtype:cv
  32. ROPT =-DDEBUG
  33. !else if "$(DEBUG:_0=)" == "debug" #][
  34. COPT =-DRDEBUG -Zi #-FAs
  35. AOPT =-DRDEBUG
  36. LOPT =-debug:full -debugtype:cv
  37. ROPT =-DRDEBUG
  38. !else #][
  39. COPT =
  40. AOPT =
  41. LOPT =-debug:none -incremental:no
  42. ROPT =
  43. !endif #]
  44. DEF = $(NAME).def
  45. RES = $(NAME).res
  46. CFLAGS =-Fc -Oxw -QIfdiv- -YX $(COPT) $(INCLUDES) -DWIN95 -D_X86_ -Zl $(RAYMONDC)
  47. #
  48. # The _0 version does not contain HID support (DX5).
  49. # The normal version does contain HID support (DX5a).
  50. #
  51. !if "$(DEBUG:_0=)"=="$(DEBUG)"
  52. CFLAGS =$(CFLAGS) -DHID_SUPPORT
  53. !endif
  54. LFLAGS =$(LOPT)
  55. RCFLAGS =$(ROPT) $(INCLUDES)
  56. AFLAGS =$(AOPT) -Zp1 -Fl
  57. !include ..\..\proj.mk
  58. ############################################################################
  59. ### Dependencies
  60. INCLUDE=$(INCLUDE);$(BLDROOT)\wdm10\ddk\inc
  61. MKFILE =..\default.mk
  62. CINCS =\
  63. ..\dinputpr.h \
  64. ..\dinputp.h \
  65. ..\dinputdp.h \
  66. ..\dinputv.h \
  67. ..\dinputi.h \
  68. ..\dihid.h \
  69. ..\diem.h \
  70. ..\dinputrc.h \
  71. ..\debug.h \
  72. ..\didev.h \
  73. !IFNDEF ARCH
  74. ARCH=x86
  75. !ENDIF
  76. $(PLIB)\$(NAME).lib: $(NAME).lib $(OBJLIB)
  77. copy $(@F) $@ >nul
  78. lib @<<
  79. /OUT:$@
  80. /NOLOGO
  81. $@
  82. $(OBJLIB)
  83. <<
  84. #
  85. # See comments in makefil0 for more info.
  86. #
  87. # The following line builds the DX5 header
  88. #HSPLITFLAGS=-ts dx3 -ta dx5 -ts dx5a -ts dx5b2 -ts dx6 -ts dx7 -ts dx8 -v 500
  89. # The following line builds the DX5a header; note that DX5a includes DX5
  90. #HSPLITFLAGS=-ts dx3 -ta dx5 -ta dx5a -ts dx5b2 -ts dx6 -ts dx7 -ts dx8 -v 50A
  91. # The following line builds the DX5B2 header
  92. #HSPLITFLAGS=-ts dx3 -ts dx5 -ts dx5a -ta dx5b2 -ts dx6 -ts dx7 -ts dx8 -v 5B2
  93. # The following line builds the DX6.1a header
  94. HSPLITFLAGS=-ts dx3 -ts dx5 -ts dx5a -ts dx5b2 -ta dx6 -ts dx7 -ts dx8 -v 600
  95. # The following line builds the DX7 header
  96. HSPLITFLAGS=-ts dx3 -ts dx5 -ts dx5a -ts dx5b2 -ts dx6 -ta dx7 -ts dx8 -v 700
  97. # The following line builds the DX8 header
  98. #HSPLITFLAGS=-ts dx3 -ts dx5 -ts dx5a -ts dx5b2 -ts dx6 -ts dx7 -ta dx8 -v 800
  99. !IF EXIST($(DXROOT)\bin\hsplit.exe)
  100. HSPLIT=$(DXROOT)\bin\hsplit.exe
  101. !ELSE
  102. HSPLIT=$(DEVROOT)\tools\binw\$(ARCH)\hsplit
  103. !ENDIF
  104. $(PINC)\dinput.h ..\dinputp.h: ..\dinput.w ..\mkhdr.m4
  105. $(DXROOT)\bin\m4 ..\dinput.w >tmp.wx
  106. $(HSPLIT) $(HSPLITFLAGS) -o tmp.x tmpp.x tmp.wx
  107. del tmp.wx
  108. $(DEVROOT)\tools\binw\$(ARCH)\wcshdr.exe < tmp.x > $(PINC)\dinput.h
  109. del tmp.x
  110. $(DEVROOT)\tools\binw\$(ARCH)\wcshdr.exe < tmpp.x > ..\dinputp.h
  111. del tmpp.x
  112. $(PINC)\dinputd.h ..\dinputdp.h: ..\dinputd.w ..\mkhdr.m4
  113. $(DXROOT)\bin\m4 ..\dinputd.w >tmp.wx
  114. $(HSPLIT) $(HSPLITFLAGS) -o tmp.x tmpp.x tmp.wx
  115. del tmp.wx
  116. $(DEVROOT)\tools\binw\$(ARCH)\wcshdr.exe < tmp.x > $(PINC)\dinputd.h
  117. del tmp.x
  118. $(DEVROOT)\tools\binw\$(ARCH)\wcshdr.exe < tmpp.x > ..\dinputdp.h
  119. del tmpp.x
  120. ..\dinput.rc: ..\dinputrc.w ..\mkhdr.m4
  121. $(DXROOT)\bin\m4 ..\dinputrc.w >tmp.wx
  122. $(HSPLIT) $(HSPLITFLAGS) -4 -o tmp.x tmpp.x tmp.wx
  123. del tmp.wx
  124. $(DEVROOT)\tools\binw\$(ARCH)\wcshdr.exe < tmp.x > ..\dinput.rc
  125. del tmp.x
  126. del tmpp.x
  127. !ifndef PROCESSOR_ARCHITECTURE
  128. PROCESSOR_ARCHITECTURE=x86
  129. !endif
  130. GUIDLIB=$(DEVROOT)\tools\binw\$(PROCESSOR_ARCHITECTURE)\guidlib.exe
  131. ..\diguid.lib: ..\dinputpr.h ..\dinput.w ..\dinputd.w
  132. $(GUIDLIB) /OUT:..\diguid.lib /CPP_OPT:"-DINITGUID -DGUIDLIB" ..\dinputpr.h
  133. dinput.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  134. dicf.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  135. diobj.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  136. didenum.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  137. didev.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  138. didevdf.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  139. didevef.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  140. digenm.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  141. digenk.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  142. digenj.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  143. digenx.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  144. digendef.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  145. dical.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  146. dijoytyp.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  147. dieffj.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  148. dioledup.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  149. common.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  150. dimem.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  151. diutil.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  152. dilist.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  153. assert.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  154. valid.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  155. direg.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  156. dihel.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  157. diem.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  158. diemm.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  159. diemk.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  160. diemh.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  161. disubcls.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  162. diexcl.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  163. diextdll.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  164. dihidenm.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  165. dihid.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  166. dihidusg.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  167. dieff.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  168. dieshep.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  169. diguid.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  170. dijoycfg.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  171. dijoyreg.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  172. diregutl.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  173. diport.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  174. diwinnt.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  175. dijoyhid.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  176. dilib1.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  177. dilib2.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  178. dilib3.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  179. dilib4.obj: $(MKFILE) $(CINCS) ..\$(*B).c
  180. ###########################################################################
  181. $(NAME).lbw : ..\$(NAME).lbc
  182. wlib -n $(NAME).lbw @..\$(NAME).lbc
  183. $(NAME).lib $(NAME).$(EXT): \
  184. $(OBJS) $(NAME).res ..\$(NAME).def ..\default.mk ..\diguid.lib
  185. $(LINK) @<<
  186. $(LFLAGS)
  187. -nologo
  188. -out:$(NAME).$(EXT)
  189. -map:$(NAME).map
  190. -dll
  191. -base:0x70000000
  192. -machine:i386
  193. -subsystem:windows,4.0
  194. -entry:DllEntryPoint
  195. -implib:$(NAME).lib
  196. -def:..\$(NAME).def
  197. -warn:2
  198. $(LIBS)
  199. $(NAME).res
  200. $(OBJS)
  201. <<
  202. mapsym -nologo $(NAME).map >nul