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.

183 lines
5.1 KiB

  1. !include $(NTMAKEENV)\makefile.plt
  2. # Common makefile defines for DOSKRNL (NTIO.SYS and NTDOS.SYS) and utilities
  3. #
  4. # Created Sudeepb 20-Mar-1991
  5. MAKE =nmake
  6. !IFNDEF ALT_PROJECT
  7. ALT_PROJECT=usa
  8. ALT_PROJECT_TARGET=.
  9. !ENDIF
  10. msg = ..\..\messages\$(ALT_PROJECT)
  11. !if "$(PROCESSOR_ARCHITECTURE)" == "x86"
  12. DEST=$(ALT_PROJECT)\obj\i386
  13. !elseif "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
  14. DEST=$(ALT_PROJECT)\obj\alpha
  15. !endif
  16. inc =..\..\inc
  17. cinc =..\..\..\..\inc
  18. #############################################################################
  19. # #
  20. # These are the built in rules and path definitions used by the new MS Make #
  21. # Utility (NMAKE). The following variables are set externaly (ie set in the #
  22. # individual makefiles. #
  23. # #
  24. # extasw = The 'extra assembly switch' variable is optionaly used in the #
  25. # makefile to specify special MASM command line switches. #
  26. # #
  27. # extcsw = The 'extra C switch' variable is optionaly used in the makefile #
  28. # to specify special C compiler command line switches. #
  29. # #
  30. # inc = The include file search path from the utility being built to the #
  31. # INC directory. Used if needed. #
  32. # #
  33. # hinc = The include file search path from the utility being built to the #
  34. # H directory. Used if needed for C source compilation. #
  35. # #
  36. #############################################################################
  37. ########## Definitions for the Assembler #####
  38. ########## awarn can be overridden by placing #####
  39. ########## the new warning level in extasw #####
  40. ########## in the makefile #####
  41. asm =masm386
  42. awarn =-W1
  43. !if "$(ALT_PROJECT)" == "JPN" || "$(ALT_PROJECT)" == "KOR"
  44. aflags =-Mx -t $(awarn) $(extasw) $(DBCS_FLAGS) -DBILINGUAL
  45. !else
  46. aflags =-Mx -t $(awarn) $(extasw) $(DBCS_FLAGS)
  47. !endif
  48. ainc =-I. -I..\..\inc -I..\..\..\..\inc -I$(msg) -I$(DEST)
  49. ########## Definitions for C compiler #####
  50. ########## cwarn can be overridden by placing #####
  51. ########## the new warning level in extcsw #####
  52. ########## in the makefile #####
  53. cc =cl16
  54. cwarn =-W3
  55. cflags =-Os -Zp $(cwarn) $(extcsw) $(DBCS_FLAGS) /Zl
  56. incc =-I. -I..\..\h
  57. ########## Definitions for linker ##########
  58. link_opts = /MAP
  59. LINK =link16
  60. exelink =/E
  61. ########## Definitions for compress ##########
  62. compress =compress
  63. ########## Path definition so we find 16 bit tools ##########
  64. # Also works around bug in RC 3.1 that doesn't allow rcpp.err to be
  65. # in a directory that is greater than 128 chars down the path, even if
  66. # rc 3.1 is running as an OS/2 app.
  67. PATH = $(BASEDIR)\tools\tools16;$(PATH)
  68. ########## Built-in rules ##########
  69. .SUFFIXES:
  70. .SUFFIXES: .c .obj .lst .exe .exc .exs .com .sal .cod .sil .inc .skl .cla .cl1 .ctl .asm .idx .msg
  71. .sal.asm:
  72. salut $*.sal,nul,$*.asm
  73. .asm{$(DEST)}.obj:
  74. $(asm) $(ainc) $(aflags) $(<F),$*.obj;
  75. .asm{$(DEST)}.lst:
  76. $(asm) -l $(ainc) $(aflags) $(<F),$*.obj;
  77. .asm{$(DEST)}.obj:
  78. $(asm) $(ainc) $(aflags) $<,$*.obj;
  79. .asm{$(DEST)}.lst:
  80. $(asm) -l $(ainc) $(aflags) $<,$*.obj;
  81. .asm.obj:
  82. $(asm) $(ainc) $(aflags) $*.asm;
  83. .asm.lst:
  84. $(asm) -l $(ainc) $(aflags) $*.asm;
  85. .c{$(DEST)}.obj:
  86. $(cc) -c $(incc) $(cflags) -Fo$*.obj $<
  87. .c{$(DEST)}.lst:
  88. $(cc) -c $(incc) $(cflags) -Fc$*.cod -Fo$*.obj $<
  89. .c{$(DEST)}.obj:
  90. $(cc) -c $(incc) $(cflags) -Fo$*.obj $<
  91. .c{$(DEST)}.lst:
  92. $(cc) -c $(incc) $(cflags) -Fc$*.cod -Fo$*.obj $<
  93. .c.obj:
  94. $(cc) -c $(incc) $(cflags) $*.c
  95. .c.lst:
  96. $(cc) -c $(incc) $(cflags) -fc$*.cod -fo$*.obj $*.c
  97. {$(DEST)}.exs{$(DEST)}.sys:
  98. copy $*.exs $*.exe
  99. reloc $* $*.sys
  100. del $*.exe
  101. {$(DEST)}.exc{$(DEST)}.com:
  102. copy $*.exc $*.exe
  103. reloc $* $*.com
  104. del $*.exe
  105. .exs.sys:
  106. copy $*.exs $*.exe
  107. reloc $* $*.sys
  108. del $*.exe
  109. .exc.com:
  110. copy $*.exc $*.exe
  111. reloc $* $*.com
  112. del $*.exe
  113. .exe.com:
  114. convert $*.exe
  115. {$(ALT_PROJECT)}.skl{$(DEST)}.cl1:
  116. cd $(DEST)
  117. copy ..\..\$(<F)
  118. -nosrvbld $(<F) ..\..\..\$(msg)\$(ALT_PROJECT).msg
  119. -nosrvbld $(<F) ..\..\..\$(msg)\$(ALT_PROJECT).msg
  120. erase $(<F)
  121. cd ..\..\..
  122. {$(ALT_PROJECT)}.skl{$(DEST)}.ctl:
  123. cd $(DEST)
  124. buildmsg ..\..\..\$(msg)\$(ALT_PROJECT) ..\..\$(<F)
  125. cd ..\..\..
  126. {$(ALT_PROJECT)}.skl{$(DEST)}.cla:
  127. cd $(DEST)
  128. buildmsg ..\..\..\$(msg)\$(ALT_PROJECT) ..\..\$(<F)
  129. cd ..\..\..
  130. .sil.inc:
  131. salut $*.sil,nul,$*.inc
  132. .sal.obj:
  133. salut $*.sal,nul,$*.asm
  134. $(asm) $(aflags) $(ainc) $*.asm,$*.obj;
  135. .msg.idx:
  136. chmode -r $*.msg
  137. buildidx $*.msg
  138. chmode +r $*.msg