makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # $Id: makefile,v 1.27 1996/08/28 20:45:48 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. CONFIG = -DPOPEN -D_POSIX_SOURCE
  8. # Compilation parameters
  9. CC = gcc
  10. CFLAGS = $(CONFIG) -Wall -Wmissing-prototypes -Wshadow -ansi -O2 -pedantic
  11. #CC = acc
  12. #CFLAGS = -fast -I/usr/5include
  13. AR = ar
  14. ARFLAGS = rvl
  15. # Aplication modules
  16. LUAOBJS = \
  17. parser.o \
  18. lex.o \
  19. opcode.o \
  20. hash.o \
  21. table.o \
  22. inout.o \
  23. tree.o \
  24. fallback.o \
  25. mem.o \
  26. func.o \
  27. undump.o
  28. LIBOBJS = \
  29. iolib.o \
  30. mathlib.o \
  31. strlib.o
  32. lua : lua.o liblua.a liblualib.a
  33. $(CC) $(CFLAGS) -o $@ lua.o -L. -llua -llualib -lm
  34. liblua.a : $(LUAOBJS)
  35. $(AR) $(ARFLAGS) $@ $?
  36. ranlib $@
  37. liblualib.a : $(LIBOBJS)
  38. $(AR) $(ARFLAGS) $@ $?
  39. ranlib $@
  40. liblua.so.1.0 : lua.o
  41. ld -o liblua.so.1.0 $(LUAOBJS)
  42. y.tab.c y.tab.h : lua.stx
  43. yacc -d lua.stx
  44. parser.c : y.tab.c
  45. sed -e 's/yy/luaY_/g' -e 's/malloc\.h/stdlib\.h/g' y.tab.c > parser.c
  46. parser.h : y.tab.h
  47. sed -e 's/yy/luaY_/g' y.tab.h > parser.h
  48. clear :
  49. rcsclean
  50. rm -f *.o
  51. rm -f parser.c parser.h y.tab.c y.tab.h
  52. co lua.h lualib.h luadebug.h
  53. %.h : RCS/%.h,v
  54. co $@
  55. %.c : RCS/%.c,v
  56. co $@
  57. fallback.o : fallback.c mem.h fallback.h lua.h opcode.h types.h tree.h func.h \
  58. table.h
  59. func.o : func.c luadebug.h lua.h table.h tree.h types.h opcode.h func.h mem.h
  60. hash.o : hash.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h
  61. inout.o : inout.c lex.h opcode.h lua.h types.h tree.h func.h inout.h table.h \
  62. mem.h
  63. iolib.o : iolib.c lua.h luadebug.h lualib.h
  64. lex.o : lex.c mem.h tree.h types.h table.h opcode.h lua.h func.h lex.h inout.h \
  65. luadebug.h parser.h
  66. lua.o : lua.c lua.h lualib.h
  67. mathlib.o : mathlib.c lualib.h lua.h
  68. mem.o : mem.c mem.h lua.h
  69. opcode.o : opcode.c luadebug.h lua.h mem.h opcode.h types.h tree.h func.h hash.h \
  70. inout.h table.h fallback.h undump.h
  71. parser.o : parser.c luadebug.h lua.h mem.h lex.h opcode.h types.h tree.h func.h \
  72. hash.h inout.h table.h
  73. strlib.o : strlib.c lua.h lualib.h
  74. table.o : table.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h \
  75. inout.h fallback.h luadebug.h
  76. tree.o : tree.c mem.h lua.h tree.h types.h lex.h hash.h opcode.h func.h table.h
  77. undump.o : undump.c opcode.h lua.h types.h tree.h func.h mem.h table.h undump.h