makefile 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. #
  2. ## $Id: makefile,v 1.29 2000/10/30 17:50:00 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_DEPRECATEDFUNCS to include obsolete functions
  24. CONFIG = -DPOPEN -D_POSIX_SOURCE
  25. #CONFIG = -DOLD_ANSI -DLUA_DEBUG -DLUA_COMPAT_READPATTERN -DLUA_COMPAT_ARGRET
  26. # -DLUA_DEPRECATEDFUNCS
  27. # Compilation parameters
  28. CC = gcc
  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. lapi.o \
  48. lmem.o \
  49. lstring.o \
  50. ltable.o \
  51. ltm.o \
  52. lvm.o \
  53. ldo.o \
  54. lobject.o \
  55. lfunc.o \
  56. lgc.o \
  57. lcode.o \
  58. lparser.o \
  59. llex.o \
  60. lundump.o \
  61. lzio.o \
  62. ldebug.o \
  63. ltests.o
  64. LIBOBJS = \
  65. lauxlib.o \
  66. lbaselib.o \
  67. liolib.o \
  68. lmathlib.o \
  69. lstrlib.o \
  70. ldblib.o
  71. lua : lua.o liblua.a liblualib.a
  72. $(CC) $(CFLAGS) -o $@ lua.o -L. -llua -llualib -lm
  73. liblua.a : $(LUAOBJS)
  74. $(AR) $(ARFLAGS) $@ $?
  75. ranlib $@
  76. liblualib.a : $(LIBOBJS)
  77. $(AR) $(ARFLAGS) $@ $?
  78. ranlib $@
  79. liblua.so.1.0 : lua.o
  80. ld -o liblua.so.1.0 $(LUAOBJS)
  81. clear :
  82. rcsclean
  83. rm -f *.o *.a
  84. %.h : RCS/%.h,v
  85. co $(CO_OPTIONS) $@
  86. %.c : RCS/%.c,v
  87. co $(CO_OPTIONS) $@
  88. lapi.o: lapi.c lua.h lapi.h lobject.h llimits.h ldo.h lstate.h \
  89. luadebug.h lfunc.h lgc.h lmem.h lstring.h ltable.h ltm.h lvm.h
  90. lauxlib.o: lauxlib.c lua.h lauxlib.h luadebug.h
  91. lbaselib.o: lbaselib.c lua.h lauxlib.h luadebug.h lualib.h
  92. lcode.o: lcode.c /usr/include/stdlib.h lua.h lcode.h llex.h lobject.h \
  93. llimits.h lzio.h lopcodes.h lparser.h ldo.h lstate.h luadebug.h \
  94. lmem.h
  95. ldblib.o: ldblib.c lua.h lauxlib.h luadebug.h lualib.h
  96. ldebug.o: ldebug.c lua.h lapi.h lobject.h llimits.h lcode.h llex.h \
  97. lzio.h lopcodes.h lparser.h ldebug.h lstate.h luadebug.h ldo.h \
  98. lfunc.h lstring.h ltable.h ltm.h
  99. ldo.o: ldo.c lua.h ldebug.h lstate.h lobject.h llimits.h luadebug.h \
  100. ldo.h lgc.h lmem.h lparser.h lzio.h lstring.h ltable.h ltm.h \
  101. lundump.h lvm.h
  102. lfunc.o: lfunc.c lua.h lfunc.h lobject.h llimits.h lmem.h lstate.h \
  103. luadebug.h
  104. lgc.o: lgc.c lua.h ldo.h lobject.h llimits.h lstate.h luadebug.h \
  105. lfunc.h lgc.h lmem.h lstring.h ltable.h ltm.h
  106. liolib.o: liolib.c lua.h lauxlib.h luadebug.h lualib.h
  107. llex.o: llex.c lua.h llex.h lobject.h llimits.h lzio.h lmem.h \
  108. lparser.h lstate.h luadebug.h lstring.h ltable.h
  109. lmathlib.o: lmathlib.c lua.h lauxlib.h lualib.h
  110. lmem.o: lmem.c lua.h ldo.h lobject.h llimits.h lstate.h luadebug.h \
  111. lmem.h
  112. lobject.o: lobject.c lua.h lmem.h llimits.h lobject.h lstate.h \
  113. luadebug.h
  114. lparser.o: lparser.c lua.h lcode.h llex.h lobject.h llimits.h lzio.h \
  115. lopcodes.h lparser.h lfunc.h lmem.h lstate.h luadebug.h lstring.h
  116. lstate.o: lstate.c lua.h ldo.h lobject.h llimits.h lstate.h luadebug.h \
  117. lgc.h llex.h lzio.h lmem.h lstring.h ltable.h ltm.h
  118. lstring.o: lstring.c lua.h lmem.h llimits.h lobject.h lstate.h \
  119. luadebug.h lstring.h
  120. lstrlib.o: lstrlib.c lua.h lauxlib.h lualib.h
  121. ltable.o: ltable.c lua.h lmem.h llimits.h lobject.h lstate.h \
  122. luadebug.h lstring.h ltable.h
  123. ltests.o: ltests.c lua.h lapi.h lobject.h llimits.h lauxlib.h lcode.h \
  124. llex.h lzio.h lopcodes.h lparser.h ldebug.h lstate.h luadebug.h ldo.h \
  125. lfunc.h lmem.h lstring.h ltable.h lualib.h
  126. ltm.o: ltm.c lua.h ldo.h lobject.h llimits.h lstate.h luadebug.h \
  127. lmem.h ltm.h
  128. lua.o: lua.c lua.h luadebug.h lualib.h
  129. lundump.o: lundump.c lfunc.h lobject.h llimits.h lua.h lmem.h \
  130. lopcodes.h lstring.h lstate.h luadebug.h lundump.h lzio.h
  131. lvm.o: lvm.c lua.h lapi.h lobject.h llimits.h ldebug.h lstate.h \
  132. luadebug.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h ltm.h \
  133. lvm.h
  134. lzio.o: lzio.c lua.h lzio.h