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.

273 lines
7.1 KiB

  1. #
  2. # constructs mmsystem DLL
  3. #
  4. # Defines:
  5. # DEBUG - Enable debug code
  6. # STRICT - Build a version with STRICT enabled
  7. #
  8. !include ..\makefile.inc
  9. NAME =mmsystem
  10. EXT =dll
  11. OBJFIRST=$Zlibentry.obj
  12. OBJ1 =$Zinit.obj $Ztime.obj $Zjoy.obj $Zsound.obj $Zwave.obj
  13. OBJ2 =$Zmidi.obj $Zmci.obj $Zmcisys.obj $Zmciparse.obj $Zdrvproc.obj $ZPlaywav.obj
  14. OBJ3 =$Zmmwnd.obj $Zauxout.obj $Zdebug.obj $Zdrvr31.obj $Ztaska.obj $Zthunks.obj
  15. OBJ4 =$Ztask.obj $Zbwinexec.obj $Zcomm.obj $Zstack.obj $Zheap.obj $Zdpmipage.obj
  16. OBJ5 =$Zmmio.obj $Zmmioriff.obj $Zhmemcpy.obj $Zdosa.obj $Zisr.obj $Zmixer.obj
  17. OBJ =$(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJD)
  18. LIBS =..\lib\$(ALT_PROJECT)\libw ..\lib\mdllcew
  19. INCS = -I. -I..\inc -I..\..\inc
  20. OPT = -Oxws
  21. INCSX =..\inc;.\rinc;..\..\inc;$(SDK_INC_PATH)
  22. #
  23. # build a retail build
  24. #
  25. !if $(FREEBUILD)
  26. #CLOPT =-I..\inc -I.\rinc -I..\..\inc
  27. CLOPT =
  28. MASMOPT =-I..\inc -I..\..\inc
  29. LINKOPT =
  30. RC =rc16 -i..\inc -i.\rinc
  31. OBJD =
  32. MMDEBUG =
  33. #
  34. # build a full debug build
  35. #
  36. !else
  37. CDEBUG =-Zd -Odi
  38. ADEBUG =-Zd
  39. LDEBUG =/LI
  40. #CLOPT =$(CDEBUG) -DDEBUG -I..\inc -I.\rinc -I..\..\inc
  41. CLOPT =$(CDEBUG) -DDEBUG
  42. MASMOPT =$(ADEBUG) -DDEBUG -I..\inc -I..\..\inc
  43. LINKOPT =$(LDEBUG)
  44. RC =rc16 -DDEBUG -i..\inc -i.\rinc
  45. OBJD =$Zmmsex.obj
  46. MMDEBUG = DEBUG=1
  47. !endif
  48. !if "$(PROCESSOR_ARCHITECTURE)" == "x86"
  49. Z=$(ALT_PROJECT)\$(_OBJ_DIR)\i386^\
  50. !elseif "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
  51. Z=$(ALT_PROJECT)\$(_OBJ_DIR)\alpha^\
  52. !endif
  53. .SUFFIXES: .asm
  54. !if "$(STRICT)" == "YES"
  55. TYPES =-DSTRICT
  56. !else
  57. TYPES =
  58. !endif
  59. CLOPT =$(CLOPT) $(DBCS_FLAGS)
  60. MASMOPT=$(MASMOPT) $(DBCS_FLAGS)
  61. #
  62. # NOTE
  63. #
  64. # this code is compiled *without* windows prolog/epilog (no -Gw)
  65. # thus all exported routines, must have _loadds
  66. #
  67. CC = cl16 -c -Alnw -G2s -Zp -W3 $(CLOPT) $(OPT) $(TYPES)
  68. ASM = masm -Mx -t -D?QUIET $(MASMOPT)
  69. LINK = $(LINK16) /NOD/NOE/MAP/ALIGN:16 $(LINKOPT)
  70. .c{$Z}.obj:
  71. $(CC) -Fo$*.obj $(@B).c
  72. .asm{$Z}.obj:
  73. $(ASM) -DSEGNAME=_TEXT $(*F).asm, $*.obj;
  74. ###################################
  75. all: $Z $Z$(NAME).$(EXT) $Z$(NAME).sym mmtask.tsk
  76. $Z:
  77. if not exist $Z md $Z
  78. set include=$(INCSX)
  79. $Z$(NAME).$(EXT): $(OBJFIRST) $(OBJ) $(NAME).def $Z$(NAME).res mmtask.tsk
  80. $(LINK) @<<
  81. $(OBJFIRST) +
  82. $(OBJ1)+
  83. $(OBJ2)+
  84. $(OBJ3)+
  85. $(OBJ4)+
  86. $(OBJ5)+
  87. $(OBJD),
  88. $Z$(NAME).$(EXT),
  89. $Z$(NAME),
  90. $(LIBS),
  91. $(NAME).def
  92. <<
  93. $(RC) -t $Z$(NAME).res $Z$(NAME).$(EXT)
  94. mapsym /n -o $*.sym $*.map
  95. -binplace -o $(ALT_PROJECT_TARGET) $Zmmsystem.dll $Zmmsystem.map $Zmmsystem.sym mmtask.tsk mmtask.map mmtask.sym
  96. RES_DIR =.\messages\usa
  97. $Z$(NAME).rc: $(RES_DIR)\$(NAME).rc
  98. copy $(RES_DIR)\$(NAME).rc $Z
  99. $Zmci.rc: $(RES_DIR)\mci.rc
  100. copy $(RES_DIR)\mci.rc $Z
  101. $Z$(NAME).rcv: $(RES_DIR)\$(NAME).rcv ..\inc\common.ver
  102. copy $(RES_DIR)\$(NAME).rcv $Z
  103. touch $@
  104. $Z$(NAME).res: $Z$(NAME).rc $Zmci.rc ..\inc\$(NAME).h $Z$(NAME).rcv mmsysi.h ..\inc\mmddk.h
  105. $(RC) -r -fo$Z$(NAME).res $Z$(NAME).rc
  106. ############## mmtask #############
  107. mmtask.tsk: mmtask\mmtask.asm mmtask\makefile mmtask\mmtask.def mmtask\mmtask.h
  108. cd mmtask
  109. $(MAKE) ALT_PROJECT=$(ALT_PROJECT) $(MMDEBUG)
  110. cd ..
  111. ############## includes ##############
  112. #..\inc\$(NAME).h ..\inc\$(NAME).inc ..\inc\mmddk.h ..\inc\mmddk.inc ..\inc\mci.rc : $$(@F)
  113. # @copy $(@F) $@
  114. ############## clean ##############
  115. clean: cleanup all
  116. cleanup:
  117. if exist $Z$(NAME).$(EXT) del $Z$(NAME).$(EXT)
  118. if exist $Z$(NAME).res del $Z$(NAME).res
  119. if exist $Z*.sym del $Z*.sym
  120. if exist $Z*.map del $Z*.map
  121. if exist $Z*.lib del $Z*.lib
  122. if exist $Z*.cod del $Z*.cod
  123. if exist $Z*.obj del $Z*.obj
  124. if exist $Z*.rcv del $Z*.rcv
  125. if exist $Z*.rc del $Z*.rc
  126. if exist *.tsk del *.tsk
  127. cd mmtask
  128. $(MAKE) cleanup
  129. cd ..
  130. ########### segmentation ##########
  131. #
  132. # INIT is the init/exit time segment
  133. # FIXED is the interupt time fixed segment
  134. # _TEXT is the non-resident "random" segment (was NRES)
  135. SEGC = $(CC) -NT CSEG -Fo$*.obj $(@B).c
  136. SEGA = $(ASM) -DSEGNAME=CSEG $(*F).asm, $*.obj;
  137. $Zdebug.obj : ; $(SEGA:CSEG=FIX)
  138. $Zinit.obj : ; $(SEGC:CSEG=INIT)
  139. $Zlibentry.obj : ; $(SEGA:CSEG=INIT)
  140. $Zmmwnd.obj : ; $(SEGC:CSEG=INIT)
  141. $Zplaywav.obj : ; $(SEGC:CSEG=WAVE)
  142. $Zsound.obj : ; $(SEGC:CSEG=WAVE)
  143. $Zwave.obj : ; $(SEGC:CSEG=WAVE)
  144. $Zmidi.obj : ; $(SEGC:CSEG=MIDI)
  145. $Zdpmipage.obj : ; $(SEGA:CSEG=_TEXT)
  146. $Zmci.obj : ; $(SEGC:CSEG=MCI)
  147. $Zmcisys.obj : ; $(SEGC:CSEG=MCI)
  148. $Zmciparse.obj : ; $(SEGC:CSEG=MCI)
  149. $Zdosa.obj : ; $(SEGA:CSEG=MCI)
  150. $Zheap.obj : ; $(SEGA:CSEG=MCI)
  151. $Ztask.obj : ; $(SEGC:CSEG=_TEXT)
  152. $Zdrvproc.obj : ; $(SEGC:CSEG=_TEXT)
  153. $Ztaska.obj : ; $(SEGA:CSEG=_TEXT)
  154. $Zjoy.obj : ; $(SEGC:CSEG=RARE)
  155. $Ztime.obj : ; $(SEGC:CSEG=FIX)
  156. $Zbwinexec.obj : ; $(SEGA:CSEG=_TEXT)
  157. $Zauxout.obj : ; $(SEGC:CSEG=RARE)
  158. $Zdrvr31.obj : ; $(SEGA:CSEG=_TEXT)
  159. $Zcomm.obj : ; $(SEGA:CSEG=FIX)
  160. $Zstack.obj : ; $(SEGA:CSEG=FIX)
  161. $Zhmemcpy.obj : ; $(SEGA:CSEG=MMIO)
  162. $Zmmio.obj : ; $(SEGC:CSEG=MMIO)
  163. $Zmmioriff.obj : ; $(SEGC:CSEG=MMIO)
  164. $Zmmsex.obj : ; $(SEGC:CSEG=RARE)
  165. $Zmixer.obj : ; $(SEGC:CSEG=MIXER)
  166. ############# depend ##############
  167. depend:
  168. mv makefile makefile.old
  169. sed "/^# START Dependencies/,/^# END Dependencies/D" makefile.old > makefile
  170. -del makefile.old
  171. echo # START Dependencies >> makefile
  172. includes -l *.c *.asm >> makefile
  173. echo # END Dependencies >> makefile
  174. ##################################################################
  175. # START Dependencies
  176. $Zauxout.obj: auxout.c ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  177. $Zdpmipage.obj: dpmipage.asm int31.inc
  178. $Zcomm.obj: comm.asm
  179. $Zbwinexec.obj: bwinexec.asm
  180. $Zdosa.obj: dosa.asm
  181. $Zinit.obj: init.c drvr.h ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  182. $Zhmemcpy.obj: hmemcpy.asm
  183. $Zheap.obj: heap.asm
  184. $Zjoy.obj: joy.c drvr.h ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  185. $Zmci.obj: mci.c ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  186. $Zlibentry.obj: libentry.asm
  187. $Zmciparse.obj: mciparse.c ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  188. $Zmcisys.obj: mcisys.c ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  189. $Zmidi.obj: midi.c ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  190. $Zmmio.obj: mmio.c mmioi.h ..\inc\mmsystem.h mmsysi.h
  191. $Zmmioriff.obj: mmioriff.c mmioi.h ..\inc\mmsystem.h
  192. $Zmmwnd.obj: mmwnd.c mmsysi.h ..\inc\mmsystem.h
  193. $Zplaywav.obj: playwav.c mmsysi.h ..\inc\mmsystem.h playwav.h
  194. $Zsound.obj: sound.c mmsysi.h ..\inc\mmsystem.h playwav.h
  195. $Ztask.obj: task.c ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h mmtask\mmtask.h
  196. $Ztaska.obj: taska.asm ..\inc\mmsystem.inc
  197. $Zstack.obj: stack.asm ..\inc\mmddk.inc ..\inc\mmsystem.inc
  198. $Zisr.obj: isr.asm ..\inc\mmddk.inc ..\inc\mmsystem.inc
  199. $Ztime.obj: time.c drvr.h ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  200. $Zwave.obj: wave.c ..\inc\mmddk.h mmsysi.h ..\inc\mmsystem.h
  201. $Zdebug.obj: debug.asm ..\inc\mmddk.inc ..\inc\mmsystem.inc
  202. $Zdrvproc.obj: drvproc.c mmsysi.h ..\inc\mmsystem.h mmioi.h
  203. # END Dependencies