Skip to content

Commit

Permalink
add Lua makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
jbalint committed Mar 19, 2013
1 parent 85aa7de commit afdba72
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
15 changes: 15 additions & 0 deletions misc/Makefile.win32.lua-5.2.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CC = cl
CFLAGS += /Zi /MTd
CFLAGS += /DLUA_COMPAT_ALL
CFLAGS += /DLUA_BUILD_AS_DLL
CFLAGS += /DLUA_USE_APICHECK

.SUFFIXES: .obj .c
.c.obj:
$(CC) $(CFLAGS) /c $<

lua.dll: lapi.obj lauxlib.obj lbaselib.obj lbitlib.obj lcode.obj lcorolib.obj lctype.obj ldblib.obj ldebug.obj ldo.obj ldump.obj lfunc.obj lgc.obj linit.obj liolib.obj llex.obj lmathlib.obj lmem.obj loadlib.obj lobject.obj lopcodes.obj loslib.obj lparser.obj lstate.obj lstring.obj lstrlib.obj ltable.obj ltablib.obj ltm.obj lundump.obj lvm.obj lzio.obj
link /IMPLIB:lua52.lib /DLL /DEBUG /OUT:lua52.dll /INCREMENTAL:NO $^

clean:
rm *.obj lua52.dll
21 changes: 21 additions & 0 deletions misc/Makefile.win32.luasocket2-hg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CC = cl
CFLAGS += /Zi /MTd
CFLAGS += /DLUASOCKET_EXPORTS
CFLAGS += "/DLUASOCKET_API=__declspec(dllexport)"
CFLAGS += /DLUASOCKET_DEBUG
CFLAGS += /ID:/sw/inst/lua-5.2.1/include
# see http://lua-users.org/lists/lua-l/2011-07/msg00708.html
CFLAGS += /DluaL_reg=luaL_Reg

CFLAGS += /DLUA_COMPAT_MODULE

.SUFFIXES: .obj .c
.c.obj:
$(CC) $(CFLAGS) /c $<

socket/core.dll: luasocket.obj timeout.obj buffer.obj io.obj auxiliar.obj options.obj inet.obj tcp.obj udp.obj except.obj select.obj wsocket.obj lua_typeerror.obj jess_socket_gaistrerror.obj
-md socket
link /IMPLIB:socket/core.lib /DLL /DEBUG /OUT:socket/core.dll /INCREMENTAL:NO ws2_32.lib D:/sw/inst/lua-5.2.1/src/lua52.lib $^

clean:
rm *.obj socket/core.dll
6 changes: 6 additions & 0 deletions misc/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Miscellaneous files related to Yellow Tree debugger

Makefile.win32.lua-5.2.1 - A GNU Makefile to build Lua 5.2 DLL with Visual Studio.
Makefile.win32.luasocket2-hg - A GNU Makefile to build LuaSocket DLL with Visual Studio.
- Windows 2003 requires replacing inet_ntop() in inet.c

0 comments on commit afdba72

Please sign in to comment.