Imported from ../lua-5.0.1.tar.gz.
[lua.git] / src / luac / Makefile
blob9e772b412d3052f051f24d04b8a055f98c05552c
1 # makefile for Lua compiler
3 LUA= ../..
5 include $(LUA)/config
7 INCS= -I$(INC) -I.. $(EXTRA_INCS)
8 OBJS= luac.o print.o lopcodes.o
9 SRCS= luac.c print.c
11 T= $(BIN)/luac
13 all: $T
15 $T: $(OBJS) $(LIB)/liblua.a $(LIB)/liblualib.a
16 $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB)
18 # print.c needs opcode names from lopcodes.c
19 lopcodes.o: ../lopcodes.c ../lopcodes.h
20 $(CC) -o $@ -c $(CFLAGS) -DLUA_OPNAMES ../lopcodes.c
22 $(LIB)/liblua.a:
23 cd ..; $(MAKE)
25 $(LIB)/liblualib.a:
26 cd ../lib; $(MAKE)
28 clean:
29 rm -f $(OBJS) $T
31 co:
32 co -q -f -M $(SRCS)
34 klean: clean
35 rm -f $(SRCS)