makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # $Id: makefile,v 1.15 1995/10/17 18:16:58 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. parser.c : lua.stx
  39. yacc++ -d lua.stx ; mv -f y.tab.c parser.c ; mv -f y.tab.h parser.h
  40. clear :
  41. rcsclean
  42. rm -f *.o
  43. rm -f parser.c parser.h
  44. co lua.h lualib.h luadebug.h
  45. % : RCS/%,v
  46. co $@
  47. fallback.o : fallback.c mem.h fallback.h opcode.h lua.h types.h tree.h func.h
  48. func.o : func.c table.h tree.h types.h opcode.h lua.h func.h mem.h
  49. hash.o : hash.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h
  50. inout.o : inout.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
  51. table.h
  52. iolib.o : iolib.c lua.h lualib.h luadebug.h
  53. lex.o : lex.c mem.h tree.h types.h table.h opcode.h lua.h func.h inout.h parser.h \
  54. ugly.h
  55. lua.o : lua.c lua.h lualib.h
  56. mathlib.o : mathlib.c lualib.h lua.h
  57. mem.o : mem.c mem.h lua.h
  58. opcode.o : opcode.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
  59. table.h fallback.h luadebug.h
  60. parser.o : parser.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
  61. table.h
  62. strlib.o : strlib.c lua.h lualib.h
  63. table.o : table.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h \
  64. inout.h fallback.h
  65. tree.o : tree.c mem.h lua.h tree.h types.h table.h opcode.h func.h