@rem nogc64 disable LJ_GC64 mode for x64\r
@rem debug emit debug symbols\r
@rem amalg amalgamated build\r
-@rem static static linkage\r
+@rem static create static lib to statically link into your project\r
+@rem mixed create static lib to build a DLL in your project\r
\r
@if not defined INCLUDE goto :FAIL\r
\r
@if "%1"=="static" goto :STATIC\r
%LJCOMPILE% %LJDYNBUILD% lj_*.c lib_*.c\r
@if errorlevel 1 goto :BAD\r
+@if "%1"=="mixed" goto :STATICLIB\r
%LJLINK% /DLL /OUT:%LJDLLNAME% lj_*.obj lib_*.obj\r
@if errorlevel 1 goto :BAD\r
@goto :MTDLL\r
:STATIC\r
%LJCOMPILE% lj_*.c lib_*.c\r
@if errorlevel 1 goto :BAD\r
+:STATICLIB\r
%LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj\r
@if errorlevel 1 goto :BAD\r
@goto :MTDLL\r
@if "%2"=="static" goto :AMALGSTATIC\r
%LJCOMPILE% %LJDYNBUILD% ljamalg.c\r
@if errorlevel 1 goto :BAD\r
+@if "%2"=="mixed" goto :AMALGSTATICLIB\r
%LJLINK% /DLL /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj\r
@if errorlevel 1 goto :BAD\r
@goto :MTDLL\r
:AMALGSTATIC\r
%LJCOMPILE% ljamalg.c\r
@if errorlevel 1 goto :BAD\r
-%LJLINK% /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj\r
+:AMALGSTATICLIB\r
+%LJLIB% /OUT:%LJLIBNAME% ljamalg.obj lj_vm.obj\r
@if errorlevel 1 goto :BAD\r
:MTDLL\r
if exist %LJDLLNAME%.manifest^\r