lua-users home
lua-l archive

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


On 1/22/2012 3:03 AM, Luiz Henrique de Figueiredo wrote:
Is that a problem in the definition of AR in the mingw target or in
the rules to build the Lua library ?

The former (the definition of AR in the mingw target).

So, how can this be fixed?

Here is a quick-and-nasty way:
Add: rm -f lua52.dll

$ make mingw
cd src && make mingw
make[1]: Entering directory `/home/khman/apps/lua-5.2.0/src'
rm -f lua52.dll
make "LUA_A=lua52.dll" "LUA_T=lua.exe" \
        "AR=gcc -shared -o" "RANLIB=strip --strip-unneeded" \
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
make[2]: Entering directory `/home/khman/apps/lua-5.2.0/src'
gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_BUILD_AS_DLL -c -o llex.o llex.c gcc -shared -o lua52.dll lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o
strip --strip-unneeded lua52.dll
gcc -o lua.exe -s  lua.o lua52.dll -lm
make[2]: Leaving directory `/home/khman/apps/lua-5.2.0/src'
m

It's crude, but it does not impinge on the rest of the Makefile. I'll leave it to others to suggest better solutions...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia