makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # $Id: makefile,v 1.19 1996/02/07 18:14:38 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 luadebug.h lua.h table.h tree.h types.h opcode.h func.h mem.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 lex.h opcode.h lua.h types.h tree.h func.h inout.h table.h
  55. iolib.o : iolib.c lua.h luadebug.h lualib.h
  56. lex.o : lex.c mem.h tree.h types.h table.h opcode.h lua.h func.h lex.h inout.h \
  57. luadebug.h parser.h ugly.h
  58. lua.o : lua.c lua.h lualib.h
  59. mathlib.o : mathlib.c lualib.h lua.h
  60. mem.o : mem.c mem.h lua.h table.h tree.h types.h opcode.h func.h
  61. opcode.o : opcode.c luadebug.h lua.h mem.h opcode.h types.h tree.h func.h hash.h \
  62. inout.h table.h fallback.h
  63. parser.o : parser.c luadebug.h lua.h mem.h lex.h opcode.h types.h tree.h func.h \
  64. hash.h inout.h table.h
  65. strlib.o : strlib.c lua.h lualib.h
  66. table.o : table.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h \
  67. inout.h fallback.h luadebug.h
  68. tree.o : tree.c mem.h lua.h tree.h types.h hash.h opcode.h func.h table.h