opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

gen.lua (881B)


      1 cflags({
      2 	'-std=c99', '-Wall', '-Wextra', '-Wpedantic', '-Wno-implicit-fallthrough',
      3 	'-D _DEFAULT_SOURCE',
      4 	'-D LUA_USE_POSIX',
      5 })
      6 
      7 pkg.hdrs = {
      8 	copy('$outdir/include', '$srcdir/src', {'lua.h', 'luaconf.h', 'lualib.h', 'lauxlib.h'}),
      9 	install=true,
     10 }
     11 
     12 lib('liblua.a', [[src/(
     13 	lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c
     14 	lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c
     15 	ltm.c lundump.c lvm.c lzio.c
     16 	lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c
     17 	lmathlib.c loslib.c lstrlib.c ltablib.c loadlib.c linit.c
     18 )]])
     19 file('lib/liblua.a', '644', '$outdir/liblua.a')
     20 
     21 exe('lua', {'src/lua.c', 'liblua.a'})
     22 file('bin/lua5.2', '755', '$outdir/lua')
     23 sym('bin/lua', 'lua5.2')
     24 exe('luac', {'src/luac.c', 'liblua.a'})
     25 file('bin/luac5.2', '755', '$outdir/luac')
     26 sym('bin/luac', 'luac5.2')
     27 
     28 man({'doc/lua.1', 'doc/luac.1'})
     29 
     30 fetch('curl')