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.

83 lines
3.1 KiB

  1. !INCLUDE $(NTMAKEENV)\makefile.plt
  2. WHWIN32TABSRC=..\..\kmode\services.tab
  3. WHWIN32TAB=..\whwin32\$(O)\services.tab
  4. WIN32TAB=..\whwin32\$(O)\guisvc.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. CXX_COMPILER_NAME=$(CXX_COMPILER_NAME) $(WOW64_COMPILER_FLAGS) -DIN=__in_wow64 -DOUT=__out_wow64
  21. !elseif $(AMD64)
  22. WOW64_COMPILER_FLAGS=$(CXX_COMPILER_FLAGS:_WIN64=_WIN32) -DSORTPP_PASS -DGUID_DEFINED
  23. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_M_AMD64=_M_X86)
  24. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:_AMD64_=_X86_)
  25. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS:DAMD64=DX86)
  26. WOW64_COMPILER_FLAGS=$(WOW64_COMPILER_FLAGS) /U_WIN64 /Di386=1 /DBUILD_WOW6432
  27. WOW6432_PREPROCESSOR_FLAGS=$(C_PREPROCESSOR_FLAGS:_WIN64=_WIN32)
  28. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_M_AMD64=_M_X86)
  29. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:_AMD64_=_X86_)
  30. WOW6432_PREPROCESSOR_FLAGS=$(WOW6432_PREPROCESSOR_FLAGS:DAMD64=DX86)
  31. WOW6432_PREPROCESSOR_FLAGS=/U_WIN64 /Di386=1 /DBUILD_WOW6432 $(WOW6432_PREPROCESSOR_FLAGS)
  32. CXX_COMPILER_NAME=$(CXX_COMPILER_NAME) $(WOW64_COMPILER_FLAGS) -DIN=__in_wow64 -DOUT=__out_wow64
  33. !else
  34. !error no target architecture.
  35. !endif
  36. !if "$(WOW64_DEBUG_THUNKGEN)" == "1"
  37. SORTPP_FLAGS=$(SORTPP_FLAGS) -l
  38. !else
  39. SORTPP_FLAGS=$(SORTPP_FLAGS)
  40. !endif
  41. PPMFILE=$(O)\winincs.ppm
  42. NT32HDR=$(O)\nt32.h
  43. $(WHWIN32TAB): $(WHWIN32TABSRC)
  44. @echo Creating $(WHWIN32TAB) from $(WHWIN32TABSRC)
  45. $(C_PREPROCESSOR_NAME) $(WOW6432_PREPROCESSOR_FLAGS) $** > $@
  46. $(WIN32TAB): $(WHWIN32TABSRC)
  47. $(C_PREPROCESSOR_NAME) $(WOW6432_PREPROCESSOR_FLAGS) $** > $@
  48. $(O)\winincs.pp: winincs.cpp cgenhdr.h
  49. $(CXX_COMPILER_NAME) /C @<<$(O)\cl.rsp /E /FC winincs.cpp >$(O)\winincs2.pp
  50. $(WOW64_COMPILER_FLAGS: =
  51. )
  52. <<NOKEEP
  53. idlclean.exe $(O)\winincs2.pp $(O)\winincs2.cpp
  54. $(CXX_COMPILER_NAME) @<<cl.rsp /E /FC $(O)\winincs2.cpp >$(O)\winincs.pp
  55. $(WOW64_COMPILER_FLAGS: =
  56. )
  57. <<NOKEEP
  58. $(PPMFILE): $(O)\winincs.pp
  59. sortpp.exe $(SORTPP_FLAGS) -m$(PPMFILE) $(O)\winincs.pp
  60. $(NT32HDR): $(PPMFILE)
  61. gennt32t.exe $(PPMFILE) >$(NT32HDR)
  62. thunks: $(WHWIN32TAB) $(NT32HDR) $(PPMFILE) $(WIN32TAB)
  63. cleanfiles:
  64. -del $(O)\winincs.pp
  65. -del $(O)\winincs2.pp
  66. -del $(WHWIN32TAB)
  67. -del $(WIN32TAB)
  68. -del $(PPMFILE)
  69. -del $(NT32HDR)
  70. clean: cleanfiles thunks