lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Fri, Apr 24, 2020 at 2:12 PM Russell Haley <russ.haley@gmail.com> wrote:


On Fri, Apr 24, 2020 at 12:34 PM Michael Nelson <mikestar1313@gmail.com> wrote:
Does anyone have a *simple* makefile for lua v5.4-rc1? It would be for
the mingw compiler on Windows 10. The makefiles with the source code are
just to complex for me too understand. I just need to build lua.exe,
luac.exe, and lua54.dll. I can handle installation and testing manually.

Warning: I'm at work so all this is largely untested from my (very) faulty memory...

Option 1)
Luawinmake uses batch to build Lua. The repo has a 5.4 branch but I don't know if it works with rc1


Option 2)
This is an educated guess, but: If you're using gcc-mingw and GNU Make on Windows then you can run something like:

make "MAKE=make" "CC=x86_64-w64-mingw32-gcc"  mingw

where "x86_64" is 64 bit and "i686" is 32 bit. I think that *should* work with 5.4-rc1. I'm not sure if you will have problems with `strip`, but if you post back I can help. I've noted that when running `make` on Windows it barfs if there are spaces in the path to the `make` executable so I specify the short name in the parameters.

Option 3)
If you're not sure where you are getting mingw from, I have a *beta* installer[1] called WinLua that installs Lua5.3, LuaRocks and the LLVM-Mingw compiler (and make): http://www.winlua.net. My toolchain requires a patch to the src/makefile:

Patch to 5.4 src/Makefile - https://pastebin.com/Yw4ZMeqX
Already patched src/Makefile - https://pastebin.com/pLvCMXNC

I just fixed the "Already Patched" makefile (tee hee). 
Steps to build 5.4 rc1 on a fresh windows machine with WinLua:
- Download 7-zip for the Lua sources
- Download and install the WinLua Toolchain: http://www.winlua.net/
- Download and extract the Lua 5.4 rc1 sources https://www.lua.org/work/lua-5.4.0-rc1.tar.gz (7-zip)
- Copy https://pastebin.com/pLvCMXNC  into the Lua sources as src/Makefile (overwriting the original)
- Drop to powershell and use :

mingw32-make "MAKE=mingw32-make" "CC=wlc32" mingw 

I think I'm going to rename `mingw32-make` to `make` in the next release.

Good luck
Russ

To build with WinLua (again, from memory...):

mingw32-make "make=mingw32-make" "CC=wlc32" mingw

where wlc32 makes 32 bit and wlc64 creates 64 bit binaries.

If you do use WinLua, please report any bugs to my repo at https://github.com/WinLua/WinLua-Source-Code

Good Luck. I'll check the mailing list later tonight when I get home.
Russ

[1] The installer is beta, the compiler is solid LLVM

_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org