makefile 2.3 KB

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