Commit 53fc3573 authored by Marek Vavruša's avatar Marek Vavruša

build: build LuaJIT by default

this also fixes static linking missing a math library
parent 0ee2d1d7
......@@ -24,7 +24,7 @@ else
MODTYPE := dynamiclib
else
PLATFORM := POSIX
LDFLAGS += -pthread
LDFLAGS += -pthread -lm -Wl,-E
ifeq (,$(findstring BSD,$(UNAME)))
LDFLAGS += -ldl
endif
......
......@@ -15,8 +15,8 @@ NETTLE_TAG="2.7.1"
NETTLE_URL="https://ftp.gnu.org/gnu/nettle/nettle-${NETTLE_TAG}.tar.gz"
GNUTLS_TAG="3.3.12"
GNUTLS_URL="ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/gnutls-${GNUTLS_TAG}.tar.xz"
LUA_TAG="5.2.3"
LUA_URL="http://www.lua.org/ftp/lua-${LUA_TAG}.tar.gz"
LUA_TAG="v2.1"
LUA_URL="http://luajit.org/git/luajit-2.0.git"
# prepare install prefix
PREFIX=${1}; [ -z ${PREFIX} ] && export PREFIX="${HOME}/.local"
......@@ -108,23 +108,8 @@ pkg libknot ${KNOT_URL} ${KNOT_TAG} include/libknot \
pkg cmocka ${CMOCKA_URL} ${CMOCKA_TAG} include/cmocka.h
# libuv
pkg libuv ${LIBUV_URL} ${LIBUV_TAG} include/uv.h --disable-static
# lua
pkg lua ${LUA_URL} ${LUA_TAG} include/lua.h posix install INSTALL_TOP=${PREFIX} MYCFLAGS="-DLUA_USE_DLOPEN" MYLIBS="-ldl"
if [ ! -f ${PREFIX}/lib/pkgconfig/lua.pc ]; then
cat > ${PREFIX}/lib/pkgconfig/lua.pc << EOF
prefix=${PREFIX}
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Name: Lua
Description: An Extensible Extension Language
Version: ${LUA_TAG}
Requires:
Libs: -L\${libdir} -llua -lm
Cflags: -I\${includedir}
EOF
fi
# luajit
pkg lua ${LUA_URL} ${LUA_TAG} include/lua.h install LDFLAGS=-lm PREFIX=${PREFIX}
# remove on successful build
rm -rf ${BUILD_DIR}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment