2
0

makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # $Id: makefile,v 1.17 1995/12/21 16:14:04 roberto Exp roberto $
  2. #configuration
  3. # define (undefine) POPEN if your system (does not) support piped I/O
  4. CONFIG = -DPOPEN
  5. # Compilation parameters
  6. CC = gcc
  7. CFLAGS = $(CONFIG) -I/usr/5include -Wall -Wmissing-prototypes -Wshadow -ansi -O2
  8. #CC = acc
  9. #CFLAGS = -fast -I/usr/5include
  10. AR = ar
  11. ARFLAGS = rvl
  12. # Aplication modules
  13. LUAOBJS = \
  14. parser.o \
  15. lex.o \
  16. opcode.o \
  17. hash.o \
  18. table.o \
  19. inout.o \
  20. tree.o \
  21. fallback.o \
  22. mem.o \
  23. func.o
  24. LIBOBJS = \
  25. iolib.o \
  26. mathlib.o \
  27. strlib.o
  28. lua : lua.o lua.a lualib.a
  29. $(CC) $(CFLAGS) -o $@ lua.o lua.a lualib.a -lm
  30. lua.a : parser.o $(LUAOBJS)
  31. $(AR) $(ARFLAGS) $@ $?
  32. ranlib lua.a
  33. lualib.a : $(LIBOBJS)
  34. $(AR) $(ARFLAGS) $@ $?
  35. ranlib $@
  36. liblua.so.1.0 : lua.o
  37. ld -o liblua.so.1.0 $(LUAOBJS)
  38. y.tab.c y.tab.h : lua.stx
  39. yacc++ -d lua.stx
  40. parser.c : y.tab.c
  41. sed -e 's/yy/luaY_/g' y.tab.c > parser.c
  42. parser.h : y.tab.h
  43. sed -e 's/yy/luaY_/g' y.tab.h > parser.h
  44. clear :
  45. rcsclean
  46. rm -f *.o
  47. rm -f parser.c parser.h y.tab.c y.tab.h
  48. co lua.h lualib.h luadebug.h
  49. % : RCS/%,v
  50. co $@
  51. fallback.o : fallback.c mem.h fallback.h opcode.h lua.h types.h tree.h func.h
  52. func.o : func.c table.h tree.h types.h opcode.h lua.h func.h mem.h luadebug.h
  53. hash.o : hash.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h
  54. inout.o : inout.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
  55. table.h
  56. iolib.o : iolib.c lua.h lualib.h luadebug.h
  57. lex.o : lex.c mem.h tree.h types.h table.h opcode.h lua.h func.h inout.h parser.h \
  58. ugly.h
  59. lua.o : lua.c lua.h lualib.h
  60. mathlib.o : mathlib.c lualib.h lua.h
  61. mem.o : mem.c mem.h lua.h
  62. opcode.o : opcode.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
  63. table.h fallback.h luadebug.h
  64. parser.o : parser.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
  65. table.h
  66. strlib.o : strlib.c lua.h lualib.h
  67. table.o : table.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h \
  68. inout.h fallback.h luadebug.h
  69. tree.o : tree.c mem.h lua.h tree.h types.h table.h opcode.h func.h