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.

155 lines
3.6 KiB

  1. #
  2. # constructs timer.drv
  3. #
  4. # Defines:
  5. # DEBUG - Enable debug code
  6. # STRICT - Build a version with STRICT enabled
  7. #
  8. NAME =timer
  9. EXT =drv
  10. !include ..\makefile.inc
  11. OBJFIRST=$(DEST)\libinit.obj
  12. OBJ1 =$(DEST)\timer.obj $(DEST)\local.obj $(DEST)\startend.obj $(DEST)\api.obj $(DEST)\math.obj
  13. OBJ =$(OBJ1)
  14. LIBS =..\lib\$(ALT_PROJECT)\libw ..\lib\mdllcew ..\lib\$(DEST)\mmsystem
  15. INCS = -I. -I..\inc -I..\..\inc
  16. OPT = -Oxws
  17. #
  18. # build a retail build
  19. #
  20. INCLUDES=..\inc;.\rinc;..\..\inc;$(SDK_INC_PATH)
  21. !if $(FREEBUILD)
  22. CLOPT =
  23. MASMOPT =-I..\inc -I..\..\inc
  24. LINKOPT =
  25. RC =rc16 -i..\inc
  26. OBJD =
  27. MMDEBUG =
  28. #
  29. # build a full debug build
  30. #
  31. !else
  32. CDEBUG =-Zd -Odi
  33. ADEBUG =-Zd
  34. LDEBUG =/LI
  35. CLOPT =$(CDEBUG) -DDEBUG
  36. MASMOPT =$(ADEBUG) -DDEBUG -I..\inc -I..\..\inc
  37. LINKOPT =$(LDEBUG)
  38. RC =rc16 -DDEBUG -i..\inc -i..\mmsystem\rinc
  39. OBJD =
  40. MMDEBUG = DEBUG=1
  41. !endif
  42. Z=$(ALT_PROJECT)\$(O)^\
  43. .SUFFIXES: .asm
  44. !if "$(STRICT)" == "YES"
  45. TYPES =-DSTRICT
  46. !else
  47. TYPES =
  48. !endif
  49. CLOPT =$(CLOPT) $(DBCS_FLAGS)
  50. MASMOPT=$(MASMOPT) $(DBCS_FLAGS)
  51. ASM = masm -Mx -t -D?QUIET $(MASMOPT)
  52. LINK = $(LINK16) /NOD/NOE/MAP/ALIGN:16 $(LINKOPT)
  53. all: $(DEST)\$(NAME).$(EXT) $(DEST)\$(NAME).sym
  54. $(DEST)\libinit.obj : libinit.asm
  55. $(ASM) -DSEGNAME=_TEXT $(@B).asm, $*.obj;
  56. $(DEST)\timer.obj : timer.asm
  57. $(ASM) -DSEGNAME=_TEXT $(@B).asm, $*.obj;
  58. $(DEST)\local.obj : local.asm
  59. $(ASM) -DSEGNAME=_TEXT $(@B).asm, $*.obj;
  60. $(DEST)\startend.obj : startend.asm
  61. $(ASM) -DSEGNAME=_TEXT $(@B).asm, $*.obj;
  62. $(DEST)\api.obj : api.asm
  63. $(ASM) -DSEGNAME=_TEXT $(@B).asm, $*.obj;
  64. $(DEST)\math.obj : math.asm
  65. $(ASM) -DSEGNAME=_TEXT $(@B).asm, $*.obj;
  66. ###################################
  67. $(DEST)\$(NAME).$(EXT): $(OBJFIRST) $(OBJ) $(NAME).def $(DEST)\$(NAME).res
  68. $(LINK) @<<
  69. $(OBJFIRST) +
  70. $(OBJ1),
  71. $(DEST)\$(NAME).$(EXT),
  72. $(DEST)\$(NAME),
  73. $(LIBS),
  74. $(NAME).def
  75. <<
  76. $(RC) -t $(DEST)\$(NAME).res $(DEST)\$(NAME).$(EXT)
  77. @mapsym /n -o $*.sym $*.map
  78. -binplace -o $(ALT_PROJECT_TARGET) $(DEST)\timer.drv $(DEST)\timer.map $(DEST)\timer.sym
  79. RES_DIR =.\messages\usa
  80. $(DEST)\$(NAME).rc: $(RES_DIR)\$(NAME).rc
  81. @copy $(RES_DIR)\$(NAME).rc $@
  82. $(DEST)\$(NAME).rcv: $(RES_DIR)\$(NAME).rcv
  83. @copy $(RES_DIR)\$(NAME).rcv $@
  84. $(DEST)\$(NAME).res: $(DEST)\$(NAME).rc $(DEST)\$(NAME).rcv ..\inc\common.ver
  85. set INCLUDE=$(INCLUDES)
  86. $(RC) -r -fo$@ $(DEST)\$(NAME).rc
  87. ############## clean ##############
  88. clean: cleanup all
  89. cleanup:
  90. !IF "$(NEC_98)" == "1"
  91. if exist $Z$(NAME).$(EXT) del $Z$(NAME).$(EXT)
  92. if exist $Z$(NAME).res del $Z$(NAME).res
  93. if exist $Z*.sym del $Z*.sym
  94. if exist $Z*.map del $Z*.map
  95. if exist $Z*.lib del $Z*.lib
  96. if exist $Z*.cod del $Z*.cod
  97. if exist $Z*.obj del $Z*.obj
  98. if exist $Z*.rcv del $Z*.rcv
  99. if exist $Z*.rc del $Z*.rc
  100. !ELSE
  101. if exist $(NAME).$(EXT) del $(NAME).$(EXT)
  102. if exist $(NAME).res del $(NAME).res
  103. if exist *.sym del *.sym
  104. if exist *.map del *.map
  105. if exist *.lib del *.lib
  106. if exist $Z*.cod del $Z*.cod
  107. if exist $Z*.obj del $Z*.obj
  108. if exist *.rcv del *.rcv
  109. if exist *.rc del *.rc
  110. !ENDIF
  111. # START Dependencies
  112. $(DEST)\api.obj: api.asm timer.inc
  113. $(DEST)\libinit.obj: libinit.asm timer.inc
  114. $(DEST)\local.obj: local.asm timer.inc
  115. $(DEST)\startend.obj: startend.asm timer.inc
  116. $(DEST)\timer.obj: timer.asm timer.inc
  117. # END Dependencies