forked from JCash/voronoi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile_cl.bat
41 lines (32 loc) · 1.32 KB
/
compile_cl.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
echo off
if NOT DEFINED VCINSTALLDIR (
if exist "C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\vcvarsall.bat" (
call "C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\vcvarsall.bat" amd64
echo "USING VISUAL STUDIO 15"
)
)
if NOT DEFINED VCINSTALLDIR (
if exist "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" (
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
echo "USING VISUAL STUDIO 14"
)
)
if NOT DEFINED VCINSTALLDIR (
if exist "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" (
call "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" amd64
echo "USING VISUAL STUDIO 13"
)
)
if NOT DEFINED VCINSTALLDIR (
if exist "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" (
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
echo "USING VISUAL STUDIO 12"
)
)
if NOT DEFINED VCINSTALLDIR (
echo "No compatible visual studio found! run vcvarsall.bat first!"
)
mkdir build
cl.exe /nologo /O2 /D_CRT_SECURE_NO_WARNINGS /c -Fobuild/stb_wrapper.obj src/stb_wrapper.c
cl.exe /nologo /O2 /D_CRT_SECURE_NO_WARNINGS /W4 build/stb_wrapper.obj src\main.c /link /out:build/main.exe
del *.obj