Skip to content

Commit d4de114

Browse files
committed
Sync msvcbuild.bat
1 parent 1154cf4 commit d4de114

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

extras/msvcbuild.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
@rem lua52c enable lua52 compat mode
1010
@rem debug emit debug symbols
1111
@rem amalg amalgamated build
12-
@rem static static linkage
12+
@rem static create static lib to statically link into your project
13+
@rem mixed create static lib to build a DLL in your project
1314

1415
@if not defined INCLUDE goto :FAIL
1516

@@ -112,26 +113,30 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
112113
@if "%1"=="static" goto :STATIC
113114
%LJCOMPILE% %LJDYNBUILD% lj_*.c lib_*.c
114115
@if errorlevel 1 goto :BAD
116+
@if "%1"=="mixed" goto :STATICLIB
115117
%LJLINK% /DLL /OUT:%LJDLLNAME% lj_*.obj lib_*.obj
116118
@if errorlevel 1 goto :BAD
117119
@goto :MTDLL
118120
:STATIC
119121
%LJCOMPILE% lj_*.c lib_*.c
120122
@if errorlevel 1 goto :BAD
123+
:STATICLIB
121124
%LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj
122125
@if errorlevel 1 goto :BAD
123126
@goto :MTDLL
124127
:AMALGDLL
125128
@if "%2"=="static" goto :AMALGSTATIC
126129
%LJCOMPILE% %LJDYNBUILD% ljamalg.c
127130
@if errorlevel 1 goto :BAD
131+
@if "%2"=="mixed" goto :AMALGSTATICLIB
128132
%LJLINK% /DLL /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj
129133
@if errorlevel 1 goto :BAD
130134
@goto :MTDLL
131135
:AMALGSTATIC
132136
%LJCOMPILE% ljamalg.c
133137
@if errorlevel 1 goto :BAD
134-
%LJLINK% /OUT:%LJDLLNAME% ljamalg.obj lj_vm.obj
138+
:AMALGSTATICLIB
139+
%LJLIB% /OUT:%LJLIBNAME% ljamalg.obj lj_vm.obj
135140
@if errorlevel 1 goto :BAD
136141
:MTDLL
137142
if exist %LJDLLNAME%.manifest^

0 commit comments

Comments
 (0)