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.

242 lines
5.5 KiB

  1. # comm16 makefile
  2. #
  3. # Copyright (c) 1992, Microsoft Corporation
  4. #
  5. # History:
  6. # 27-Mar-1992 Nandurir
  7. # Created.
  8. # 6-Feb-1994 LeeHart
  9. # Modified for version resources & CV Symbols
  10. #
  11. !INCLUDE ..\..\makefile.inc
  12. .SUFFIXES:
  13. .SUFFIXES: .c .asm .h .inc .obj .lst .sys .exe .com .map .sym .def .lib .rc .res
  14. NEC_98=1
  15. !if "$(NEC_98)" == "1"
  16. INCS = /I..\..\inc /I..\..\..\inc
  17. !else
  18. !ifdef INCLUDE
  19. INCS =
  20. !else
  21. INCS = -I..\..\inc -I..\..\..\inc
  22. !endif
  23. !endif
  24. !if "$(NEC_98)" == "1"
  25. DEFINES = /W1 /DWINNT /DNEC_98
  26. !else
  27. DEFINES = -DWOW $(MVDMFLAGS)
  28. !endif
  29. !if "$(NEC_98)" == "1"
  30. AOBJ = $(DEFINES) $(INCS)
  31. !else
  32. AOBJ = -t $(DEFINES) $(INCS)
  33. !endif
  34. CW16 = -AS -G2sw -Os -W3 -Zp $(DEFINES) $(INCS)
  35. CW16B = $(CW16) -B1 c1l.exe -B2 c2l.exe -B3 c3l.exe
  36. RES_DIR = $(DEST)
  37. OBJ_DIR = $(DEST)
  38. LINK = /map /align:16
  39. !if !$(FREEBUILD)
  40. !if "$(NEC_98)" == "1"
  41. AOBJ = $(AOBJ) /Zd
  42. !else
  43. AOBJ = $(AOBJ) -Zd
  44. !endif
  45. CW16 = $(CW16) /Od /Oi /Zd
  46. LINK = $(LINK) /LI
  47. !endif
  48. W16LIBS = ..\..\lib\snocrtd.lib
  49. .asm.obj:
  50. masm $(AOBJ) $*;
  51. !ifdef ALT_PROJECT
  52. .asm{$(OBJ_DIR)\}.obj:
  53. masm $(AOBJ) $<,$(OBJ_DIR)\;
  54. {$(RES_DIR)\}.asm{$(OBJ_DIR)\}.obj:
  55. masm $(AOBJ) $<,$(OBJ_DIR)\;
  56. !endif
  57. .asm.lst:
  58. masm $(AOBJ) -l $*,nul,$*.lst;
  59. .c.obj:
  60. cl16 -c -nologo $(CW16) $*.c
  61. .c.lst:
  62. cl16 -c -nologo $(CW16) -Fonul -Fc$*.lst $*.c
  63. .def.lib:
  64. implib $*.lib $*.def
  65. .map.sym:
  66. mapsym $*
  67. .rc.res:
  68. rc16 -r $(INCS) -fo $@ $*.rc
  69. !ifdef ALT_PROJECT
  70. all: makedir $(OBJ_DIR)\comm.drv
  71. !if "$(NEC_98)" == "1"
  72. binplace -o $(ALT_PROJECT_TARGET) $(OBJ_DIR)\comm.drv $(OBJ_DIR)\comm.map $(OBJ_DIR)\comm.sym
  73. !else
  74. binplace $(OBJ_DIR)\comm.drv $(OBJ_DIR)\comm.map $(OBJ_DIR)\comm.sym
  75. !endif
  76. makedir:
  77. @-if not exist $(OBJ_DIR) md $(OBJ_DIR)
  78. !else
  79. all: comm.drv comm.map comm.sym comm.lrf
  80. binplace comm.drv comm.map comm.sym
  81. !endif
  82. clean: cleanup all
  83. cleanup:
  84. if exist *.lrf del *.lrf
  85. if exist *.obj del *.obj
  86. if exist *.exe del *.exe
  87. if exist *.map del *.map
  88. if exist *.sym del *.sym
  89. if exist *.drv del *.drv
  90. if exist *.res del *.res
  91. !ifdef ALT_PROJECT
  92. if exist $(OBJ_DIR)\*.lrf del $(OBJ_DIR)\*.lrf
  93. if exist $(OBJ_DIR)\*.obj del $(OBJ_DIR)\*.obj
  94. if exist $(OBJ_DIR)\*.exe del $(OBJ_DIR)\*.exe
  95. if exist $(OBJ_DIR)\*.map del $(OBJ_DIR)\*.map
  96. if exist $(OBJ_DIR)\*.sym del $(OBJ_DIR)\*.sym
  97. if exist $(OBJ_DIR)\*.drv del $(OBJ_DIR)\*.drv
  98. if exist $(OBJ_DIR)\*.res del $(OBJ_DIR)\*.res
  99. if exist $(OBJ_DIR)\*.def del $(OBJ_DIR)\*.def
  100. if exist $(OBJ_DIR)\*.asm del $(OBJ_DIR)\*.asm
  101. !endif
  102. !ifdef ALT_PROJECT
  103. !if "$(NEC_98)" == "1"
  104. $(OBJ_DIR)\dispatch.obj dispatch.lst: dispatch.asm
  105. !else
  106. $(OBJ_DIR)\ccom.obj ccom.lst: ccom.asm ibmcom.inc comdev.inc
  107. $(OBJ_DIR)\ibmsetup.obj ibmsetup.lst: ibmsetup.asm ibmcom.inc comdev.inc ins8250.inc
  108. $(OBJ_DIR)\ibmcom.obj: ibmcom.asm ibmcom.inc comdev.inc ins8250.inc
  109. $(OBJ_DIR)\ibmint.obj: ibmint.asm ibmcom.inc comdev.inc ins8250.inc
  110. $(OBJ_DIR)\ibmlpt.obj: ibmlpt.asm ibmcom.inc comdev.inc
  111. $(OBJ_DIR)\commmsg.obj: $(RES_DIR)\commmsg.asm
  112. $(RES_DIR)\commmsg.asm: commmsg.asm
  113. copy commmsg.asm $(OBJ_DIR)
  114. if exist commmsg.$(ALT_PROJECT) copy commmsg.$(ALT_PROJECT) $(OBJ_DIR)\commmsg.asm
  115. !endif
  116. !else
  117. ccom.obj ccom.lst: ccom.asm ibmcom.inc comdev.inc
  118. ibmsetup.obj ibmsetup.lst: ibmsetup.asm ibmcom.inc comdev.inc ins8250.inc
  119. ibmcom.obj: $*.asm $*.inc comdev.inc ins8250.inc
  120. ibmint.obj: $*.asm ibmcom.inc comdev.inc ins8250.inc
  121. ibmlpt.obj: $*.asm ibmcom.inc comdev.inc
  122. commmsg.obj: $*.asm
  123. !endif
  124. !ifdef ALT_PROJECT
  125. !if "$(NEC_98)" == "1"
  126. $(OBJ_DIR)\comm.res: comm.rc comm.rcv ..\..\inc\common.ver
  127. rc16 -r $(INCS) -fo$*.res comm.rc
  128. !else
  129. $(OBJ_DIR)\comm.res: comm.rc comm.rcv ..\..\inc\common.ver
  130. rc16 -r $(INCS) -fo $@ comm.rc
  131. !endif
  132. !else
  133. comm.res: $*.rc $*.rcv ..\..\inc\common.ver
  134. !endif
  135. !ifdef ALT_PROJECT
  136. !if "$(NEC_98)" == "1"
  137. $(OBJ_DIR)\comm.lrf: makefile.sub
  138. echo dispatch >$@
  139. echo comm.exe/align:16>>$@
  140. echo comm $(LINK)>>$@
  141. echo ..\..\..\..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\..\..\..\lib\snocrtd.lib ..\..\..\..\..\lib\$(DEST)\system.lib /map /nod>>$@
  142. echo comm;>>$@
  143. !else
  144. $(OBJ_DIR)\comm.lrf: makefile.sub
  145. echo ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
  146. echo comm.exe/align:16>>$@
  147. echo comm $(LINK)>>$@
  148. echo ..\..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\..\lib\snocrtd.lib /map /nod>>$@
  149. echo comm;>>$@
  150. !endif
  151. !else
  152. comm.lrf: makefile.sub
  153. echo ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
  154. echo $*.exe/align:16>>$@
  155. echo $* $(LINK)>>$@
  156. echo ..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\lib\snocrtd.lib /map /nod>>$@
  157. echo $*;>>$@
  158. !endif
  159. !ifdef ALT_PROJECT
  160. $(OBJ_DIR)\comm.def: comm.def
  161. copy comm.def $(OBJ_DIR)
  162. !endif
  163. !ifdef ALT_PROJECT
  164. !if "$(NEC_98)" == "1"
  165. $(OBJ_DIR)\comm.drv: $(OBJ_DIR)\dispatch.obj $(OBJ_DIR)\comm.def $(OBJ_DIR)\comm.res $(OBJ_DIR)\comm.lrf
  166. cd $(OBJ_DIR)
  167. link16 @comm.lrf;
  168. rc16 -t comm.res comm.exe
  169. if exist *.drv del *.drv
  170. ren comm.exe *.drv
  171. mapsym comm
  172. cd ..\..\..
  173. !else
  174. $(OBJ_DIR)\comm.drv: $(OBJ_DIR)\ccom.obj $(OBJ_DIR)\ibmsetup.obj $(OBJ_DIR)\ibmcom.obj $(OBJ_DIR)\ibmint.obj $(OBJ_DIR)\ibmlpt.obj $(OBJ_DIR)\commmsg.obj \
  175. $*.def $*.res $*.lrf
  176. cd $(OBJ_DIR)
  177. link16 @comm.lrf;
  178. rc16 -t comm.res comm.exe
  179. if exist *.drv del *.drv
  180. ren comm.exe *.drv
  181. mapsym comm
  182. cd ..\..\..
  183. !endif
  184. !else
  185. comm.drv: ccom.obj ibmsetup.obj ibmcom.obj ibmint.obj ibmlpt.obj commmsg.obj \
  186. $*.def $*.res $*.lrf
  187. link16 @$*.lrf;
  188. rc16 -t $*.res $*.exe
  189. if exist *.drv del *.drv
  190. ren $*.exe $@
  191. comm.sym: $*.map
  192. mapsym $*
  193. !endif