home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / bldwin95.bat < prev    next >
DOS Batch File  |  1998-06-16  |  1KB  |  58 lines

  1. @echo off
  2. IF "%V6TOOLS%" == "" goto Usage1
  3.  
  4. if exist nmktobat.exe goto built_exe
  5. echo =-=-=-=-= Building NMKtoBAT.EXE =-=-=-=-= 
  6. echo This program is used in the MSVC CRTL build process
  7. cl /W4 /WX /Za nmktobat.c
  8. if errorlevel 1 goto errlev
  9. :built_exe
  10.  
  11.  
  12. IF "%1" == "PMAC" goto buildpmac
  13. IF "%1" == "PMac" goto buildpmac
  14. IF "%1" == "pmac" goto buildpmac
  15. IF "%1" == "" goto buildx86
  16. goto Usage2
  17.  
  18. :buildpmac
  19. set PROCESSOR_ARCHITECTURE=PMAC
  20. set PATH=%V6TOOLS%\mac\mppc\bin;%V6TOOLS%\mac\bin;%PATH%
  21. set INCLUDE=%V6TOOLS%\mac\include;%V6TOOLS%\mac\include\macos;%INCLUDE%
  22. set LIB=%V6TOOLS%\mac\mppc\lib;%LIB%
  23. shift
  24. goto dobuild
  25.  
  26. :buildx86
  27. if "%PROCESSOR_ARCHITECTURE%"=="" set PROCESSOR_ARCHITECTURE=x86
  28.  
  29. :dobuild
  30.  
  31. echo =-=-=-=-= Doing MSVC40 CRTL Source build (Objects) =-=-=-=-= 
  32. nmake -nologo -i -n BLD_OBJ=1 %1 %2 %3 %4 %5 > do_build.out
  33. nmktobat < do_build.out > do_build.bat
  34. call do_build.bat
  35. if errorlevel 1 goto errlev
  36. echo =-=-=-=-= Doing MSVC40 CRTL Source build (Libraries) =-=-=-=-= 
  37. nmake -nologo BLD_LIB=1 %1 %2 %3 %4 %5
  38. if errorlevel 1 goto errlev
  39. goto finish
  40.  
  41. :errlev
  42. echo.
  43. echo ***
  44. echo *** BUILD ABORTED -- ErrorLevel is non-zero!
  45. echo ***
  46. goto finish
  47.  
  48. :Usage1
  49. echo The environment variable V6TOOLS must be set to point
  50. echo to the root of your VC++ 6.0 installation.
  51.  
  52. goto finish
  53.  
  54. :Usage2
  55. echo "bldwin95" builds the runtimes for Intel platforms.
  56. echo "bldwin95 PMac" builds the runtimes for the Power Macintosh.
  57. :finish
  58.