lua-users home
lua-l archive

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


lhf wrote:

> I don't recall any bugs in the Makefiles, but if there are any,
> please report.

In the top level makefile, the value for R is still 5.1.1.

> (It would be nice if the mingw target built luac correctly, but I
> don't know the correct incantation for that.)

Something like this can be used to compile a static luac.exe:

  mingw:
      $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" \
      "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
      "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe
      $(MAKE) mingwc

  mingwc:
      $(MAKE) "LUAC_T=luac.exe" luac.exe

Test:

$ echo "print '1'" | luac -l -

main <stdin:0,0> (4 instructions, 16 bytes at 00324978)
0+ params, 2 slots, 0 upvalues, 0 locals, 2 constants, 0 functions
        1       [1]     GETGLOBAL       0 -1    ; print
        2       [1]     LOADK           1 -2    ; "1"
        3       [1]     CALL            0 2 1
        4       [1]     RETURN          0 1

--
Kurt