@@ -74,6 +74,13 @@ LUAPREFIX_mingw?=/usr
7474CDIR_mingw? =lua/$(LUAV )
7575LDIR_mingw? =lua/$(LUAV ) /lua
7676
77+ # where lua headers are found for ucrt64 builds
78+ # LUAINC_ucrt64:
79+ LUAINC_ucrt64? =/ucrt64/include
80+ LUALIB_ucrt64? =/ucrt64/bin/lua$(subst .,,$(LUAV ) ) .dll
81+ LUAPREFIX_ucrt64? =/ucrt64
82+ CDIR_ucrt64? =lib/lua/$(LUAV )
83+ LDIR_ucrt64? =share/lua/$(LUAV )
7784
7885# LUAINC_win32:
7986# LUALIB_win32:
@@ -153,7 +160,7 @@ print:
153160# ------
154161# Supported platforms
155162#
156- PLATS = macosx linux win32 win64 mingw solaris
163+ PLATS = macosx linux win32 win64 mingw solaris ucrt64
157164
158165# ------
159166# Compiler and linker settings
@@ -219,6 +226,21 @@ LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o
219226LD_mingw =gcc
220227SOCKET_mingw =wsocket.o
221228
229+ # ------
230+ # Compiler and linker settings
231+ # for ucrt64
232+ SO_ucrt64 =dll
233+ O_ucrt64 =o
234+ CC_ucrt64 =gcc
235+ DEF_ucrt64 = -DLUASOCKET_$(DEBUG ) \
236+ -DWINVER=0x0501
237+ CFLAGS_ucrt64 = -I$(LUAINC ) $(DEF ) -Wall -O2 -fno-common
238+ # \
239+ -fvisibility=hidden
240+ LDFLAGS_ucrt64 = $(LUALIB ) -shared -Wl,-s -lws2_32 -o
241+ LD_ucrt64 =gcc
242+ SOCKET_ucrt64 =wsocket.o
243+
222244
223245# ------
224246# Compiler and linker settings
@@ -384,6 +406,9 @@ linux:
384406mingw :
385407 $(MAKE ) all PLAT=mingw
386408
409+ ucrt64 :
410+ $(MAKE ) all PLAT=ucrt64
411+
387412solaris :
388413 $(MAKE ) all-unix PLAT=solaris
389414
0 commit comments