~ubuntu-branches/ubuntu/trusty/luajit/trusty

« back to all changes in this revision

Viewing changes to src/msvcbuild.bat

  • Committer: Package Import Robot
  • Author(s): Enrico Tassi
  • Date: 2012-11-03 14:07:56 UTC
  • mfrom: (1.2.1) (15.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20121103140756-z0zcnyrwqlvuc2m5
Tags: 2.0.0+dfsg-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
@rem Script to build LuaJIT with MSVC.
2
 
@rem Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h
 
2
@rem Copyright (C) 2005-2012 Mike Pall. See Copyright Notice in luajit.h
3
3
@rem
4
4
@rem Either open a "Visual Studio .NET Command Prompt"
5
5
@rem (Note that the Express Edition does not contain an x64 compiler)
19
19
@set LJMT=mt /nologo
20
20
@set LJLIB=lib /nologo
21
21
@set DASMDIR=..\dynasm
22
 
@set DASM=lua %DASMDIR%\dynasm.lua
 
22
@set DASM=%DASMDIR%\dynasm.lua
23
23
@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c
24
24
 
25
 
if not exist buildvm_x86.h^
26
 
  %DASM% -LN -o buildvm_x86.h buildvm_x86.dasc
27
 
@if errorlevel 1 goto :BAD
28
 
if not exist buildvm_x64win.h^
29
 
  %DASM% -LN -D X64 -D X64WIN -o buildvm_x64win.h buildvm_x86.dasc
30
 
@if errorlevel 1 goto :BAD
31
 
 
32
 
%LJCOMPILE% /I "." /I %DASMDIR% buildvm*.c
 
25
%LJCOMPILE% host\minilua.c
 
26
@if errorlevel 1 goto :BAD
 
27
%LJLINK% /out:minilua.exe minilua.obj
 
28
@if errorlevel 1 goto :BAD
 
29
if exist minilua.exe.manifest^
 
30
  %LJMT% -manifest minilua.exe.manifest -outputresource:minilua.exe
 
31
 
 
32
@set DASMFLAGS=-D WIN -D JIT -D FFI -D P64
 
33
@set LJARCH=x64
 
34
@minilua
 
35
@if errorlevel 8 goto :X64
 
36
@set DASMFLAGS=-D WIN -D JIT -D FFI
 
37
@set LJARCH=x86
 
38
:X64
 
39
minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h vm_x86.dasc
 
40
@if errorlevel 1 goto :BAD
 
41
 
 
42
%LJCOMPILE% /I "." /I %DASMDIR% host\buildvm*.c
33
43
@if errorlevel 1 goto :BAD
34
44
%LJLINK% /out:buildvm.exe buildvm*.obj
35
45
@if errorlevel 1 goto :BAD
46
56
@if errorlevel 1 goto :BAD
47
57
buildvm -m recdef -o lj_recdef.h %ALL_LIB%
48
58
@if errorlevel 1 goto :BAD
49
 
buildvm -m vmdef -o ..\lib\vmdef.lua %ALL_LIB%
 
59
buildvm -m vmdef -o jit\vmdef.lua %ALL_LIB%
50
60
@if errorlevel 1 goto :BAD
51
61
buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
52
62
@if errorlevel 1 goto :BAD
85
95
if exist luajit.exe.manifest^
86
96
  %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe
87
97
 
88
 
@del *.obj *.manifest buildvm.exe
 
98
@del *.obj *.manifest minilua.exe buildvm.exe
89
99
@echo.
90
 
@echo === Successfully built LuaJIT ===
 
100
@echo === Successfully built LuaJIT for Windows/%LJARCH% ===
91
101
 
92
102
@goto :END
93
103
:BAD