Leaked source code of windows server 2003
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.

115 lines
2.5 KiB

  1. #
  2. # constructs mmtask as a small model exe
  3. #
  4. !INCLUDE ..\..\makefile.inc
  5. NAME =mmtask
  6. EXT =tsk
  7. !if "$(DEBUG)" == "NO"
  8. CLOPT =-Oas
  9. MASMOPT =-I..\..\inc
  10. LINKOPT =
  11. RCOPT =
  12. !else
  13. !if "$(DEBUG)" == "RETAIL"
  14. CLOPT =-Oas
  15. MASMOPT =-I..\..\inc
  16. LINKOPT =
  17. RCOPT =
  18. !else
  19. CLOPT =-Od -Zi -DDEBUG
  20. MASMOPT =-Zi -t -I..\..\inc
  21. LINKOPT =/LI/NOPACKCODE
  22. RCOPT =-DDEBUG
  23. !endif
  24. !endif
  25. CC =$(CL) -c -nologo -Asnw -G2sw -Zp -W2 $(CLOPT)
  26. RC =$(RC) -i ..\..\inc;..\rinc
  27. ASM =$(ASM) -Mx -D?QUIET $(MASMOPT)
  28. LINK =$(LINK) /NOD/NOE/MAP/A:16$(LINKOPT)
  29. DEFFILE =$(NAME).DEF
  30. OBJ =$(NAME).obj
  31. LIBS =..\..\lib\$(ALT_PROJECT)\libw
  32. .SUFFIXES: .asm
  33. .c.obj:
  34. $(CC) $*.c
  35. .asm.obj:
  36. echo $(@B).asm
  37. $(ASM) $*;
  38. !IFNDEF LANG
  39. all: ..\$(NAME).$(EXT) ..\$(NAME).sym ..\$(NAME).map
  40. !ELSE
  41. all: $(NAME).$(LANG)
  42. !ENDIF
  43. $(NAME).$(EXT) $(NAME).map: $(OBJ) $(DEFFILE) $(NAME).res
  44. $(LINK) $(OBJ), $(NAME).$(EXT),,$(LIBS), $(DEFFILE)
  45. $(RC) -t $(NAME).res $(NAME).$(EXT)
  46. ..\$(NAME).$(EXT): $$(@F)
  47. copy $(@F) $@
  48. ..\$(NAME).sym: $$(@R).$(EXT) $$(@F)
  49. copy $(@F) $@
  50. ..\$(NAME).map: $$(@R).$(EXT) $$(@F)
  51. copy $(@F) $@
  52. $(NAME).sym: $$(@B).map
  53. mapsym /n $*.map
  54. ################### International mods ###############################
  55. # note INTL_SRC ,INTL_EXE and LANG are external macros set by international
  56. !IFNDEF LANG
  57. RES_DIR =..\messages\usa
  58. !ELSE
  59. RES_DIR =$(INTL_SRC)\$(ALT_PROJECT)\mmsystem\mmtask
  60. EXE_DIR =$(INTL_EXE)
  61. !ENDIF
  62. !IFNDEF LANG
  63. $(NAME).rc: $(RES_DIR)\$(NAME).rc
  64. copy $(RES_DIR)\$(NAME).rc
  65. $(NAME).rcv: $(RES_DIR)\$$(@F) ..\..\inc\common.ver
  66. copy $(RES_DIR)\$@
  67. touch $@
  68. $(NAME).res: $(NAME).rc $(NAME).h $(NAME).rcv ..\..\inc\common.ver
  69. $(RC) $(RCOPT) -r $(NAME).rc
  70. !ELSE
  71. $(NAME).res:
  72. copy $(RES_DIR)\$(NAME).res
  73. !ENDIF
  74. $(NAME).$(LANG): $(NAME).res
  75. copy $(EXE_DIR)\$(NAME).$(EXT) $(NAME).$(LANG)
  76. $(RC) -t $(NAME).res $(NAME).$(LANG)
  77. ########################################################################
  78. clean: cleanup all
  79. cleanup:
  80. -del $(NAME).$(EXT) $(NAME).res *.sym *.map *.obj *.rcv *.rc 2>nul
  81. depend:
  82. mv makefile makefile.old
  83. sed "/^# START Dependencies/,/^# END Dependencies/D" makefile.old > makefile
  84. del makefile.old
  85. echo # START Dependencies >> makefile
  86. includes -l *.c *.asm >> makefile
  87. echo # END Dependencies >> makefile
  88. # START Dependencies
  89. mmtask.obj: mmtask.asm
  90. # END Dependencies