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.

238 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. # DEFINES = -DWOW -DDEBUG $(MVDMFLAGS)
  21. !if "$(NEC_98)" == "1"
  22. DEFINES = -W2 -DNEC_98 -DKKBUGFIX -DWOW $(MVDMFLAGS) -DWINNT
  23. !else
  24. DEFINES = -DWOW $(MVDMFLAGS)
  25. !endif
  26. AOBJ = -t $(DEFINES) $(INCS)
  27. CW16 = -AS -G2sw -Os -W3 -Zp $(DEFINES) $(INCS)
  28. CW16B = $(CW16) -B1 c1l.exe -B2 c2l.exe -B3 c3l.exe
  29. RES_DIR = $(DEST)
  30. OBJ_DIR = $(DEST)
  31. LINK = /map /align:16
  32. !if !$(FREEBUILD)
  33. !if "$(NEC_98)" == "1"
  34. AOBJ = $(AOBJ) -Zi
  35. CW16 = $(CW16) /Od /Oi /Zi
  36. LINK = $(LINK) /CO
  37. !else
  38. AOBJ = $(AOBJ) -Zd
  39. CW16 = $(CW16) /Od /Oi /Zd
  40. LINK = $(LINK) /LI
  41. !endif
  42. !endif
  43. W16LIBS = ..\..\lib\snocrtd.lib
  44. .asm.obj:
  45. masm $(AOBJ) $*;
  46. !ifdef ALT_PROJECT
  47. .asm{$(OBJ_DIR)\}.obj:
  48. masm $(AOBJ) $<,$(OBJ_DIR)\;
  49. !if "$(NEC_98)" == "1"
  50. {$(OBJ_DIR)\}.asm{$(OBJ_DIR)\}.obj:
  51. masm $(AOBJ) $<,$(OBJ_DIR)\;
  52. !else
  53. {$(RES_DIR)\}.asm{$(OBJ_DIR)\}.obj:
  54. masm $(AOBJ) $<,$(OBJ_DIR)\;
  55. !endif
  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. !if "$(NEC_98)" == "1"
  71. all: $(OBJ_DIR)\neccomm.drv
  72. binplace -o $(ALT_PROJECT_TARGET) $(OBJ_DIR)\neccomm.drv $(OBJ_DIR)\neccomm.map $(OBJ_DIR)\neccomm.sym
  73. !else
  74. all: $(OBJ_DIR)\comm.drv
  75. binplace $(OBJ_DIR)\comm.drv $(OBJ_DIR)\comm.map $(OBJ_DIR)\comm.sym
  76. !endif
  77. !else
  78. all: comm.drv comm.map comm.sym comm.lrf
  79. binplace comm.drv comm.map comm.sym
  80. !endif
  81. clean: cleanup all
  82. cleanup:
  83. if exist *.lrf del *.lrf
  84. if exist *.obj del *.obj
  85. if exist *.exe del *.exe
  86. if exist *.map del *.map
  87. if exist *.sym del *.sym
  88. if exist *.drv del *.drv
  89. if exist *.res del *.res
  90. !ifdef ALT_PROJECT
  91. if exist $(OBJ_DIR)\*.lrf del $(OBJ_DIR)\*.lrf
  92. if exist $(OBJ_DIR)\*.obj del $(OBJ_DIR)\*.obj
  93. if exist $(OBJ_DIR)\*.exe del $(OBJ_DIR)\*.exe
  94. if exist $(OBJ_DIR)\*.map del $(OBJ_DIR)\*.map
  95. if exist $(OBJ_DIR)\*.sym del $(OBJ_DIR)\*.sym
  96. if exist $(OBJ_DIR)\*.drv del $(OBJ_DIR)\*.drv
  97. if exist $(OBJ_DIR)\*.res del $(OBJ_DIR)\*.res
  98. if exist $(OBJ_DIR)\*.def del $(OBJ_DIR)\*.def
  99. if exist $(OBJ_DIR)\*.asm del $(OBJ_DIR)\*.asm
  100. !endif
  101. !ifdef ALT_PROJECT
  102. $(OBJ_DIR)\ccom.obj ccom.lst: ccom.asm ibmcom.inc comdev.inc
  103. $(OBJ_DIR)\ibmsetup.obj ibmsetup.lst: ibmsetup.asm ibmcom.inc comdev.inc ins8250.inc
  104. $(OBJ_DIR)\ibmcom.obj: ibmcom.asm ibmcom.inc comdev.inc ins8250.inc
  105. $(OBJ_DIR)\ibmint.obj: ibmint.asm ibmcom.inc comdev.inc ins8250.inc
  106. $(OBJ_DIR)\ibmlpt.obj: ibmlpt.asm ibmcom.inc comdev.inc
  107. !if "$(NEC_98)" == "1"
  108. $(OBJ_DIR)\commmsg.obj: $(OBJ_DIR)\commmsg.asm
  109. $(OBJ_DIR)\commmsg.asm: commmsg.asm
  110. copy commmsg.asm $(OBJ_DIR)
  111. if exist commmsg.$(ALT_PROJECT) copy commmsg.$(ALT_PROJECT) $(OBJ_DIR)\commmsg.asm
  112. !else
  113. $(OBJ_DIR)\commmsg.obj: $(RES_DIR)\commmsg.asm
  114. $(RES_DIR)\commmsg.asm: commmsg.asm
  115. copy commmsg.asm $(OBJ_DIR)
  116. if exist commmsg.$(ALT_PROJECT) copy commmsg.$(ALT_PROJECT) $(OBJ_DIR)\commmsg.asm
  117. !endif
  118. !else
  119. ccom.obj ccom.lst: ccom.asm ibmcom.inc comdev.inc
  120. ibmsetup.obj ibmsetup.lst: ibmsetup.asm ibmcom.inc comdev.inc ins8250.inc
  121. ibmcom.obj: $*.asm $*.inc comdev.inc ins8250.inc
  122. ibmint.obj: $*.asm ibmcom.inc comdev.inc ins8250.inc
  123. ibmlpt.obj: $*.asm ibmcom.inc comdev.inc
  124. commmsg.obj: $*.asm
  125. !endif
  126. !ifdef ALT_PROJECT
  127. $(OBJ_DIR)\comm.res: comm.rc comm.rcv ..\..\inc\common.ver
  128. rc16 -r $(INCS) -fo $@ comm.rc
  129. !else
  130. comm.res: $*.rc $*.rcv ..\..\inc\common.ver
  131. !endif
  132. !ifdef ALT_PROJECT
  133. !if "$(NEC_98)" == "1"
  134. $(OBJ_DIR)\comm.lrf: makefile.sub
  135. echo ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
  136. echo neccomm.exe/align:16>>$@
  137. echo neccomm $(LINK)>>$@
  138. echo ..\..\..\..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\..\..\..\lib\snocrtd.lib ..\..\..\..\..\lib\$(DEST)\system.lib /map /nod>>$@
  139. echo comm;>>$@
  140. !else
  141. $(OBJ_DIR)\comm.lrf: makefile.sub
  142. echo ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
  143. echo comm.exe/align:16>>$@
  144. echo comm $(LINK)>>$@
  145. echo ..\..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\..\lib\snocrtd.lib /map /nod>>$@
  146. echo comm;>>$@
  147. !endif
  148. !else
  149. comm.lrf: makefile.sub
  150. echo ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
  151. echo $*.exe/align:16>>$@
  152. echo $* $(LINK)>>$@
  153. echo ..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\lib\snocrtd.lib /map /nod>>$@
  154. echo $*;>>$@
  155. !endif
  156. !ifdef ALT_PROJECT
  157. $(OBJ_DIR)\comm.def: comm.def
  158. copy comm.def $(OBJ_DIR)
  159. !endif
  160. !ifdef ALT_PROJECT
  161. !if "$(NEC_98)" == "1"
  162. $(OBJ_DIR)\neccomm.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 \
  163. $(OBJ_DIR)\comm.def $(OBJ_DIR)\comm.res $(OBJ_DIR)\comm.lrf
  164. cd $(OBJ_DIR)
  165. link16 @comm.lrf;
  166. rc16 -t comm.res neccomm.exe
  167. if exist *.drv del *.drv
  168. ren neccomm.exe *.drv
  169. mapsym neccomm
  170. cd ..\..\..
  171. !else
  172. $(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 \
  173. $*.def $*.res $*.lrf
  174. cd $(OBJ_DIR)
  175. link16 @comm.lrf;
  176. rc16 -t comm.res comm.exe
  177. if exist *.drv del *.drv
  178. ren comm.exe *.drv
  179. mapsym comm
  180. cd ..\..\..
  181. !endif
  182. !else
  183. comm.drv: ccom.obj ibmsetup.obj ibmcom.obj ibmint.obj ibmlpt.obj commmsg.obj \
  184. $*.def $*.res $*.lrf
  185. link16 @$*.lrf;
  186. rc16 -t $*.res $*.exe
  187. if exist *.drv del *.drv
  188. ren $*.exe $@
  189. comm.sym: $*.map
  190. mapsym $*
  191. !endif