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.

241 lines
4.8 KiB

  1. # File: D:\WACKER\common.mki (Created: 23-Nov-1993)
  2. #
  3. # Copyright 1993 by Hilgraeve Inc. -- Monroe, MI
  4. # All rights reserved
  5. #
  6. # $Revision: 1.12 $
  7. # $Date: 1998/07/21 15:14:41 $
  8. #
  9. #-------------------#
  10. all : makefile TARGETS
  11. #-------------------#
  12. # Shell commands use & instead of ; under NT
  13. #
  14. %if $(OS) == NT
  15. ;=&
  16. %else
  17. ;=;
  18. %endif
  19. #-------------------#
  20. VERSION = WIN_DEBUG
  21. MACHINE = i386
  22. SUBSYSTEM = WINDOWS,4.0
  23. LANG = USA
  24. #-------------------#
  25. %if ${LANG} == JAPANESE
  26. CHAR_ENBL = MBCS
  27. %else
  28. CHAR_ENBL = .
  29. %endif
  30. #-------------------#
  31. %if ${LANG} == USA
  32. TAGFILE = usa.tag
  33. %elseif ${LANG} == JAPANESE
  34. TAGFILE = japan.tag
  35. %else
  36. %abort [LANG=USA (default) | JAPANESE ]
  37. %endif
  38. #-------------------#
  39. %if %exists(.\personal.cfg)
  40. %include .\personal.cfg
  41. @echo including .\personal.cfg...
  42. EXTRA_RC_DEFS = $(EXTRA_DEFS)
  43. %else
  44. %if %exists(..\personal.cfg)
  45. %include ..\personal.cfg
  46. @echo including ..\personal.cfg...
  47. EXTRA_RC_DEFS = $(EXTRA_DEFS)
  48. %endif
  49. %endif
  50. #-------------------#
  51. %if "${EXE_DIR}" == ""
  52. EXE_DIR = ..\EXE
  53. %endif
  54. WIN_D = $(EXE_DIR)\WIN.DBG
  55. WIN_R = $(EXE_DIR)\WIN.REL
  56. #-------------------#
  57. # Options build .pdb with debug info for debug & release builds. Simplifies
  58. # use of profilers, analyzers etc.
  59. CBASE = /nologo \
  60. /Zi \
  61. /W3 \
  62. /J \
  63. /Gz \
  64. /Gf \
  65. /Fo$(BD)/ \
  66. /I. \
  67. /I..\nih \
  68. /I.. \
  69. /D_WINDOWS \
  70. /D_WIN32 \
  71. /DSTRICT \
  72. /D$(BLD_VER) \
  73. /DNO_SMARTHEAP \
  74. /DEXCLUDE_PLATFORM_HEADER \
  75. /D$(LANG) \
  76. /YX \
  77. /Fp$(BD)\windows.pch \
  78. $(EXTRA_DEFS)
  79. %if defined(PLATFORM_SDK_INSTALLED)
  80. CBASE += /DISOLATION_AWARE_ENABLED /DINCL_USE_NEWPRINTDLG
  81. %endif
  82. CRELEASE = /O1 /MD /GB /Gs /DNDEBUG $(CBASE)
  83. CDEBUG = /MDd /D_DEBUG /Od $(CBASE)
  84. #-------------------#
  85. MAP_OPTIONS = /MAP
  86. # note: leave /DEBUG on for both release and debug builds so profilers, analyzers etc. work
  87. LBASE = /SUBSYSTEM:$(SUBSYSTEM) /MACHINE:$(MACHINE) /NOLOGO \
  88. /INCREMENTAL:NO
  89. LRELEASE = $(LBASE) /RELEASE /MAP /OPT:REF
  90. LDEBUG = $(LBASE) /DEBUG
  91. LDEBUGEXT = $(LBASE) /DEBUG
  92. LINKER_FLAGS = $(LINKER_FLAGS) -ignore:4049,4217
  93. #-------------------#
  94. %if $(VERSION) == WIN_DEBUG
  95. RC_DEFS = /DDEBUG $(EXTRA_RC_DEFS)
  96. CFLAGS = $(CDEBUG)
  97. LFLAGS = $(LDEBUG)
  98. BASE_BD = $(WIN_D)
  99. BD = $(WIN_D)\$(CHAR_ENBL)
  100. BLD_VER = WIN_VERSION
  101. %elseif $(VERSION) == WIN_RELEASE
  102. RC_DEFS = /DNDEBUG $(EXTRA_RC_DEFS)
  103. CFLAGS = $(CRELEASE)
  104. LFLAGS = $(LRELEASE)
  105. BASE_BD = $(WIN_R)
  106. BD = $(WIN_R)\$(CHAR_ENBL)
  107. BLD_VER = WIN_VERSION
  108. %else
  109. %abort VERSION macro defined to unknown type.
  110. %endif
  111. # if you want to generate map and symbol files, define the MAP_AND_SYMBOLS
  112. # macro in your personal.cfg file or on the omake command line
  113. #
  114. %if defined(MAP_AND_SYMBOLS)
  115. LFLAGS += $(MAP_OPTIONS)
  116. %endif
  117. # --- Tell omake where to put built objects --- #
  118. .PATH.obj=$(BD)
  119. .PATH.lib=$(BD)
  120. .PATH.exp=$(BD)
  121. .PATH.dll=$(BD)
  122. .PATH.exe=$(BD)
  123. .PATH.res=$(BD)
  124. .PATH.sbr=$(BD)
  125. .PATH.bsc=$(BD)
  126. .PATH.sym=$(BD)
  127. .PATH.map=$(BD)
  128. # --- Some programs need all the memory they can get --- #
  129. .MEMSWAP: mapsym
  130. # --- Win32 tools use different response file formats --- #
  131. .RESPONSE.LINK:
  132. .RESPONSE.LIB:
  133. .RESPONSE.STD: link lib bscmake
  134. # --- Inference rule used to build all C files --- #
  135. %.obj .SILENT : %.c
  136. $(CC) $(CFLAGS) /c {$(<,A) }
  137. %.obj .SILENT : %.cpp
  138. $(CC) $(CFLAGS) /c {$(<,A) }
  139. # --- Inference rule to build import libraries --- #
  140. %.lib + %.exp .SILENT : %.def
  141. lib -def:$< -machine:$(MACHINE) -subsystem:$(SUBSYSTEM) -out:$(@,1)
  142. # --- Inference rule to build makefiles --- #
  143. %makefile : %makefile.t
  144. mkmf -t makefile.t
  145. %restart
  146. #-------------------#
  147. .BEFORE :
  148. # %if !%exists(.\rcsctrl)
  149. # %abort Must have an rcsctrl file!
  150. # %endif
  151. #
  152. # %if %writable(.\rcsctrl)
  153. # %abort *** rcsctrl is not read-only. ***
  154. # %endif
  155. #
  156. # %if %exists(.\fromrcs.zip) && $(FIRSTTARGET) != fromrcs
  157. # %abort *** fromrcs.zip exists. Type OMAKE FROMRCS ***
  158. # %endif
  159. #
  160. %if !%exists($(EXE_DIR))
  161. -mkdir $(EXE_DIR)
  162. %endif
  163. %if !%exists($(BASE_BD))
  164. -mkdir $(BASE_BD)
  165. %endif
  166. %if ${CHAR_ENBL} != .
  167. %if !%exists($(BASE_BD)\$(CHAR_ENBL))
  168. -mkdir $(BASE_BD)\$(CHAR_ENBL)
  169. %endif
  170. %endif
  171. #-------------------#
  172. callmake :
  173. %chdir $(dir)
  174. %if !%exists(makefile) || %time(makefile) < %time(makefile.t)
  175. mkmf -t makefile.t
  176. %endif
  177. $(MAKE) $(MFLAGS) $(MAKEMACROS) $(TARGET)
  178. %chdir ..
  179. #-------------------#
  180. #
  181. #\wacker\rcsctrl .NOINFER : $(RCSFILES,N\\shared\\classes\\win32.+)
  182. # @echo .
  183. # @echo . Archiving $(CWD)
  184. # @echo .
  185. # %foreach file in $?
  186. # echo $(file,\wacker=.) >>\pkzip.rsp
  187. # %end
  188. #
  189. #-------------------#