1. # configuration file for making Lua 5.0
  2. # see INSTALL for installation instructions
  3. # These are default values. Skip this section and see the explanations below.
  4. LOADLIB=
  5. DLLIB=
  6. NUMBER=
  7. POPEN=
  8. TMPNAM=
  9. DEGREES=
  10. USERCONF=
  11. # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
  12. # --------------------------------------------------------------- Lua libraries
  13. # Support for dynamically loading C libraries for Lua is a very important
  14. # feature, which we strongly recommend be enabled. By default, this support is
  15. # enabled on Windows systems (see below) but disabled on other systems because
  16. # it relies on system-dependent code that is not part of ANSI C. For more
  17. # information on dynamic loading, read the comments in src/lib/liolib.c .
  18. #
  19. # To enable support for dynamic loading on Unix systems that support the dlfcn
  20. # interface (e.g., Linux, Solaris, IRIX, BSD, AIX, HPUX, and probably others),
  21. # uncomment the next two lines.
  22. #
  23. #LOADLIB= -DUSE_DLOPEN=1
  24. #DLLIB= -ldl
  25. #
  26. # In Linux with gcc, you should also uncomment the next definition for
  27. # MYLDFLAGS, which passes -E (= -export-dynamic) to the linker. This option
  28. # allows dynamic libraries to link back to the `lua' program, so that they do
  29. # not need the Lua libraries. (Other systems may have an equivalent facility.)
  30. #
  31. #MYLDFLAGS= -Wl,-E
  32. #
  33. # On Windows systems. support for dynamic loading is enabled by default.
  34. # To disable this support, uncomment the next line.
  35. #
  36. #LOADLIB= -DUSE_DLL=0
  37. # The Lua IO library (src/lib/liolib.c) has support for pipes using popen and
  38. # pclose. This support is enabled by default on POSIX systems.
  39. # If your system is not POSIX but has popen and pclose, define USE_POPEN=1.
  40. # If you don't want to support pipes, define USE_POPEN=0.
  41. #
  42. #POPEN= -DUSE_POPEN=1
  43. #POPEN= -DUSE_POPEN=0
  44. #
  45. # The form below will probably work in (some) Windows systems.
  46. #
  47. #POPEN= -DUSE_POPEN=1 -Dpopen=_popen -Dpclose=_pclose
  48. # The Lua OS library (src/lib/liolib.c) exports an interface to the C function
  49. # tmpnam, which gcc now thinks is `dangerous'. So, support for tmpnam is
  50. # disabled by default when compiling with gcc.
  51. # If you still want to use tmpnam, define USE_TMPNAME=1. If you don't want to
  52. # use tmpnam even if you're not compiling with gcc, define USE_TMPNAME=0.
  53. #
  54. #TMPNAM= -DUSE_TMPNAME=1
  55. #TMPNAM= -DUSE_TMPNAME=0
  56. # The Lua math library (src/lib/lmathlib.c) now operates in radians, unlike
  57. # previous versions of Lua, which used degrees. To use degrees instead of
  58. # radians, define USE_DEGREES.
  59. #
  60. #DEGREES= -DUSE_DEGREES
  61. # ------------------------------------------------------------------ Lua core
  62. # Lua uses double for numbers. To change this, uncomment and edit the following
  63. # line, changing USE_XXX to one of USE_DOUBLE, USE_FLOAT, USE_LONG, USE_INT.
  64. #
  65. #NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_XXX
  66. # When compiling Lua with gcc on a Pentium machine, using a fast rounding
  67. # method for the conversion of doubles to ints can give around 20% speed
  68. # improvement. To use this rounding method, uncomment the following line.
  69. #NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_FASTROUND
  70. # For partial compatibility with old upvalue syntax, define LUA_COMPATUPSYNTAX.
  71. # For partial compatibility with old upvalue behavior in C functions, define
  72. # LUA_COMPATUPVALUES. Add these definitions to MYCFLAGS.
  73. #
  74. # -DLUA_COMPATUPSYNTAX -DLUA_COMPATUPVALUES
  75. # ------------------------------------------------------------- Lua interpreter
  76. # The stand-alone Lua interpreter needs the math functions, which are usually
  77. # in libm.a (-lm). If your C library already includes the math functions,
  78. # or if you are using a modified interpreter that does not need them,
  79. # then comment the following line or add the appropriates libraries.
  80. #
  81. EXTRA_LIBS= -lm
  82. # If you want to customize the stand-alone Lua interpreter, uncomment and
  83. # edit the following two lines; also edit etc/saconfig.c to suit your needs.
  84. # -DUSE_READLINE adds line editing and history to the interpreter. You need
  85. # to add -lreadline (and perhaps also -lhistory and -lcurses or -lncurses)
  86. # to EXTRA_LIBS.
  87. #
  88. #USERCONF=-DLUA_USERCONFIG='"$(LUA)/etc/saconfig.c"' -DUSE_READLINE
  89. #EXTRA_LIBS= -lm -ldl -lreadline # -lhistory -lcurses -lncurses
  90. # ------------------------------------------------------------------ C compiler
  91. # You need an ANSI C compiler. gcc is a popular one. We do not use -ansi in
  92. # WARN because it disables POSIX features used in the libraries.
  93. #
  94. CC= gcc
  95. WARN= -m32 -Wall
  96. # ------------------------------------------------------------------ C options
  97. # Write here any options you may need for your C compiler.
  98. # If you are using gcc, -O3 will get you a faster but larger code. You can
  99. # also add -fomit-frame-pointer to get even faster code at the cost of losing
  100. # debug information. If you only want the shared libraries, you may want to
  101. # add -fPIC to MYCFLAGS.
  102. #
  103. MYCFLAGS= -O2 -g
  104. #MYCFLAGS= -O3 -fomit-frame-pointer # -fPIC
  105. # Write here any options you may need for your C linker.
  106. #MYLDFLAGS=
  107. # ------------------------------------------------------------------ librarian
  108. # This should work in all Unix systems.
  109. #
  110. AR= ar rcu
  111. # If your system doesn't have (or need) ranlib, use RANLIB=true.
  112. # On some systems, "ar s" does what ranlib would do.
  113. #
  114. RANLIB= ranlib
  115. #RANLIB= ar s
  116. #RANLIB= true
  117. # ------------------------------------------------------------------ stripper
  118. # This should work in all Unix systems, but you may want to add options.
  119. #
  120. STRIP= strip
  121. # ------------------------------------------------------------------ install
  122. # Locations for "make install". You may need to be root do "make install".
  123. #
  124. INSTALL_ROOT= ~/lua-5.0
  125. INSTALL_BIN= $(INSTALL_ROOT)/bin
  126. INSTALL_INC= $(INSTALL_ROOT)/include
  127. INSTALL_LIB= $(INSTALL_ROOT)/lib
  128. INSTALL_MAN= $(INSTALL_ROOT)/man/man1
  129. # You may prefer to use "install" instead of "cp" if you have it.
  130. # If you use "install", you may also want to change the permissions after -m.
  131. #
  132. INSTALL_EXEC= cp
  133. INSTALL_DATA= cp
  134. #INSTALL_EXEC= install -m 0755
  135. #INSTALL_DATA= install -m 0644
  136. # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
  137. V=5.0
  138. BIN= $(LUA)/bin
  139. INC= $(LUA)/include
  140. LIB= $(LUA)/lib
  141. INCS= -I$(INC) $(EXTRA_INCS)
  142. DEFS= $(NUMBER) $(EXTRA_DEFS)
  143. CFLAGS= $(MYCFLAGS) $(WARN) $(INCS) $(DEFS)
  144. # (end of config)