File: build

package info (click to toggle)
lua50 5.0.3-8.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,228 kB
  • sloc: ansic: 12,032; makefile: 310; sh: 20
file content (33 lines) | stat: -rwxr-xr-x 762 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# If you don't want to use make, run this script.
# But make sure you read config to see what can be customized.


# Easiest way to build bin/lua:
# cc -O2 -o bin/lua -Iinclude -Isrc src/*.c src/lib/*.c src/lua/*.c -lm -ldl


# Easiest way to build Lua libraries and executables:
echo -n 'building core library... '
cd src
cc -O2 -c -I../include *.c
ar rc ../lib/liblua.a *.o
rm -f *.o

echo -n 'standard library... '
cd lib
cc -O2 -c -I../../include *.c
ar rc ../../lib/liblualib.a *.o
rm -f *.o

echo -n 'lua... '
cd ../lua
cc -O2 -o ../../bin/lua -I../../include *.c ../../lib/*.a -lm -ldl

echo -n 'luac... '
cd ../luac
cc -O2 -o ../../bin/luac -I../../include -I.. *.c -DLUA_OPNAMES ../lopcodes.c ../../lib/*.a

echo 'done'

cd ../..
bin/lua test/hello.lua