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.8 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. !ifdef INCLUDE
  16. INCS =
  17. !else
  18. INCS = -I..\..\inc -I..\..\..\inc
  19. !endif
  20. !if "$(NEC_98)" == "1"
  21. DEFINES = -W2 -DNEC_98 -DKKBUGFIX -DWOW $(MVDMFLAGS) -DWINNT
  22. !else
  23. DEFINES = -DWOW $(MVDMFLAGS)
  24. !endif
  25. AOBJ = -t $(DEFINES) $(INCS)
  26. CW16 = -AS -G2sw -Os -W3 -Zp $(DEFINES) $(INCS)
  27. CW16B = $(CW16) -B1 c1l.exe -B2 c2l.exe -B3 c3l.exe
  28. !ifdef ALT_PROJECT
  29. RES_DIR = $(DEST)
  30. OBJ_DIR = $(DEST)
  31. !endif
  32. LINK = /map /align:16
  33. !if !$(FREEBUILD)
  34. !if "$(NEC_98)" == "1"
  35. AOBJ = $(AOBJ) -Zi
  36. CW16 = $(CW16) /Od /Oi /Zi
  37. LINK = $(LINK) /CO
  38. !else
  39. AOBJ = $(AOBJ) -Zd
  40. CW16 = $(CW16) /Od /Oi /Zd
  41. LINK = $(LINK) /LI
  42. !endif
  43. !endif
  44. W16LIBS = ..\..\lib\snocrtd.lib
  45. .asm.obj:
  46. masm $(AOBJ) $*;
  47. !ifdef ALT_PROJECT
  48. .asm{$(OBJ_DIR)\}.obj:
  49. masm $(AOBJ) $<,$(OBJ_DIR)\;
  50. !if "$(NEC_98)" == "1"
  51. {$(OBJ_DIR)\}.asm{$(OBJ_DIR)\}.obj:
  52. masm $(AOBJ) $<,$(OBJ_DIR)\;
  53. !else
  54. {$(RES_DIR)\}.asm{$(OBJ_DIR)\}.obj:
  55. masm $(AOBJ) $<,$(OBJ_DIR)\;
  56. !endif
  57. !endif
  58. .asm.lst:
  59. masm $(AOBJ) -l $*,nul,$*.lst;
  60. .c.obj:
  61. cl16 -c -nologo $(CW16) $*.c
  62. .c.lst:
  63. cl16 -c -nologo $(CW16) -Fonul -Fc$*.lst $*.c
  64. .def.lib:
  65. implib $*.lib $*.def
  66. .map.sym:
  67. mapsym $*
  68. .rc.res:
  69. rc16 -r $(INCS) -fo $@ $*.rc
  70. !ifdef ALT_PROJECT
  71. !if "$(NEC_98)" == "1"
  72. all: makedir $(OBJ_DIR)\nec2comm.drv
  73. binplace -o $(ALT_PROJECT_TARGET) $(OBJ_DIR)\nec2comm.drv $(OBJ_DIR)\nec2comm.map $(OBJ_DIR)\nec2comm.sym
  74. !else
  75. all: makedir $(OBJ_DIR)\comm.drv
  76. binplace $(OBJ_DIR)\comm.drv $(OBJ_DIR)\comm.map $(OBJ_DIR)\comm.sym
  77. !endif
  78. makedir:
  79. @-if not exist $(OBJ_DIR) md $(OBJ_DIR)
  80. !else
  81. all: comm.drv comm.map comm.sym comm.lrf
  82. binplace comm.drv comm.map comm.sym
  83. !endif
  84. clean: cleanup all
  85. cleanup:
  86. if exist *.lrf del *.lrf
  87. if exist *.obj del *.obj
  88. if exist *.exe del *.exe
  89. if exist *.map del *.map
  90. if exist *.sym del *.sym
  91. if exist *.drv del *.drv
  92. if exist *.res del *.res
  93. !ifdef ALT_PROJECT
  94. if exist $(OBJ_DIR)\*.lrf del $(OBJ_DIR)\*.lrf
  95. if exist $(OBJ_DIR)\*.obj del $(OBJ_DIR)\*.obj
  96. if exist $(OBJ_DIR)\*.exe del $(OBJ_DIR)\*.exe
  97. if exist $(OBJ_DIR)\*.map del $(OBJ_DIR)\*.map
  98. if exist $(OBJ_DIR)\*.sym del $(OBJ_DIR)\*.sym
  99. if exist $(OBJ_DIR)\*.drv del $(OBJ_DIR)\*.drv
  100. if exist $(OBJ_DIR)\*.res del $(OBJ_DIR)\*.res
  101. if exist $(OBJ_DIR)\*.def del $(OBJ_DIR)\*.def
  102. if exist $(OBJ_DIR)\*.asm del $(OBJ_DIR)\*.asm
  103. !endif
  104. !ifdef ALT_PROJECT
  105. $(OBJ_DIR)\ccom.obj ccom.lst: ccom.asm ibmcom.inc comdev.inc
  106. $(OBJ_DIR)\ibmsetup.obj ibmsetup.lst: ibmsetup.asm ibmcom.inc comdev.inc ins8250.inc
  107. $(OBJ_DIR)\ibmcom.obj: ibmcom.asm ibmcom.inc comdev.inc ins8250.inc
  108. $(OBJ_DIR)\ibmint.obj: ibmint.asm ibmcom.inc comdev.inc ins8250.inc
  109. $(OBJ_DIR)\ibmlpt.obj: ibmlpt.asm ibmcom.inc comdev.inc
  110. !if "$(NEC_98)" == "1"
  111. $(OBJ_DIR)\commmsg.obj: $(OBJ_DIR)\commmsg.asm
  112. $(OBJ_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. !else
  116. $(OBJ_DIR)\commmsg.obj: $(RES_DIR)\commmsg.asm
  117. $(RES_DIR)\commmsg.asm: commmsg.asm
  118. copy commmsg.asm $(OBJ_DIR)
  119. if exist commmsg.$(ALT_PROJECT) copy commmsg.$(ALT_PROJECT) $(OBJ_DIR)\commmsg.asm
  120. !endif
  121. !else
  122. ccom.obj ccom.lst: ccom.asm ibmcom.inc comdev.inc
  123. ibmsetup.obj ibmsetup.lst: ibmsetup.asm ibmcom.inc comdev.inc ins8250.inc
  124. ibmcom.obj: $*.asm $*.inc comdev.inc ins8250.inc
  125. ibmint.obj: $*.asm ibmcom.inc comdev.inc ins8250.inc
  126. ibmlpt.obj: $*.asm ibmcom.inc comdev.inc
  127. commmsg.obj: $*.asm
  128. !endif
  129. !ifdef ALT_PROJECT
  130. $(OBJ_DIR)\comm.res: comm.rc comm.rcv ..\..\inc\common.ver
  131. rc16 -r $(INCS) -fo $@ comm.rc
  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 ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
  139. echo nec2comm.exe/align:16>>$@
  140. echo nec2comm $(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)\nec2comm.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 \
  166. $(OBJ_DIR)\comm.def $(OBJ_DIR)\comm.res $(OBJ_DIR)\comm.lrf
  167. cd $(OBJ_DIR)
  168. link16 @comm.lrf;
  169. rc16 -t comm.res nec2comm.exe
  170. if exist *.drv del *.drv
  171. ren nec2comm.exe *.drv
  172. mapsym nec2comm
  173. cd ..\..\..
  174. !else
  175. $(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 \
  176. $*.def $*.res $*.lrf
  177. cd $(OBJ_DIR)
  178. link16 @comm.lrf;
  179. rc16 -t comm.res comm.exe
  180. if exist *.drv del *.drv
  181. ren comm.exe *.drv
  182. mapsym comm
  183. cd ..
  184. !endif
  185. !else
  186. comm.drv: ccom.obj ibmsetup.obj ibmcom.obj ibmint.obj ibmlpt.obj commmsg.obj \
  187. $*.def $*.res $*.lrf
  188. link16 @$*.lrf;
  189. rc16 -t $*.res $*.exe
  190. if exist *.drv del *.drv
  191. ren $*.exe $@
  192. comm.sym: $*.map
  193. mapsym $*
  194. !endif