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.

143 lines
4.2 KiB

  1. ####
  2. #crt32.def - definitions for the crt32 build
  3. #
  4. # Copyright (c) 1991-2000, Microsoft Corporation. All rights reserved.
  5. #
  6. #Purpose:
  7. # This file is included in the 'sources' files in this tree
  8. #
  9. # Key to CRT32 environment variables:
  10. #
  11. # CRTLIBDEBUG = debug flag (define for debug libs)
  12. # CRTLIBTYPE = [dll/mt/st], dll = dynalink, mt = multithread,
  13. # st = singlethread
  14. #
  15. # [Other variables are used directly by the NT build tool.]
  16. #
  17. #Revision History:
  18. # 09-29-91 JCR File created.
  19. # 10-04-91 JCR Added mt vs st build
  20. # 01-06-92 GJF Added DLL support. Cleaned up a bit.
  21. # 04-16-92 DJM POSIX support.
  22. # 08-28-92 GJF Fixed POSIX support.
  23. # 09-02-92 SRW Removed -D_INTL from all versions until
  24. # Win32 NLS API calls are faster. When that
  25. # happens, add it back to all but Posix version.
  26. # 12-03-92 KRS Added optional _MBCS defines.
  27. # 05-22-93 SRW Compile runtines with no debug info except globals.
  28. # 06-03-93 SRW Okay to allow FPO now, as crt32\startup\mlock.c has
  29. # been fixed to explicitly disable FPO for itself.
  30. # 10-18-93 SRW Disable intrinsics on Alpha
  31. # 01-18-94 GJF Picked up _MB_MAP_DIRECT from crtwin32\crt32.def.
  32. # Picked up _NTSYSTEM_ from crt32\crt32.def (source
  33. # tree on \\orville\razzle).
  34. # 09-06-94 CFW Remove MTHREAD, _INTL, _CRTHEAP_, and _MBCS_OS definitions.
  35. # 03-19-01 BWT Add LTCG rules and fix C_DEFINES macro from NT tree
  36. #
  37. ################################################################################
  38. # The CRT can't be built with link-time code generation because of
  39. # LNK1237: "code gen introduced reference to non-native symbol" for intrinsics.
  40. FORCENATIVEOBJECT = 1
  41. NTLEGO=1
  42. LINKER_FLAGS=-ignore:4006
  43. LIBRARIAN_FLAGS=-ignore:4006
  44. MSC_WARNING_LEVEL=/W3 /WX
  45. !if "$(LANGAPI)" == ""
  46. # Assume at the same level as crtroot.
  47. LANGAPI = ..\..\..\langapi
  48. !endif
  49. INCLUDES=..\h;..\..\h;..\$(TARGET_DIRECTORY);$(PROJECT_ROOT)\ntos\inc
  50. CONDITIONAL_INCLUDES = dosx32.h \
  51. except.h \
  52. undname.inl
  53. 386_STDCALL=0
  54. !ifndef BUILD_DEBUG_CRTS
  55. DEBUG_CDEFINE = -DNDEBUG
  56. D=
  57. !else
  58. DEBUG_CDEFINE = -D_DEBUG
  59. D=d
  60. !endif
  61. TARGETTYPE=LIBRARY
  62. TARGETPATH=obj
  63. !IF "$(CRTLIBTYPE)" == "DLL" || "$(CRTLIBTYPE)" == "DLLLIB"
  64. TARGETNAMESUFFIX=dll
  65. TARGETTYPE=LIBRARY
  66. !if "$(CRTLIBTYPE)" == "DLLLIB"
  67. MTOPTION=-D_MT -D_DLL -DCRTDLL
  68. !else
  69. MTOPTION=-D_MT -DCRTDLL -D_CRTIMP=
  70. !endif
  71. ASM_DEFINES1=-D_WIN32
  72. C_DEFINES1=$(DEBUG_CDEFINE)
  73. IA64_OPTIMIZATION=/O1 # Workaround until crtw32\eh\frame.cpp can build /Oxs or /Oxt
  74. !ELSEIF "$(CRTLIBTYPE)" == "MT"
  75. TARGETNAMESUFFIX=mt
  76. TARGETTYPE=LIBRARY
  77. MTOPTION=-D_MT
  78. ASM_DEFINES1=-D_WIN32
  79. C_DEFINES1=$(DEBUG_CDEFINE)
  80. IA64_OPTIMIZATION=/O1 # Workaround until crtw32\eh\frame.cpp can build /Oxs or /Oxt
  81. !ELSEIF "$(CRTLIBTYPE)" == "ST"
  82. TARGETNAMESUFFIX=
  83. TARGETTYPE=LIBRARY
  84. MTOPTION=
  85. ASM_DEFINES1=-D_WIN32
  86. C_DEFINES1=$(DEBUG_CDEFINE)
  87. IA64_OPTIMIZATION=/O1 # Workaround until crtw32\eh\frame.cpp can build /Oxs or /Oxt
  88. !ELSEIF "$(CRTLIBTYPE)" == "STP"
  89. TARGETNAMESUFFIX=stp
  90. TARGETTYPE=LIBRARY
  91. MTOPTION=
  92. ASM_DEFINES1=-D_WIN32
  93. C_DEFINES1=$(DEBUG_CDEFINE)
  94. !ELSEIF "$(CRTLIBTYPE)" == "NT"
  95. TARGETNAMESUFFIX=nt
  96. TARGETTYPE=LIBRARY
  97. MTOPTION=
  98. C_DEFINES1=-D_NTSUBSET_ -D_NTSYSTEM_
  99. ASM_DEFINES1=-D_NTSUBSET_ -D_NTSYSTEM_ -D_WIN32
  100. !ELSEIF "$(CRTLIBTYPE)" == "POSIX"
  101. TARGETNAMESUFFIX=psx
  102. TARGETTYPE=LIBRARY
  103. MTOPTION=
  104. C_DEFINES1=-D_POSIX_
  105. ASM_DEFINES1=-D_POSIX_
  106. INCLUDES=$(SDK_INC_PATH)\posix;$(INCLUDES)
  107. !ELSE
  108. !ERROR Unsupported Library CRTLIBTYPE: $(CRTLIBTYPE)
  109. !ENDIF
  110. C_DEFINES1 = $(C_DEFINES1) -DNT_BUILD -D_CRTBLD -DWINHEAP -D_SYSCRT
  111. ASM_DEFINES1 = $(ASM_DEFINES1) -DNT_BUILD -D_CRTBLD -D_SYSCRT
  112. # Standard MBCS build
  113. MBCS_DEFINES=-D_MBCS -D_MB_MAP_DIRECT -D_KANJI
  114. C_DEFINES=$(C_DEFINES) $(C_DEFINES1) $(MTOPTION) $(MBCS_DEFINES)
  115. ASM_DEFINES=$(ASM_DEFINES1) $(MTOPTION) $(MBCS_DEFINES)
  116. USE_NATIVE_EH=1
  117. # No overflow checking for the CRT
  118. BUFFER_OVERFLOW_CHECKS=0