MSVC
[novacoin.git] / MSVC / build-helpers / buildopenssl.bat
1 @ECHO ON
2 SET OLDPATH=%PATH%
3 cd C:\MyProjects\Deps\openssl-1.0.1j
4 if %errorlevel% NEQ 0 goto ERRORCLEANUP
5 REM first change the debug compiler options
6 perl -pi.bak -e "s#/Zi#/Z7#g;" util/pl/VC-32.pl
7 perl -pi.bak -e "s#-Zi#-Z7#g;" configure
8 REM Now do 64 bit by setting environment to MSVC 64 bit
9 call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_amd64
10 REM compile debug mode first
11 call perl Configure no-asm debug-VC-WIN64A 
12 call ms\do_win64a
13 nmake -f ms\nt.mak clean
14 nmake -f ms\nt.mak 
15 REM Now do release mode
16 call perl Configure no-asm VC-WIN64A 
17 call ms\do_win64a
18 nmake -f ms\nt.mak clean
19 nmake -f ms\nt.mak 
20 REM clean up and move files
21 set PATH=%OLDPATH%
22 md out64
23 md out64.dbg
24 move /Y out32\* out64\
25 move /Y out32.dbg\* out64.dbg\
26 REM
27 REM Now do 32 bit by setting environment to MSVC 32 bit
28 call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"
29 REM debug 32 first
30 call perl Configure debug-VC-WIN32 
31 call ms\do_nasm
32 nmake -f ms\nt.mak clean
33 nmake -f ms\nt.mak 
34 REM now do release mode
35 call perl Configure VC-WIN32 
36 call ms\do_nasm
37 nmake -f ms\nt.mak clean
38 nmake -f ms\nt.mak 
39 REM put back the path
40 set PATH=%OLDPATH%
41 echo All finished!
42 pause
43 goto EOF
44 :ERRORCLEANUP
45 echo Something went wrong, please check the directories in this batch file!
46 pause
47 :EOF