makefile 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. #
  2. ## $Id: makefile,v 1.25 2000/04/24 21:05:11 roberto Exp roberto $
  3. ## Makefile
  4. ## See Copyright Notice in lua.h
  5. #
  6. #CONFIGURATION
  7. # define (undefine) POPEN if your system (does not) support piped I/O
  8. #
  9. # define (undefine) _POSIX_SOURCE if your system is (not) POSIX compliant
  10. #
  11. # define (undefine) OLD_ANSI if your system does NOT have some new ANSI
  12. # facilities (e.g. strerror, locale.h, memmove). SunOS does not comply;
  13. # so, add "-DOLD_ANSI" on SunOS
  14. #
  15. # define LUA_NUM_TYPE if you need numbers to be different from double
  16. # (for instance, -DLUA_NUM_TYPE=float)
  17. # you may need to adapat the code, too.
  18. #
  19. # define LUA_COMPAT_READPATTERN if you need read patterns
  20. # (only for compatibility with previous versions)
  21. # define LUA_COMPAT_ARGRET for compatibility in the way function results
  22. # are passed as arguments
  23. # define LUA_DEPRECATETFUNCS to include obsolete functions
  24. CONFIG = -DPOPEN -D_POSIX_SOURCE -DDEBUG
  25. #CONFIG = -DOLD_ANSI -DDEBUG -DLUA_COMPAT_READPATTERN -DLUA_COMPAT_ARGRET
  26. # -DLUA_DEPRECATETFUNCS
  27. # Compilation parameters
  28. CC = g++
  29. CWARNS = -Wall -W -pedantic \
  30. -Waggregate-return \
  31. -Wcast-align \
  32. -Wmissing-prototypes \
  33. -Wnested-externs \
  34. -Wpointer-arith \
  35. -Wshadow \
  36. -Wwrite-strings
  37. # -Wcast-qual
  38. # -Wtraditional
  39. CFLAGS = $(CONFIG) $(CWARNS) -ansi -O2
  40. # To make early versions
  41. CO_OPTIONS =
  42. AR = ar
  43. ARFLAGS = rvl
  44. # Aplication modules
  45. LUAOBJS = \
  46. lstate.o \
  47. lref.o \
  48. lapi.o \
  49. lauxlib.o \
  50. lbuiltin.o \
  51. lmem.o \
  52. lstring.o \
  53. ltable.o \
  54. ltm.o \
  55. lvm.o \
  56. ldo.o \
  57. lobject.o \
  58. lbuffer.o \
  59. lfunc.o \
  60. lgc.o \
  61. lcode.o \
  62. lparser.o \
  63. llex.o \
  64. lundump.o \
  65. lzio.o \
  66. ldebug.o \
  67. ltests.o
  68. LIBOBJS = \
  69. liolib.o \
  70. lmathlib.o \
  71. lstrlib.o \
  72. ldblib.o
  73. lua : lua.o liblua.a liblualib.a
  74. $(CC) $(CFLAGS) -o $@ lua.o -L. -llua -llualib -lm
  75. liblua.a : $(LUAOBJS)
  76. $(AR) $(ARFLAGS) $@ $?
  77. ranlib $@
  78. liblualib.a : $(LIBOBJS)
  79. $(AR) $(ARFLAGS) $@ $?
  80. ranlib $@
  81. liblua.so.1.0 : lua.o
  82. ld -o liblua.so.1.0 $(LUAOBJS)
  83. clear :
  84. rcsclean
  85. rm -f *.o *.a
  86. %.h : RCS/%.h,v
  87. co $(CO_OPTIONS) $@
  88. %.c : RCS/%.c,v
  89. co $(CO_OPTIONS) $@
  90. lapi.o: lapi.c lua.h lapi.h lobject.h llimits.h lauxlib.h ldo.h \
  91. lstate.h luadebug.h lfunc.h lgc.h lmem.h lref.h lstring.h ltable.h \
  92. ltm.h lvm.h
  93. lauxlib.o: lauxlib.c lua.h lauxlib.h luadebug.h
  94. lbuffer.o: lbuffer.c lua.h lauxlib.h lmem.h llimits.h lstate.h \
  95. lobject.h luadebug.h
  96. lbuiltin.o: lbuiltin.c lua.h lapi.h lobject.h llimits.h lauxlib.h \
  97. lbuiltin.h ldo.h lstate.h luadebug.h lfunc.h lmem.h lstring.h \
  98. ltable.h ltm.h lundump.h lzio.h lvm.h
  99. lcode.o: lcode.c /usr/include/stdlib.h lua.h lcode.h llex.h lobject.h \
  100. llimits.h lzio.h lopcodes.h lparser.h ldo.h lstate.h luadebug.h \
  101. lmem.h
  102. ldblib.o: ldblib.c lua.h lauxlib.h luadebug.h lualib.h
  103. ldebug.o: ldebug.c lua.h lapi.h lobject.h llimits.h lauxlib.h lcode.h \
  104. llex.h lzio.h lopcodes.h lparser.h ldebug.h lstate.h luadebug.h ldo.h \
  105. lfunc.h ltable.h ltm.h
  106. ldo.o: ldo.c lua.h lauxlib.h ldebug.h lstate.h lobject.h llimits.h \
  107. luadebug.h ldo.h lgc.h lmem.h lparser.h lzio.h lstring.h ltable.h \
  108. ltm.h lundump.h lvm.h
  109. lfunc.o: lfunc.c lua.h lfunc.h lobject.h llimits.h lmem.h lstate.h \
  110. luadebug.h
  111. lgc.o: lgc.c lua.h ldo.h lobject.h llimits.h lstate.h luadebug.h \
  112. lfunc.h lgc.h lmem.h lref.h lstring.h ltable.h ltm.h
  113. liolib.o: liolib.c lua.h lauxlib.h luadebug.h lualib.h
  114. llex.o: llex.c lua.h lauxlib.h llex.h lobject.h llimits.h lzio.h \
  115. lmem.h lparser.h lstate.h luadebug.h lstring.h ltable.h
  116. lmathlib.o: lmathlib.c lua.h lauxlib.h lualib.h
  117. lmem.o: lmem.c lua.h ldo.h lobject.h llimits.h lstate.h luadebug.h \
  118. lmem.h
  119. lobject.o: lobject.c lua.h lobject.h llimits.h
  120. lparser.o: lparser.c lua.h lcode.h llex.h lobject.h llimits.h lzio.h \
  121. lopcodes.h lparser.h lfunc.h lmem.h lstate.h luadebug.h lstring.h
  122. lref.o: lref.c lua.h lapi.h lobject.h llimits.h lmem.h lref.h lstate.h \
  123. luadebug.h
  124. lstate.o: lstate.c lua.h lauxlib.h lbuiltin.h ldo.h lobject.h \
  125. llimits.h lstate.h luadebug.h lgc.h llex.h lzio.h lmem.h lref.h \
  126. lstring.h ltable.h ltm.h
  127. lstring.o: lstring.c lua.h lmem.h llimits.h lobject.h lstate.h \
  128. luadebug.h lstring.h
  129. lstrlib.o: lstrlib.c lua.h lauxlib.h lualib.h
  130. ltable.o: ltable.c lua.h lauxlib.h lmem.h llimits.h lobject.h lstate.h \
  131. luadebug.h lstring.h ltable.h
  132. ltests.o: ltests.c lua.h lapi.h lobject.h llimits.h lauxlib.h lcode.h \
  133. llex.h lzio.h lopcodes.h lparser.h ldebug.h lstate.h luadebug.h ldo.h \
  134. lfunc.h lmem.h lstring.h ltable.h
  135. ltm.o: ltm.c lua.h lauxlib.h lmem.h llimits.h lobject.h lstate.h \
  136. luadebug.h ltm.h
  137. lua.o: lua.c lua.h luadebug.h lualib.h
  138. lundump.o: lundump.c lua.h lauxlib.h lfunc.h lobject.h llimits.h \
  139. lmem.h lopcodes.h lstring.h lstate.h luadebug.h lundump.h lzio.h
  140. lvm.o: lvm.c lua.h lapi.h lobject.h llimits.h lauxlib.h ldebug.h \
  141. lstate.h luadebug.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h \
  142. ltm.h lvm.h
  143. lzio.o: lzio.c lua.h lzio.h