1 # If you don't want to use make, run this script.
2 # But make sure you read config to see what can be customized.
5 # Easiest way to build bin/lua:
6 # cc -O2 -o bin/lua -Iinclude -Isrc src/*.c src/lib/*.c src/lua/*.c -lm -ldl
9 # Easiest way to build Lua libraries and executables:
10 echo -n 'building core library... '
12 cc -O2 -c -I../include *.c
13 ar rc ../lib/liblua.a *.o
16 echo -n 'standard library... '
18 cc -O2 -c -I../../include *.c
19 ar rc ../../lib/liblualib.a *.o
24 cc -O2 -o ../../bin/lua -I../../include *.c ../../lib/*.a -lm -ldl
28 cc -O2 -o ../../bin/luac -I../../include -I.. *.c -DLUA_OPNAMES ../lopcodes.c ../../lib/*.a
33 bin/lua test/hello.lua