Advertisement
_dinsdale

Lua 5.4 rc1 src/Makefile Patched for WLC

Apr 24th, 2020
1,398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 7.71 KB | None | 0 0
  1. # Makefile for building Lua
  2. # See ../doc/readme.html for installation and customization instructions.
  3.  
  4. # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
  5.  
  6. # Your platform. See PLATS for possible values.
  7. PLAT= guess
  8.  
  9. CC= gcc -std=gnu99
  10. CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
  11. LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
  12. LIBS= -lm $(SYSLIBS) $(MYLIBS)
  13.  
  14. AR= ar rcu
  15. RANLIB= ranlib
  16. STRIP= strip
  17. RM= rm -f
  18. UNAME= uname
  19.  
  20. SYSCFLAGS=
  21. SYSLDFLAGS=
  22. SYSLIBS=
  23.  
  24. MYCFLAGS=
  25. MYLDFLAGS=
  26. MYLIBS=
  27. MYOBJS=
  28.  
  29. # Special flags for compiler modules; -Os reduces code size.
  30. CMCFLAGS= -Os
  31.  
  32. # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
  33.  
  34. PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
  35.  
  36. LUA_A=  liblua.a
  37. LUA_A_LINK= $(LUA_A)
  38. CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
  39. LIB_O=  lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
  40. BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
  41.  
  42. LUA_T=  lua
  43. LUA_O=  lua.o
  44.  
  45. LUAC_T= luac
  46. LUAC_O= luac.o
  47.  
  48. ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
  49. ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
  50. ALL_A= $(LUA_A)
  51.  
  52. # Targets start here.
  53. default: $(PLAT)
  54.  
  55. all:    $(ALL_T)
  56.  
  57. o:  $(ALL_O)
  58.  
  59. a:  $(ALL_A)
  60.  
  61. $(LUA_A): $(BASE_O)
  62.     $(AR) $@ $(BASE_O)
  63.     $(RANLIB) $@
  64.  
  65. $(LUA_T): $(LUA_O) $(LUA_A)
  66.     $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A_LINK) $(LIBS)
  67.  
  68. $(LUAC_T): $(LUAC_O) $(LUA_A)
  69.     $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A_LINK) $(LIBS)
  70.  
  71. test:
  72.     ./lua -v
  73.  
  74. clean:
  75.     $(RM) $(ALL_T) $(ALL_O)
  76.  
  77. clean_mingw:
  78.     $(RM) $(ALL_O)
  79.     $(RM) *.dll *.exe *.lib
  80. depend:
  81.     @$(CC) $(CFLAGS) -MM l*.c
  82.  
  83. echo:
  84.     @echo "PLAT= $(PLAT)"
  85.     @echo "CC= $(CC)"
  86.     @echo "CFLAGS= $(CFLAGS)"
  87.     @echo "LDFLAGS= $(SYSLDFLAGS)"
  88.     @echo "LIBS= $(LIBS)"
  89.     @echo "AR= $(AR)"
  90.     @echo "RANLIB= $(RANLIB)"
  91.     @echo "RM= $(RM)"
  92.     @echo "UNAME= $(UNAME)"
  93.  
  94. # Convenience targets for popular platforms.
  95. ALL= all
  96.  
  97. help:
  98.     @echo "Do 'make PLATFORM' where PLATFORM is one of these:"
  99.     @echo "   $(PLATS)"
  100.     @echo "See doc/readme.html for complete instructions."
  101.  
  102. guess:
  103.     @echo Guessing `$(UNAME)`
  104.     @$(MAKE) `$(UNAME)`
  105.  
  106. AIX aix:
  107.     $(MAKE) $(ALL) CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl" SYSLDFLAGS="-brtl -bexpall"
  108.  
  109. bsd:
  110.     $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
  111.  
  112. c89:
  113.     $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_C89" CC="gcc -std=c89"
  114.     @echo ''
  115.     @echo '*** C89 does not guarantee 64-bit integers for Lua.'
  116.     @echo ''
  117.  
  118. FreeBSD NetBSD OpenBSD freebsd:
  119.     $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc"
  120.  
  121. generic: $(ALL)
  122.  
  123. Linux linux:    linux-noreadline
  124.  
  125. linux-noreadline:
  126.     $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl"
  127.  
  128. linux-readline:
  129.     $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline"
  130.  
  131. Darwin macos macosx:
  132.     $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline"
  133.  
  134. mingw:
  135.     $(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" "LUA_A_LINK=lua54.lib" \
  136.     "AR=$(CC) -shared -Wl,--out-implib,lua54.lib -o" "RANLIB=$(STRIP) --strip-unneeded" \
  137.     "SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
  138.     $(MAKE) "LUAC_T=luac.exe" luac.exe
  139.  
  140. posix:
  141.     $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX"
  142.  
  143. SunOS solaris:
  144.     $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl"
  145.  
  146. # Targets that do not create files (not all makes understand .PHONY).
  147. .PHONY: all $(PLATS) help test clean default o a depend echo
  148.  
  149. # Compiler modules may use special flags.
  150. llex.o:
  151.     $(CC) $(CFLAGS) $(CMCFLAGS) -c llex.c
  152.  
  153. lparser.o:
  154.     $(CC) $(CFLAGS) $(CMCFLAGS) -c lparser.c
  155.  
  156. lcode.o:
  157.     $(CC) $(CFLAGS) $(CMCFLAGS) -c lcode.c
  158.  
  159. # DO NOT DELETE
  160.  
  161. lapi.o: lapi.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
  162.  lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lstring.h \
  163.  ltable.h lundump.h lvm.h
  164. lauxlib.o: lauxlib.c lprefix.h lua.h luaconf.h lauxlib.h
  165. lbaselib.o: lbaselib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  166. lcode.o: lcode.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \
  167.  llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \
  168.  ldo.h lgc.h lstring.h ltable.h lvm.h
  169. lcorolib.o: lcorolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  170. lctype.o: lctype.c lprefix.h lctype.h lua.h luaconf.h llimits.h
  171. ldblib.o: ldblib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  172. ldebug.o: ldebug.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
  173.  lobject.h ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h \
  174.  ldebug.h ldo.h lfunc.h lstring.h lgc.h ltable.h lvm.h
  175. ldo.o: ldo.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
  176.  lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h \
  177.  lparser.h lstring.h ltable.h lundump.h lvm.h
  178. ldump.o: ldump.c lprefix.h lua.h luaconf.h lobject.h llimits.h lstate.h \
  179.  ltm.h lzio.h lmem.h lundump.h
  180. lfunc.o: lfunc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
  181.  llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h
  182. lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
  183.  llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h
  184. linit.o: linit.c lprefix.h lua.h luaconf.h lualib.h lauxlib.h
  185. liolib.o: liolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  186. llex.o: llex.c lprefix.h lua.h luaconf.h lctype.h llimits.h ldebug.h \
  187.  lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lgc.h llex.h lparser.h \
  188.  lstring.h ltable.h
  189. lmathlib.o: lmathlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  190. lmem.o: lmem.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
  191.  llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h
  192. loadlib.o: loadlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  193. lobject.o: lobject.c lprefix.h lua.h luaconf.h lctype.h llimits.h \
  194.  ldebug.h lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h \
  195.  lvm.h
  196. lopcodes.o: lopcodes.c lprefix.h lopcodes.h llimits.h lua.h luaconf.h
  197. loslib.o: loslib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  198. lparser.o: lparser.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \
  199.  llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \
  200.  ldo.h lfunc.h lstring.h lgc.h ltable.h
  201. lstate.o: lstate.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
  202.  lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h \
  203.  lstring.h ltable.h
  204. lstring.o: lstring.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \
  205.  lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h
  206. lstrlib.o: lstrlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  207. ltable.o: ltable.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
  208.  llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
  209. ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  210. ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
  211.  llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
  212. lua.o: lua.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  213. luac.o: luac.c lprefix.h lua.h luaconf.h lauxlib.h ldebug.h lstate.h \
  214.  lobject.h llimits.h ltm.h lzio.h lmem.h lopcodes.h lopnames.h lundump.h
  215. lundump.o: lundump.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \
  216.  lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h \
  217.  lundump.h
  218. lutf8lib.o: lutf8lib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
  219. lvm.o: lvm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
  220.  llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h \
  221.  ltable.h lvm.h ljumptab.h
  222. lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \
  223.  lobject.h ltm.h lzio.h
  224.  
  225. # (end of Makefile)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement