11 CFLAGS
= -O2
-Wall
-I
$(INC
) $(MYCFLAGS
)
15 #MYLIBS= -lm -Wl,-E -ldl -lreadline -lhistory -lncurses
19 @echo
'Please choose a target: min noparser one strict clean'
22 $(CC
) $(CFLAGS
) $@.c
-L
$(LIB
) -llua
$(MYLIBS
)
23 echo
'print"Hello there!"' | .
/a.out
26 $(CC
) noparser.o
$(SRC
)/lua.o
-L
$(LIB
) -llua
$(MYLIBS
)
27 $(BIN
)/luac
$(TST
)/hello.lua
32 $(CC
) $(CFLAGS
) all.c
$(MYLIBS
)
33 .
/a.out
$(TST
)/hello.lua
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()'
42 $(RM
) a.out core core.
* *.o luac.out
44 .PHONY
: default min noparser one strict
clean