@echo off setlocal set _targetcpu= set _mbflg=MB if "%1" == "MB" (set _mbflg=MB) && shift if "%1" == "Mb" (set _mbflg=MB) && shift if "%1" == "mb" (set _mbflg=MB) && shift if "%1" == "Kanji" (set _mbflg=KANJI) && shift if "%1" == "Kanji" (set _mbflg=KANJI) && shift if "%1" == "Kanji" (set _mbflg=KANJI) && shift if "%1" == "-alpha" set _targetcpu=alpha if "%1" == "alpha" set _targetcpu=alpha if "%1" == "ALPHA" set _targetcpu=alpha if "%1" == "-mips" set _targetcpu=mips if "%1" == "mips" set _targetcpu=mips if "%1" == "MIPS" set _targetcpu=mips if "%1" == "-i386" set _targetcpu=386 if "%1" == "-386" set _targetcpu=386 if "%1" == "386" set _targetcpu=386 if "%1" == "i386" set _targetcpu=386 if "%_targetcpu%" == "" goto bogus set _buildopts=-%_targetcpu% %2 %3 %4 %5 %6 %7 %8 %9 set crttree=..\crt32nt set fptree=..\fp32nt set libdir=..\libnt cd %fptree%.nt echo Building NT Subset of Single Thread C Floating Point Runtimes call buildcrt nt %_buildopts% cd %crttree%.nt echo Building NT Subset of Single Thread C Runtimes (excluding FP) call buildcrt %_mbflg% nt %_buildopts% cd %fptree%.st echo Building Single Thread C Floating Point Runtimes call buildcrt st %_buildopts% cd %crttree%.st echo Building Single Thread C Runtimes (excluding FP) call buildcrt %_mbflg% st %_buildopts% cd %fptree% echo Building Multi-Thread C Floating Point Runtimes call buildcrt mt %_buildopts% cd %crttree% echo Building Multi-Thread C Runtimes (excluding FP) call buildcrt %_mbflg% mt %_buildopts% cd %fptree%.dll echo Building DLL C Floating Point Runtimes call buildcrt dll %_buildopts% cd %crttree%.dll echo Building DLL C Runtimes (excluding FP) call buildcrt %_mbflg% dll %_buildopts% cd %crttree%.psx echo Building POSIX C Runtimes (excluding FP) call buildcrt posix %_buildopts% :buildlibs if "%_targetcpu%" == "mips" goto linkmips if "%_targetcpu%" == "alpha" goto linkalpha cd %libdir% echo Building libcnt.lib libc.lib libcmt.lib libcpsx.lib crtdll.lib crtdll.dll for i386 if "%_mbflg%" == "KANJI" goto mb386 nmake 386=1 goto done :mb386 nmake 386=1 KANJIBLD=1 goto done :linkmips cd %libdir% echo Building libcnt.lib libc.lib libcmt.lib libcpsx.lib crtdll.lib crtdll.dll for MIPS if "%_mbflg%" == "KANJI" goto mbmips nmake MIPS=1 goto done :mbmips nmake MIPS=1 KANJIBLD=1 goto done :linkalpha cd %libdir% echo Building libcnt.lib libc.lib libcmt.lib libcpsx.lib crtdll.lib crtdll.dll for ALPHA if "%_mbflg%" == "KANJI" goto mbalpha nmake ALPHA=1 goto done :mbalpha nmake ALPHA=1 KANJIBLD=1 goto done :bogus echo Usage: BUILDALL [MB or KANJI] (386 or MIPS or ALPHA) [BuildOptions] :done endlocal