use lua_mem(L, +-size) to track your additional userdata sizes. keep it balanced...
[blua.git] / etc / Makefile
blob6d00008d98157eb4c3c83db0e74682f756c8104d
1 # makefile for Lua etc
3 TOP= ..
4 LIB= $(TOP)/src
5 INC= $(TOP)/src
6 BIN= $(TOP)/src
7 SRC= $(TOP)/src
8 TST= $(TOP)/test
10 CC= gcc
11 CFLAGS= -O2 -Wall -I$(INC) $(MYCFLAGS)
12 MYCFLAGS=
13 MYLDFLAGS= -Wl,-E
14 MYLIBS= -lm
15 #MYLIBS= -lm -Wl,-E -ldl -lreadline -lhistory -lncurses
16 RM= rm -f
18 default:
19 @echo 'Please choose a target: min noparser one strict clean'
21 min: min.c
22 $(CC) $(CFLAGS) $@.c -L$(LIB) -llua $(MYLIBS)
23 echo 'print"Hello there!"' | ./a.out
25 noparser: noparser.o
26 $(CC) noparser.o $(SRC)/lua.o -L$(LIB) -llua $(MYLIBS)
27 $(BIN)/luac $(TST)/hello.lua
28 -./a.out luac.out
29 -./a.out -e'a=1'
31 one:
32 $(CC) $(CFLAGS) all.c $(MYLIBS)
33 ./a.out $(TST)/hello.lua
35 strict:
36 -$(BIN)/lua -e 'print(a);b=2'
37 -$(BIN)/lua -lstrict -e 'print(a)'
38 -$(BIN)/lua -e 'function f() b=2 end f()'
39 -$(BIN)/lua -lstrict -e 'function f() b=2 end f()'
41 clean:
42 $(RM) a.out core core.* *.o luac.out
44 .PHONY: default min noparser one strict clean