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.

70 lines
1.7 KiB

  1. PA = $(PROCESSOR_ARCHITECTURE) # Use a shorter name
  2. !if "$(PA)"=="x86"
  3. TOOLDIR = ..\libw32\tools\i386
  4. !else
  5. TOOLDIR = ..\libw32\tools\$(PA)
  6. !endif
  7. # if doing a 64-bit CRT build on a 32-bit system, use the native 32-bit
  8. # compiler, not a 64-bit-targetting cross-compiler
  9. !if "$(LLP64)" != "1" || "$(PA)" == "IA64" || "$(PA)" == "ALPHA64"
  10. CC = cl
  11. BLDFLAG =
  12. !else
  13. CC = $(V6TOOLS)\bin\cl
  14. !if "$(PA)" == "x86"
  15. BLDFLAG = -D_BUILD_IA64
  16. !elseif "$(PA)" == "ALPHA"
  17. BLDFLAG = -D_BUILD_ALPHA64
  18. !else
  19. !error Unknown platform for 64-bit targetted CRT build
  20. !endif
  21. !endif
  22. !if "$(LLP64)" == "1"
  23. MKCLNMKFFLAGS = -sys -64
  24. !elseif "$(BLD_SYSCRT)" == "1"
  25. MKCLNMKFFLAGS = -sys
  26. !else
  27. MKCLNMKFFLAGS =
  28. !endif
  29. !if "$(NOCLEAN)" == "1"
  30. MKCLNMKFFLAGS = $(MKCLNMKFFLAGS) -noclean
  31. !endif
  32. all: makefile.pre makefile.rel
  33. pd-d: pd-b
  34. sed "/\\$$/!d" pd-b > pd-d
  35. pd-f: pd-b
  36. sed "/\\$$/d" pd-b > pd-f
  37. mkdirs.i: pd-d mkdirs.sed
  38. sed -f mkdirs.sed pd-d > mkdirs.i
  39. mkfiles.i: pd-f mkfiles.sed
  40. sed -f mkfiles.sed pd-f > mkfiles.i
  41. cleanlst.i: mkfiles.i
  42. copy nul cleanlst.i
  43. copy_lst.i: mkfiles.i
  44. copy mkfiles.i copy_lst.i
  45. mkclnmkf.exe: mkclnmkf.c makefile
  46. $(CC) -nologo -Gi- -W3 -WX -Za -X -I$(V6TOOLS)\include $(BLDFLAG) $*.c \
  47. -link -nod:libc.lib -nod:kernel32.lib \
  48. $(V6TOOLS)\lib\libc.lib $(V6TOOLS)\lib\kernel32.lib
  49. makefile.pre makefile.rel: mkclnmkf.exe copy_lst.i cleanlst.i mkdirs.i
  50. if exist makefile.pre del makefile.pre
  51. if exist makefile.rel del makefile.rel
  52. mkclnmkf $(MKCLNMKFFLAGS) \crt %CRT_BUILDDIR%\crt\prebuild %CRT_BUILDDIR%\crt\src copy_lst.i cleanlst.i mkdirs.i makefile.pre makefile.rel
  53. if exist makefile.tmp del makefile.tmp
  54. ren makefile.rel makefile.tmp
  55. sed "s/DST)\\i386/DST)\\intel/g" makefile.tmp > makefile.rel
  56. del makefile.tmp