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.

142 lines
4.0 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. !if 0
  55. !if $(FREEBUILD)
  56. DEBUG_CDEFINE = -DNDEBUG
  57. D=
  58. !else
  59. DEBUG_CDEFINE = -D_DEBUG
  60. D=d
  61. !endif
  62. !endif
  63. TARGETTYPE=LIBRARY
  64. TARGETPATH=obj
  65. !IF "$(CRTLIBTYPE)" == "DLL" || "$(CRTLIBTYPE)" == "DLLLIB"
  66. TARGETNAMESUFFIX=dll
  67. TARGETTYPE=LIBRARY
  68. !if "$(CRTLIBTYPE)" == "DLLLIB"
  69. MTOPTION=-D_MT -D_DLL -DCRTDLL
  70. !else
  71. MTOPTION=-D_MT -DCRTDLL -D_CRTIMP=
  72. !endif
  73. ASM_DEFINES1=-D_WIN32
  74. C_DEFINES1=$(DEBUG_CDEFINE)
  75. IA64_OPTIMIZATION=/O1 # Workaround until crtw32\eh\frame.cpp can build /Oxs or /Oxt
  76. !ELSEIF "$(CRTLIBTYPE)" == "MT"
  77. TARGETNAMESUFFIX=mt
  78. TARGETTYPE=LIBRARY
  79. MTOPTION=-D_MT
  80. ASM_DEFINES1=-D_WIN32
  81. C_DEFINES1=$(DEBUG_CDEFINE)
  82. IA64_OPTIMIZATION=/O1 # Workaround until crtw32\eh\frame.cpp can build /Oxs or /Oxt
  83. !ELSEIF "$(CRTLIBTYPE)" == "ST"
  84. TARGETNAMESUFFIX=
  85. TARGETTYPE=LIBRARY
  86. MTOPTION=
  87. ASM_DEFINES1=-D_WIN32
  88. C_DEFINES1=$(DEBUG_CDEFINE)
  89. IA64_OPTIMIZATION=/O1 # Workaround until crtw32\eh\frame.cpp can build /Oxs or /Oxt
  90. !ELSEIF "$(CRTLIBTYPE)" == "STP"
  91. TARGETNAMESUFFIX=stp
  92. TARGETTYPE=LIBRARY
  93. MTOPTION=
  94. ASM_DEFINES1=-D_WIN32
  95. C_DEFINES1=$(DEBUG_CDEFINE)
  96. !ELSEIF "$(CRTLIBTYPE)" == "NT"
  97. TARGETNAMESUFFIX=nt
  98. TARGETTYPE=LIBRARY
  99. MTOPTION=
  100. C_DEFINES1=-D_NTSUBSET_ -D_NTSYSTEM_
  101. ASM_DEFINES1=-D_NTSUBSET_ -D_NTSYSTEM_ -D_WIN32
  102. !ELSEIF "$(CRTLIBTYPE)" == "POSIX"
  103. TARGETNAMESUFFIX=psx
  104. TARGETTYPE=LIBRARY
  105. MTOPTION=
  106. C_DEFINES1=-D_POSIX_
  107. ASM_DEFINES1=-D_POSIX_
  108. INCLUDES=$(SDK_INC_PATH)\posix;$(INCLUDES)
  109. !ELSE
  110. !ERROR Unsupported Library CRTLIBTYPE: $(CRTLIBTYPE)
  111. !ENDIF
  112. C_DEFINES1 = $(C_DEFINES1) -DNT_BUILD -D_CRTBLD -DWINHEAP -D_SYSCRT
  113. ASM_DEFINES1 = $(ASM_DEFINES1) -DNT_BUILD -D_CRTBLD -D_SYSCRT
  114. # Standard MBCS build
  115. MBCS_DEFINES=-D_MBCS -D_MB_MAP_DIRECT -D_KANJI
  116. C_DEFINES=$(C_DEFINES) $(C_DEFINES1) $(MTOPTION) $(MBCS_DEFINES)
  117. ASM_DEFINES=$(ASM_DEFINES1) $(MTOPTION) $(MBCS_DEFINES)
  118. USE_NATIVE_EH=1