makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # $Id: makefile,v 1.21 1996/03/05 15:57:53 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. undump.o
  25. LIBOBJS = \
  26. iolib.o \
  27. mathlib.o \
  28. strlib.o
  29. lua : lua.o lua.a lualib.a
  30. $(CC) $(CFLAGS) -o $@ lua.o lua.a lualib.a -lm
  31. lua.a : $(LUAOBJS)
  32. $(AR) $(ARFLAGS) $@ $?
  33. ranlib lua.a
  34. lualib.a : $(LIBOBJS)
  35. $(AR) $(ARFLAGS) $@ $?
  36. ranlib $@
  37. liblua.so.1.0 : lua.o
  38. ld -o liblua.so.1.0 $(LUAOBJS)
  39. y.tab.c y.tab.h : lua.stx
  40. yacc++ -d lua.stx
  41. parser.c : y.tab.c
  42. sed -e 's/yy/luaY_/g' y.tab.c > parser.c
  43. parser.h : y.tab.h
  44. sed -e 's/yy/luaY_/g' y.tab.h > parser.h
  45. clear :
  46. rcsclean
  47. rm -f *.o
  48. rm -f parser.c parser.h y.tab.c y.tab.h
  49. co lua.h lualib.h luadebug.h
  50. % : RCS/%,v
  51. co $@
  52. fallback.o : fallback.c mem.h fallback.h opcode.h lua.h types.h tree.h func.h
  53. func.o : func.c luadebug.h lua.h table.h tree.h types.h opcode.h func.h mem.h
  54. hash.o : hash.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h
  55. inout.o : inout.c lex.h opcode.h lua.h types.h tree.h func.h inout.h table.h \
  56. mem.h
  57. iolib.o : iolib.c lua.h luadebug.h lualib.h
  58. lex.o : lex.c mem.h tree.h types.h table.h opcode.h lua.h func.h lex.h inout.h \
  59. luadebug.h parser.h
  60. lua.o : lua.c lua.h lualib.h
  61. mathlib.o : mathlib.c lualib.h lua.h
  62. mem.o : mem.c mem.h lua.h table.h tree.h types.h opcode.h func.h
  63. opcode.o : opcode.c luadebug.h lua.h mem.h opcode.h types.h tree.h func.h hash.h \
  64. inout.h table.h fallback.h undump.h
  65. parser.o : parser.c luadebug.h lua.h mem.h lex.h opcode.h types.h tree.h func.h \
  66. hash.h inout.h table.h
  67. strlib.o : strlib.c lua.h lualib.h
  68. table.o : table.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h \
  69. inout.h fallback.h luadebug.h
  70. tree.o : tree.c mem.h lua.h tree.h types.h lex.h hash.h opcode.h func.h table.h
  71. undump.o : undump.c opcode.h lua.h types.h tree.h func.h mem.h table.h undump.h