makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # $Id: makefile,v 1.12 1995/02/02 19:02:03 roberto Exp $
  2. # Compilation parameters
  3. CC = gcc
  4. CFLAGS = -I/usr/5include -Wall -Wmissing-prototypes -Wshadow -ansi -O2
  5. #CC = acc
  6. #CFLAGS = -fast -I/usr/5include
  7. AR = ar
  8. ARFLAGS = rvl
  9. # Aplication modules
  10. LUAMOD = \
  11. parser \
  12. lex \
  13. opcode \
  14. hash \
  15. table \
  16. inout \
  17. tree \
  18. fallback\
  19. mem
  20. LIBMOD = \
  21. iolib \
  22. strlib \
  23. mathlib
  24. LUAOBJS = $(LUAMOD:%=%.o)
  25. LIBOBJS = $(LIBMOD:%=%.o)
  26. lua : lua.o lua.a lualib.a
  27. $(CC) $(CFLAGS) -o $@ lua.c lua.a lualib.a -lm
  28. lua.a : parser.c $(LUAOBJS)
  29. $(AR) $(ARFLAGS) $@ $?
  30. ranlib lua.a
  31. lualib.a : $(LIBOBJS)
  32. $(AR) $(ARFLAGS) $@ $?
  33. ranlib $@
  34. liblua.so.1.0 : lua.o
  35. ld -o liblua.so.1.0 $(LUAOBJS)
  36. %.o : %.c
  37. $(CC) $(CFLAGS) -c -o $@ $<
  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
  45. % : RCS/%,v
  46. co $@
  47. fallback.o : fallback.c mem.h fallback.h opcode.h lua.h types.h tree.h inout.h
  48. hash.o : hash.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h
  49. inout.o : inout.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h
  50. iolib.o : iolib.c mem.h lua.h lualib.h
  51. lex.o : lex.c tree.h types.h table.h opcode.h lua.h inout.h parser.h ugly.h
  52. lua.o : lua.c lua.h lualib.h
  53. mathlib.o : mathlib.c lualib.h lua.h
  54. mem.o : mem.c mem.h lua.h
  55. opcode.o : opcode.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h \
  56. fallback.h
  57. strlib.o : strlib.c mem.h lua.h lualib.h
  58. table.o : table.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h \
  59. fallback.h
  60. tree.o : tree.c mem.h lua.h tree.h types.h table.h opcode.h
  61. parser.o : parser.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h