lua.nut 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. --
  2. -- Copyright (C) 2008 by egnite GmbH.
  3. --
  4. -- All rights reserved.
  5. --
  6. -- Redistribution and use in source and binary forms, with or without
  7. -- modification, are permitted provided that the following conditions
  8. -- are met:
  9. --
  10. -- 1. Redistributions of source code must retain the above copyright
  11. -- notice, this list of conditions and the following disclaimer.
  12. -- 2. Redistributions in binary form must reproduce the above copyright
  13. -- notice, this list of conditions and the following disclaimer in the
  14. -- documentation and/or other materials provided with the distribution.
  15. -- 3. Neither the name of the copyright holders nor the names of
  16. -- contributors may be used to endorse or promote products derived
  17. -- from this software without specific prior written permission.
  18. --
  19. -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. -- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  23. -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. -- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. -- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. -- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. -- THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. -- SUCH DAMAGE.
  31. --
  32. -- For additional information see http://www.ethernut.de/
  33. --
  34. -- Lua Script Interpreter
  35. --
  36. -- $Id: lua.nut 4444 2012-08-18 09:04:23Z haraldkipp $
  37. --
  38. nutlua =
  39. {
  40. {
  41. name = "nutlua_std_library",
  42. brief = "Standard Libraries",
  43. description = "Standard libraries are automatically loaded. "..
  44. "Not all targets offer enough memory to load "..
  45. "all libraries.",
  46. requires = { "TOOL_GCC" },
  47. sources =
  48. {
  49. "lapi.c",
  50. "ldo.c",
  51. "ldump.c",
  52. "ldebug.c",
  53. "lfunc.c",
  54. "lgc.c",
  55. "lmem.c",
  56. "lobject.c",
  57. "lopcodes.c",
  58. "lstate.c",
  59. "lstring.c",
  60. "ltable.c",
  61. "ltm.c",
  62. "lundump.c",
  63. "lvm.c",
  64. "lzio.c",
  65. "lauxlib.c",
  66. "linit.c",
  67. "loadlib.c",
  68. "lbaselib.c",
  69. "liolib.c",
  70. "loslib.c",
  71. "ldblib.c",
  72. "lmathlib.c",
  73. "ltablib.c",
  74. "lstrlib.c",
  75. "lcode.c",
  76. "llex.c",
  77. "lparser.c",
  78. "lrotable.c"
  79. },
  80. options =
  81. {
  82. {
  83. macro = "NUTLUA_OPTIMIZE_MEMORY",
  84. brief = "Memory Optimization",
  85. description = "Minimizes RAM footprint at the expense of speed.\n\n"..
  86. "0 - no optimizations\n"..
  87. "1 - optimize while maitaining full compatibility with the test suite\n"..
  88. "2 - aggresive optimizations (breaks compatibility with some tests)",
  89. type = "enumerated",
  90. default = "0",
  91. choices = { "0", "1", "2" },
  92. file = "include/cfg/lua.h"
  93. },
  94. {
  95. macro = "NUTLUA_FLOATING_POINT",
  96. brief = "Floating Point Numbers",
  97. description = "Floating point numbers are used when enabled.",
  98. requires = { "FLOATING_POINT_IO" },
  99. flavor = "boolean",
  100. file = "include/cfg/lua.h"
  101. },
  102. {
  103. macro = "NUTLUA_DEBUGLIB_IS_STANDARD",
  104. brief = "Debug Library",
  105. description = "Lua debug library is standard when enabled.",
  106. flavor = "boolean",
  107. file = "include/cfg/lua.h"
  108. },
  109. {
  110. macro = "NUTLUA_IOLIB_IS_STANDARD",
  111. brief = "I/O Library",
  112. description = "Lua I/O library is standard when enabled.",
  113. flavor = "boolean",
  114. file = "include/cfg/lua.h"
  115. },
  116. {
  117. macro = "NUTLUA_IOLIB_TCP",
  118. brief = "TCP I/O",
  119. description = "Lua I/O library with TCP/IP support.",
  120. flavor = "boolean",
  121. file = "include/cfg/lua.h"
  122. },
  123. {
  124. macro = "NUTLUA_LOADLIB_IS_STANDARD",
  125. brief = "Package Load Library",
  126. description = "Lua package load library is standard when enabled.",
  127. flavor = "boolean",
  128. file = "include/cfg/lua.h"
  129. },
  130. {
  131. macro = "NUTLUA_MATHLIB_IS_STANDARD",
  132. brief = "Math Library",
  133. description = "Lua math library is standard when enabled.",
  134. flavor = "boolean",
  135. file = "include/cfg/lua.h"
  136. },
  137. {
  138. macro = "NUTLUA_OSLIB_IS_STANDARD",
  139. brief = "OS Library",
  140. description = "Lua OS library is standard when enabled.",
  141. flavor = "boolean",
  142. file = "include/cfg/lua.h"
  143. },
  144. {
  145. macro = "NUTLUA_STRLIB_IS_STANDARD",
  146. brief = "String Library",
  147. description = "Lua string library is standard when enabled.",
  148. flavor = "boolean",
  149. file = "include/cfg/lua.h"
  150. },
  151. {
  152. macro = "NUTLUA_TABLIB_IS_STANDARD",
  153. brief = "Table Library",
  154. description = "Lua table library is standard when enabled.",
  155. flavor = "boolean",
  156. file = "include/cfg/lua.h"
  157. },
  158. {
  159. macro = "NUTLUA_PARSER_EXCLUDED",
  160. brief = "Exclude Parser",
  161. description = "Lua parser is excluded when enabled.",
  162. flavor = "boolean",
  163. file = "include/cfg/lua.h"
  164. },
  165. {
  166. macro = "NUTLUA_DUMP_EXCLUDED",
  167. brief = "Exclude Dump",
  168. description = "Lua binary code dump is excluded when enabled.",
  169. flavor = "boolean",
  170. file = "include/cfg/lua.h"
  171. }
  172. }
  173. }
  174. }