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.

84 lines
3.1 KiB

  1. !INCLUDE $(NTMAKEENV)\makefile.plt
  2. WHNT32TABSRC=..\..\ntos\ke\services.tab
  3. WHNT32TAB=..\whnt32\$(O)\whnt32.tab
  4. NT32TAB=..\whnt32\$(O)\kesvc.tab
  5. #
  6. # bash the 64-bit-targetted C compiler so it preprocesses using the
  7. # 32-bit defines as we want 32-bit type information
  8. #
  9. !if $(IA64)
  10. WOW64_COMPILER_FLAGS=$(CXX_COMPILER_FLAGS:_WIN64=_WIN32) -DSORTPP_PASS -DGUID_DEFINED
  11. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_M_IA64=_M_X86)
  12. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_IA64_=_X86_)
  13. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:DIA64=DX86)
  14. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS) /U_WIN64 /Di386=1 /DBUILD_WOW6432
  15. WOW6432_PREPROCESSOR_FLAGS=$(C_PREPROCESSOR_FLAGS:_WIN64=_WIN32)
  16. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_M_IA64=_M_X86)
  17. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_IA64_=_X86_)
  18. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:DIA64=DX86)
  19. WOW6432_PREPROCESSOR_FLAGS=/U_WIN64 /Di386=1 /DBUILD_WOW6432 $(WOW6432_PREPROCESSOR_FLAGS)
  20. !elseif $(AMD64)
  21. WOW64_COMPILER_FLAGS=$(CXX_COMPILER_FLAGS:_WIN64=_WIN32) -DSORTPP_PASS -DGUID_DEFINED
  22. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_M_AMD64=_M_X86)
  23. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_AMD64_=_X86_)
  24. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:DAMD64=DX86)
  25. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS) /U_WIN64 /Di386=1 /DBUILD_WOW6432
  26. WOW6432_PREPROCESSOR_FLAGS=$(C_PREPROCESSOR_FLAGS:_WIN64=_WIN32)
  27. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_M_AMD64=_M_X86)
  28. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_AMD64_=_X86_)
  29. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:DAMD64=DX86)
  30. WOW6432_PREPROCESSOR_FLAGS=/U_WIN64 /Di386=1 /DBUILD_WOW6432 $(WOW6432_PREPROCESSOR_FLAGS)
  31. !else
  32. !error no target cpu.
  33. !endif
  34. !if "$(WOW64_DEBUG_THUNKGEN)" == "1"
  35. SORTPP_FLAGS=$(SORTPP_FLAGS) -l
  36. !else
  37. SORTPP_FLAGS=$(SORTPP_FLAGS)
  38. !endif
  39. PPMFILE=$(O)\winincs.ppm
  40. NT32HDR=$(O)\nt32.h
  41. CXX_COMPILER_NAME=$(CXX_COMPILER_NAME) $(WOW64_COMPILER_FLAGS) -DIN=__in_wow64 -DOUT=__out_wow64
  42. $(WHNT32TAB): $(WHNT32TABSRC)
  43. @echo Creating $(WHNT32TAB) from $(WHNT32TABSRC)
  44. copy $(WHNT32TABSRC)+..\..\ntdll\wow6432\ntwow64.tab $(O)\whnt32.tmp
  45. $(C_PREPROCESSOR_NAME) $(WOW6432_PREPROCESSOR_FLAGS) $(O)\whnt32.tmp > $(WHNT32TAB)
  46. del $(O)\whnt32.tmp
  47. $(NT32TAB): $(WHNT32TABSRC)
  48. $(C_PREPROCESSOR_NAME) $(WOW6432_PREPROCESSOR_FLAGS) $(WHNT32TABSRC) > $(NT32TAB)
  49. $(O)\winincs.pp: winincs.cpp cgenhdr.h
  50. $(CXX_COMPILER_NAME) /C @<<$(O)\cl.rsp /E /FC winincs.cpp >$(O)\winincs2.pp
  51. $(WOW64_COMPILER_FLAGS: =
  52. )
  53. <<NOKEEP
  54. idlclean.exe $(O)\winincs2.pp $(O)\winincs2.cpp
  55. $(CXX_COMPILER_NAME) @<<cl.rsp /E /FC $(O)\winincs2.cpp >$(O)\winincs.pp
  56. $(WOW64_COMPILER_FLAGS: =
  57. )
  58. <<NOKEEP
  59. $(PPMFILE): $(O)\winincs.pp
  60. sortpp.exe $(SORTPP_FLAGS) -m$(PPMFILE) $(O)\winincs.pp
  61. $(NT32HDR): $(PPMFILE)
  62. gennt32t.exe $(PPMFILE) >$(NT32HDR)
  63. thunks: $(WHNT32TAB) $(NT32HDR) $(PPMFILE) $(NT32TAB)
  64. cleanfiles:
  65. -del $(O)\winincs.pp
  66. -del $(O)\winincs2.pp
  67. -del $(WHNT32TAB)
  68. -del $(NT32TAB)
  69. -del $(PPMFILE)
  70. -del $(NT32HDR)
  71. clean: cleanfiles thunks