[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LuaX modules
- From: Asko Kauppi <askok@...>
- Date: Sun, 30 Apr 2006 03:02:30 +0300
( This is about experimental LuaX codebase, not yet anything you can
download and start using right away. )
This night, I got LuaX modules to compile from the same source, to
either "native" Lua 5.1 binary modules, or to version-independent
(not linking to liblua) LuaX modules.
This promises good for us all, since the LuaX modules of future
releases will be easily "detachable" from the main release, for use
in other environments. LuaX itself shall continue its journey to
become a "virtual programming platform" based on SDL, Lua, UTF-8 etc.
Getting this far provides some practical issues, i.e. in the naming
of the binary modules. See attached log trail, are the names used
there good:
lua51-serial.bundle/so/dll Lua 5.1 linking Serial port module
luax-serial.bundle/so/dll LuaX linking Serial port module
Here are the commands used for the compilation (only the one -D flag
differs):
[iMac:trunk/Modules/Serial] asko% make
c++ -fPIC -bundle -Wall -O2 -o lua51-serial.bundle \
-I ../Sys/ -I/sw/include -L/sw/lib -llua \
-DGLUA_NOHOST -I../../Sources ../../Sources/gluax.c \
serial_module.c
c++ -fPIC -bundle -Wall -O2 -o luax-serial.bundle \
-I ../Sys/ -I/sw/include -L/sw/lib -llua \
-DGLUA_DYNAMIC -I../../Sources ../../Sources/gluax.c \
serial_module.c
[iMac:trunk/Modules/Serial] asko% ls -al
total 304
-rw-r--r-- 1 asko staff 1737 Apr 30 02:48 Makefile
-rwxr-xr-x 1 asko staff 66332 Apr 30 02:48 lua51-serial.bundle
-rwxr-xr-x 1 asko staff 42912 Apr 30 02:48 luax-serial.bundle
-rw-r--r-- 1 asko staff 22594 Apr 24 10:31 serial_module.c
-rw-r--r-- 1 asko staff 5137 Dec 28 03:46 serial_wrap.lua
In addition to module source code, one will need gluax.c/h, nothing
more (and Lua headers + library for "normal" linkage). For LuaX
linking, Lua is not required (there will be a proxy module bridging
Lua core to LuaX modules, transparent to applications).
-asko