mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-31 04:39:49 +08:00
a360a90bb6
Compilation of Lua on a currently updated Slackware Linux 14.2 x86_64 vanilla distribution will cause some errors, due to a missing flags in the Makefile. I noticed that adding the termcap library solves the problem. I also found a thread (http://lua.2524044.n2.nabble.com/readline-termcap-ncurses-td5726148.html ) where other Linux distributions might have similar problems with Lua. Included version of liblua, derived from Lua 5.2.2, also seems to depend on the Termcap library and/or ncurses library. Output: bash-4.3$ make -C proxmark3 make: Går till katalogen "/home/github/iceman1001/proxmark3" make -C client all make[1]: Går till katalogen "/home/github/iceman1001/proxmark3/client" Compiling liblua, using platform linux cd ../liblua && make linux make[2]: Går till katalogen "/home/github/iceman1001/proxmark3/liblua" make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" make[3]: Går till katalogen "/home/github/iceman1001/proxmark3/liblua" gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lapi.o lapi.c [...] gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o linit.o linit.c ar rcu liblua.a 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 lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o ranlib liblua.a gcc -O3 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lua.o lua.c gcc -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tputs' /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgoto' /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetflag' /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `UP' /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetent' /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetnum' /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `PC' /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetstr' /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `BC' collect2: fel: ld returnerade avslutningsstatus 1 Makefile:63: receptet för målet "lua" misslyckades make[3]: *** [lua] Fel 1 make[3]: Lämnar katalogen "/home/github/iceman1001/proxmark3/liblua" Makefile:106: receptet för målet "linux" misslyckades make[2]: *** [linux] Fel 2 make[2]: Lämnar katalogen "/home/github/iceman1001/proxmark3/liblua" Makefile:203: receptet för målet "lua_build" misslyckades make[1]: *** [lua_build] Fel 2 make[1]: Lämnar katalogen "/home/github/iceman1001/proxmark3/client" Makefile:12: receptet för målet "client/all" misslyckades make: *** [client/all] Fel 2 make: Lämnar katalogen "/home/github/iceman1001/proxmark3"
187 lines
6.1 KiB
Makefile
187 lines
6.1 KiB
Makefile
# Makefile for building Lua
|
|
# See ../doc/readme.html for installation and customization instructions.
|
|
|
|
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
|
|
|
|
# Your platform. See PLATS for possible values.
|
|
PLAT= none
|
|
|
|
CC= gcc
|
|
CFLAGS= -O3 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
|
|
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
|
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
|
|
|
AR= ar rcu
|
|
RANLIB= ranlib
|
|
RM= rm -f
|
|
|
|
SYSCFLAGS=
|
|
SYSLDFLAGS=
|
|
SYSLIBS=
|
|
|
|
MYCFLAGS=
|
|
MYLDFLAGS=
|
|
MYLIBS=
|
|
MYOBJS=
|
|
|
|
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
|
|
|
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
|
|
|
LUA_A= liblua.a
|
|
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
|
|
LIB_O= lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o \
|
|
lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o
|
|
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
|
|
|
|
LUA_T= lua
|
|
LUA_O= lua.o
|
|
|
|
LUAC_T= luac
|
|
LUAC_O= luac.o
|
|
|
|
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
|
ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
|
ALL_A= $(LUA_A)
|
|
|
|
# Targets start here.
|
|
default: $(PLAT)
|
|
|
|
all: $(ALL_T)
|
|
|
|
o: $(ALL_O)
|
|
|
|
a: $(ALL_A)
|
|
|
|
$(LUA_A): $(BASE_O)
|
|
$(AR) $@ $(BASE_O)
|
|
$(RANLIB) $@
|
|
|
|
$(LUA_T): $(LUA_O) $(LUA_A)
|
|
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
|
|
|
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
|
$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
|
|
|
clean:
|
|
$(RM) $(ALL_T) $(ALL_O)
|
|
|
|
depend:
|
|
@$(CC) $(CFLAGS) -MM l*.c
|
|
|
|
echo:
|
|
@echo "PLAT= $(PLAT)"
|
|
@echo "CC= $(CC)"
|
|
@echo "CFLAGS= $(CFLAGS)"
|
|
@echo "LDFLAGS= $(SYSLDFLAGS)"
|
|
@echo "LIBS= $(LIBS)"
|
|
@echo "AR= $(AR)"
|
|
@echo "RANLIB= $(RANLIB)"
|
|
@echo "RM= $(RM)"
|
|
|
|
# Convenience targets for popular platforms
|
|
ALL= all
|
|
|
|
none:
|
|
@echo "Please do 'make PLATFORM' where PLATFORM is one of these:"
|
|
@echo " $(PLATS)"
|
|
|
|
aix:
|
|
$(MAKE) $(ALL) CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl" SYSLDFLAGS="-brtl -bexpall"
|
|
|
|
ansi:
|
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_ANSI"
|
|
|
|
bsd:
|
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
|
|
|
|
freebsd:
|
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
|
|
|
|
generic: $(ALL)
|
|
|
|
linux:
|
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -ltermcap -lncurses"
|
|
|
|
macosx:
|
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
|
|
|
|
mingw:
|
|
$(MAKE) "LUA_A=lua52.dll" "LUA_T=lua.exe" \
|
|
"AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
|
|
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
|
|
$(MAKE) "LUAC_T=luac.exe" luac.exe
|
|
|
|
posix:
|
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX"
|
|
|
|
solaris:
|
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl"
|
|
|
|
# list targets that do not create files (but not all makes understand .PHONY)
|
|
.PHONY: all $(PLATS) default o a clean depend echo none
|
|
|
|
# DO NOT DELETE
|
|
|
|
lapi.o: lapi.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h ltm.h \
|
|
lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lstring.h ltable.h lundump.h \
|
|
lvm.h
|
|
lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h
|
|
lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
lbitlib.o: lbitlib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
|
|
lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lgc.h \
|
|
lstring.h ltable.h lvm.h
|
|
lcorolib.o: lcorolib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
lctype.o: lctype.c lctype.h lua.h luaconf.h llimits.h
|
|
ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
ldebug.o: ldebug.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h \
|
|
ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h ldebug.h ldo.h \
|
|
lfunc.h lstring.h lgc.h ltable.h lvm.h
|
|
ldo.o: ldo.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h ltm.h \
|
|
lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h \
|
|
lstring.h ltable.h lundump.h lvm.h
|
|
ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \
|
|
lzio.h lmem.h lundump.h
|
|
lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h \
|
|
lstate.h ltm.h lzio.h lmem.h
|
|
lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
|
|
lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h
|
|
linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h
|
|
liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
llex.o: llex.c lua.h luaconf.h lctype.h llimits.h ldo.h lobject.h \
|
|
lstate.h ltm.h lzio.h lmem.h llex.h lparser.h lstring.h lgc.h ltable.h
|
|
lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
|
|
ltm.h lzio.h lmem.h ldo.h lgc.h
|
|
loadlib.o: loadlib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
lobject.o: lobject.c lua.h luaconf.h lctype.h llimits.h ldebug.h lstate.h \
|
|
lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h lvm.h
|
|
lopcodes.o: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h
|
|
loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
|
|
lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lfunc.h \
|
|
lstring.h lgc.h ltable.h
|
|
lstate.o: lstate.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h \
|
|
ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h lstring.h \
|
|
ltable.h
|
|
lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \
|
|
ltm.h lzio.h lstring.h lgc.h
|
|
lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
|
|
ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
|
|
ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h
|
|
ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \
|
|
lmem.h lstring.h lgc.h ltable.h
|
|
lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h
|
|
luac.o: luac.c lua.h luaconf.h lauxlib.h lobject.h llimits.h lstate.h \
|
|
ltm.h lzio.h lmem.h lundump.h ldebug.h lopcodes.h
|
|
lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
|
llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h lundump.h
|
|
lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
|
|
lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h
|
|
lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
|
|
lzio.h
|
|
|