forked from matricks/bam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_win32_msvc.bat
52 lines (44 loc) · 1.25 KB
/
make_win32_msvc.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
41
42
43
44
45
46
47
48
49
50
51
@echo off
@REM check if we already have the tools in the environment
if exist "%VCINSTALLDIR%" (
goto compile
)
@REM Check for Visual Studio
if exist "%VS110COMNTOOLS%" (
set VSPATH="%VS110COMNTOOLS%"
goto set_env
)
if exist "%VS100COMNTOOLS%" (
set VSPATH="%VS100COMNTOOLS%"
goto set_env
)
if exist "%VS90COMNTOOLS%" (
set VSPATH="%VS90COMNTOOLS%"
goto set_env
)
if exist "%VS80COMNTOOLS%" (
set VSPATH="%VS80COMNTOOLS%"
goto set_env
)
echo You need Microsoft Visual Studio 8, 9, 10 or 11 installed
pause
exit
@ setup the environment
:set_env
call %VSPATH%vsvars32.bat
:compile
@echo === building bam ===
@cl /D_CRT_SECURE_NO_DEPRECATE /O2 /nologo src/tools/txt2c.c /Fesrc/tools/txt2c.exe
@src\tools\txt2c src/base.lua src/tools.lua src/driver_gcc.lua src/driver_clang.lua src/driver_cl.lua > src\internal_base.h
@REM /DLUA_BUILD_AS_DLL = export lua functions
@REM /W3 = Warning level 3
@REM /Ox = max optimizations
@REM /TC = compile as c
@REM /Zi = generate debug database
@REM /GS- = no stack checks
@REM /GL = Whole program optimization (ltcg)
@REM /LTCG = link time code generation
@cl /D_CRT_SECURE_NO_DEPRECATE /DLUA_BUILD_AS_DLL /W3 /O2 /TC /Zi /GS- /GL /nologo /I src/lua src/*.c src/lua/*.c /Febam.exe /link /LTCG
@REM clean up
@del bam.exp
@del *.obj