makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # $Id: makefile,v 1.35 1997/06/16 16:50:22 roberto Exp roberto $
  2. #configuration
  3. # define (undefine) POPEN if your system (does not) support piped I/O
  4. # define (undefine) _POSIX_SOURCE if your system is (not) POSIX compliant
  5. #define (undefine) NOSTRERROR if your system does NOT have function "strerror"
  6. # (although this is ANSI, SunOS does not comply; so, add "-DNOSTRERROR" on SunOS)
  7. # define LUA_COMPAT2_5=0 if yous system does not need to be compatible with
  8. # version 2.5 (or older)
  9. CONFIG = -DPOPEN -D_POSIX_SOURCE
  10. # Compilation parameters
  11. CC = gcc
  12. CWARNS = -Wall -Wmissing-prototypes -Wshadow -pedantic -Wpointer-arith -Wcast-align -Waggregate-return
  13. CFLAGS = $(CONFIG) $(CWARNS) -ansi -O2 -fomit-frame-pointer
  14. #CC = acc
  15. #CFLAGS = -fast -I/usr/5include
  16. AR = ar
  17. ARFLAGS = rvl
  18. # Aplication modules
  19. LUAOBJS = \
  20. parser.o \
  21. lex.o \
  22. opcode.o \
  23. hash.o \
  24. table.o \
  25. inout.o \
  26. tree.o \
  27. fallback.o \
  28. luamem.o \
  29. func.o \
  30. undump.o \
  31. auxlib.o \
  32. zio.o
  33. LIBOBJS = \
  34. iolib.o \
  35. mathlib.o \
  36. strlib.o
  37. lua : lua.o liblua.a liblualib.a
  38. $(CC) $(CFLAGS) -o $@ lua.o -L. -llua -llualib -lm
  39. liblua.a : $(LUAOBJS)
  40. $(AR) $(ARFLAGS) $@ $?
  41. ranlib $@
  42. liblualib.a : $(LIBOBJS)
  43. $(AR) $(ARFLAGS) $@ $?
  44. ranlib $@
  45. liblua.so.1.0 : lua.o
  46. ld -o liblua.so.1.0 $(LUAOBJS)
  47. y.tab.c y.tab.h : lua.stx
  48. yacc -d lua.stx
  49. parser.c : y.tab.c
  50. sed -e 's/yy/luaY_/g' -e 's/malloc\.h/stdlib\.h/g' y.tab.c > parser.c
  51. parser.h : y.tab.h
  52. sed -e 's/yy/luaY_/g' y.tab.h > parser.h
  53. clear :
  54. rcsclean
  55. rm -f *.o
  56. rm -f parser.c parser.h y.tab.c y.tab.h
  57. co lua.h lualib.h luadebug.h
  58. %.h : RCS/%.h,v
  59. co $@
  60. %.c : RCS/%.c,v
  61. co $@
  62. auxlib.o: auxlib.c lua.h auxlib.h luadebug.h
  63. fallback.o: fallback.c auxlib.h lua.h luamem.h fallback.h opcode.h \
  64. types.h tree.h func.h table.h hash.h
  65. func.o: func.c luadebug.h lua.h table.h tree.h types.h opcode.h func.h \
  66. luamem.h
  67. hash.o: hash.c luamem.h opcode.h lua.h types.h tree.h func.h hash.h \
  68. table.h auxlib.h
  69. inout.o: inout.c auxlib.h lua.h fallback.h opcode.h types.h tree.h \
  70. func.h hash.h inout.h lex.h zio.h luamem.h table.h undump.h
  71. iolib.o: iolib.c lua.h auxlib.h luadebug.h lualib.h
  72. lex.o: lex.c auxlib.h lua.h luamem.h tree.h types.h table.h opcode.h \
  73. func.h lex.h zio.h inout.h luadebug.h parser.h
  74. lua.o: lua.c lua.h auxlib.h lualib.h
  75. luamem.o: luamem.c luamem.h lua.h
  76. mathlib.o: mathlib.c lualib.h lua.h auxlib.h
  77. opcode.o: opcode.c luadebug.h lua.h luamem.h opcode.h types.h tree.h \
  78. func.h hash.h inout.h table.h fallback.h auxlib.h lex.h zio.h
  79. parser.o: parser.c luadebug.h lua.h luamem.h lex.h zio.h opcode.h \
  80. types.h tree.h func.h hash.h inout.h table.h
  81. strlib.o: strlib.c lua.h auxlib.h lualib.h
  82. table.o: table.c luamem.h auxlib.h lua.h func.h types.h tree.h \
  83. opcode.h hash.h table.h inout.h fallback.h luadebug.h
  84. tree.o: tree.c luamem.h lua.h tree.h types.h lex.h zio.h hash.h \
  85. opcode.h func.h table.h fallback.h
  86. undump.o: undump.c auxlib.h lua.h opcode.h types.h tree.h func.h \
  87. luamem.h table.h undump.h zio.h
  88. y.tab.o: y.tab.c luadebug.h lua.h luamem.h lex.h zio.h opcode.h \
  89. types.h tree.h func.h hash.h inout.h table.h
  90. zio.o: zio.c zio.h