xref: /freebsd/contrib/bearssl/mk/mkT0.cmd (revision 2aaf9152a852aba9eb2036b95f4948ee77988826)
1*0957b409SSimon J. Gerraty@echo off
2*0957b409SSimon J. Gerraty
3*0957b409SSimon J. Gerratyrem =====================================================================
4*0957b409SSimon J. Gerratyrem This script uses the command-line C# compiler csc.exe, which is
5*0957b409SSimon J. Gerratyrem provided with the .NET framework. We need framework 3.5 or later
6*0957b409SSimon J. Gerratyrem (some of the code uses features not available in the language version
7*0957b409SSimon J. Gerratyrem implemented in the compiler provided with framework 2.0.50727).
8*0957b409SSimon J. Gerratyrem =====================================================================
9*0957b409SSimon J. Gerraty
10*0957b409SSimon J. Gerratyif exist "%SystemRoot%\Microsoft.NET\Framework\v3.5\csc.exe" (
11*0957b409SSimon J. Gerraty	set CSC="%SystemRoot%\Microsoft.NET\Framework\v3.5\csc.exe"
12*0957b409SSimon J. Gerraty	goto do_compile
13*0957b409SSimon J. Gerraty)
14*0957b409SSimon J. Gerratyif exist "%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\csc.exe" (
15*0957b409SSimon J. Gerraty	set CSC="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\csc.exe"
16*0957b409SSimon J. Gerraty	goto do_compile
17*0957b409SSimon J. Gerraty)
18*0957b409SSimon J. Gerratyif exist "%SystemRoot%\Microsoft.NET\Framework64\v3.5\csc.exe" (
19*0957b409SSimon J. Gerraty	set CSC="%SystemRoot%\Microsoft.NET\Framework64\v3.5\csc.exe"
20*0957b409SSimon J. Gerraty	goto do_compile
21*0957b409SSimon J. Gerraty)
22*0957b409SSimon J. Gerratyif exist "%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\csc.exe" (
23*0957b409SSimon J. Gerraty	set CSC="%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\csc.exe"
24*0957b409SSimon J. Gerraty	goto do_compile
25*0957b409SSimon J. Gerraty)
26*0957b409SSimon J. Gerraty
27*0957b409SSimon J. Gerratyecho C# compiler not found
28*0957b409SSimon J. Gerratyexit 1
29*0957b409SSimon J. Gerraty
30*0957b409SSimon J. Gerraty:do_compile
31*0957b409SSimon J. Gerraty%CSC% /nologo /out:T0Comp.exe /main:T0Comp /res:T0\kern.t0,t0-kernel T0\*.cs
32*0957b409SSimon J. Gerratyif %errorlevel% neq 0 exit /b %errorlevel%
33