mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 21:43:27 +00:00
Windows: Allow mixed builds with msvcbuild.bat.
Suggested by alex4814. #1341
This commit is contained in:
parent
0254770582
commit
4219efae43
@ -8,7 +8,8 @@
|
|||||||
@rem nogc64 disable LJ_GC64 mode for x64
|
@rem nogc64 disable LJ_GC64 mode for x64
|
||||||
@rem debug emit debug symbols
|
@rem debug emit debug symbols
|
||||||
@rem amalg amalgamated build
|
@rem amalg amalgamated build
|
||||||
@rem static static linkage
|
@rem static create static lib to statically link into your project
|
||||||
|
@rem mixed create static lib to build a DLL in your project
|
||||||
|
|
||||||
@if not defined INCLUDE goto :FAIL
|
@if not defined INCLUDE goto :FAIL
|
||||||
|
|
||||||
@ -106,12 +107,14 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
|
|||||||
@if "%1"=="static" goto :STATIC
|
@if "%1"=="static" goto :STATIC
|
||||||
%LJCOMPILE% %LJDYNBUILD% lj_*.c lib_*.c
|
%LJCOMPILE% %LJDYNBUILD% lj_*.c lib_*.c
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
|
@if "%1"=="mixed" goto :STATICLIB
|
||||||
%LJLINK% /DLL /OUT:%LJDLLNAME% lj_*.obj lib_*.obj
|
%LJLINK% /DLL /OUT:%LJDLLNAME% lj_*.obj lib_*.obj
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
@goto :MTDLL
|
@goto :MTDLL
|
||||||
:STATIC
|
:STATIC
|
||||||
%LJCOMPILE% lj_*.c lib_*.c
|
%LJCOMPILE% lj_*.c lib_*.c
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
|
:STATICLIB
|
||||||
%LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj
|
%LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
@goto :MTDLL
|
@goto :MTDLL
|
||||||
@ -119,13 +122,15 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
|
|||||||
@if "%2"=="static" goto :AMALGSTATIC
|
@if "%2"=="static" goto :AMALGSTATIC
|
||||||
%LJCOMPILE% %LJDYNBUILD% ljamalg.c
|
%LJCOMPILE% %LJDYNBUILD% ljamalg.c
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
|
@if "%2"=="mixed" goto :AMALGSTATICLIB
|
||||||
%LJLINK% /DLL /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj
|
%LJLINK% /DLL /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
@goto :MTDLL
|
@goto :MTDLL
|
||||||
:AMALGSTATIC
|
:AMALGSTATIC
|
||||||
%LJCOMPILE% ljamalg.c
|
%LJCOMPILE% ljamalg.c
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
%LJLINK% /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj
|
:AMALGSTATICLIB
|
||||||
|
%LJLIB% /OUT:%LJLIBNAME% ljamalg.obj lj_vm.obj
|
||||||
@if errorlevel 1 goto :BAD
|
@if errorlevel 1 goto :BAD
|
||||||
:MTDLL
|
:MTDLL
|
||||||
if exist %LJDLLNAME%.manifest^
|
if exist %LJDLLNAME%.manifest^
|
||||||
|
Loading…
Reference in New Issue
Block a user