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.

221 lines
4.3 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(\wacker\personal.cfg)
  40. %include \wacker\personal.cfg
  41. #@echo including personal.cfg...
  42. EXTRA_RC_DEFS = $(EXTRA_DEFS)
  43. %endif
  44. #-------------------#
  45. EXE_DIR = \WACKER\EXE
  46. WIN_D = $(EXE_DIR)\WIN.DBG
  47. WIN_R = $(EXE_DIR)\WIN.REL
  48. WIN_1R = $(EXE_DIR)\WIN1.REL
  49. #-------------------#
  50. # Options build .pdb with debug info for debug & release builds. Simplifies
  51. # use of profilers, analyzers etc.
  52. CBASE = /nologo \
  53. /Zi \
  54. /W3 \
  55. /J \
  56. /Gz \
  57. /Gf \
  58. /Fo$(BD)/ \
  59. /I\wacker \
  60. /I\wacker\nih \
  61. /D_WINDOWS \
  62. /D_WIN32 \
  63. /DSTRICT \
  64. /D$(BLD_VER) \
  65. /DNO_SMARTHEAP \
  66. /DEXCLUDE_PLATFORM_HEADER \
  67. /D$(LANG) \
  68. /DISOLATION_AWARE_ENABLED \
  69. /YX \
  70. /Fp$(BD)\windows.pch \
  71. $(EXTRA_DEFS)
  72. CRELEASE = /O1 /MD /GB /Gs /DNDEBUG $(CBASE)
  73. CDEBUG = /MDd /D_DEBUG /Od $(CBASE)
  74. #-------------------#
  75. MAP_OPTIONS = /MAP
  76. # note: leave /DEBUG on for both release and debug builds so profilers, analyzers etc. work
  77. LBASE = /SUBSYSTEM:$(SUBSYSTEM) /MACHINE:$(MACHINE) /NOLOGO \
  78. /INCREMENTAL:NO
  79. LRELEASE = $(LBASE) /RELEASE /MAP /OPT:REF
  80. LDEBUG = $(LBASE) /DEBUG
  81. LDEBUGEXT = $(LBASE) /DEBUG
  82. LINKER_FLAGS = $(LINKER_FLAGS) -ignore:4049,4217
  83. #-------------------#
  84. %if $(VERSION) == WIN_DEBUG
  85. RC_DEFS = /DDEBUG $(EXTRA_RC_DEFS)
  86. CFLAGS = $(CDEBUG)
  87. LFLAGS = $(LDEBUG)
  88. BD = $(WIN_D)\$(CHAR_ENBL)
  89. BLD_VER = WIN_VERSION
  90. %elseif $(VERSION) == WIN_RELEASE
  91. RC_DEFS = /DNDEBUG $(EXTRA_RC_DEFS)
  92. CFLAGS = $(CRELEASE)
  93. LFLAGS = $(LRELEASE)
  94. BD = $(WIN_R)\$(CHAR_ENBL)
  95. BLD_VER = WIN_VERSION
  96. %else
  97. %abort VERSION macro defined to unknown type.
  98. %endif
  99. # if you want to generate map and symbol files, define the MAP_AND_SYMBOLS
  100. # macro in your personal.cfg file or on the omake command line
  101. #
  102. %if defined(MAP_AND_SYMBOLS)
  103. LFLAGS += $(MAP_OPTIONS)
  104. %endif
  105. # --- Tell omake where to put built objects --- #
  106. .PATH.obj=$(BD)
  107. .PATH.lib=$(BD)
  108. .PATH.exp=$(BD)
  109. .PATH.dll=$(BD)
  110. .PATH.exe=$(BD)
  111. .PATH.res=$(BD)
  112. .PATH.sbr=$(BD)
  113. .PATH.bsc=$(BD)
  114. .PATH.sym=$(BD)
  115. .PATH.map=$(BD)
  116. # --- Some programs need all the memory they can get --- #
  117. .MEMSWAP: mapsym
  118. # --- Win32 tools use different response file formats --- #
  119. .RESPONSE.LINK:
  120. .RESPONSE.LIB:
  121. .RESPONSE.STD: link lib bscmake
  122. # --- Inference rule used to build all C files --- #
  123. %.obj .SILENT : %.c
  124. $(CC) $(CFLAGS) /c {$(<,A) }
  125. %.obj .SILENT : %.cpp
  126. $(CC) $(CFLAGS) /c {$(<,A) }
  127. # --- Inference rule to build import libraries --- #
  128. %.lib + %.exp .SILENT : %.def
  129. lib -def:$< -machine:$(MACHINE) -subsystem:$(SUBSYSTEM) -out:$(@,1)
  130. # --- Inference rule to build makefiles --- #
  131. %makefile : %makefile.t
  132. mkmf -t makefile.t
  133. %restart
  134. #-------------------#
  135. .BEFORE :
  136. # %if !%exists(\wacker\rcsctrl)
  137. # %abort Must have an rcsctrl file!
  138. # %endif
  139. #
  140. # %if %writable(\wacker\rcsctrl)
  141. # %abort *** rcsctrl is not read-only. ***
  142. # %endif
  143. #
  144. # %if %exists(\wacker\fromrcs.zip) && $(FIRSTTARGET) != fromrcs
  145. # %abort *** fromrcs.zip exists. Type OMAKE FROMRCS ***
  146. # %endif
  147. %if !%exists($(EXE_DIR))
  148. -mkdir $(EXE_DIR)
  149. %endif
  150. %if !%exists($(BD))
  151. -mkdir $(BD)
  152. %endif
  153. #-------------------#
  154. callmake :
  155. %chdir $(dir)
  156. %if !%exists(makefile) || %time(makefile) < %time(makefile.t)
  157. mkmf -t makefile.t
  158. %endif
  159. $(MAKE) $(MFLAGS) $(MAKEMACROS) $(TARGET)
  160. %chdir ..
  161. #-------------------#
  162. #
  163. #\wacker\rcsctrl .NOINFER : $(RCSFILES,N\\shared\\classes\\win32.+)
  164. # @echo .
  165. # @echo . Archiving $(CWD)
  166. # @echo .
  167. # %foreach file in $?
  168. # echo $(file,\wacker=.) >>\wacker\pkzip.rsp
  169. # %end
  170. #
  171. #-------------------#