Index: Makefile --- Makefile.orig +++ Makefile @@ -13,8 +13,8 @@ PG_CONFIG ?= pg_config PLLUA_CONFIG_OPTS ?= # General -LUA_INCDIR ?= /usr/local/include/lua53 -LUALIB ?= -L/usr/local/lib -llua-5.3 +LUA_INCDIR ?= ${MODLUA_INCL_DIR} +LUALIB ?= -L${LOCALBASE}/lib -l${MODLUA_WANTLIB} LUAC ?= luac53 LUA ?= lua53 @@ -42,7 +42,7 @@ OBJCOPY ?= objcopy # GNU LD and compatible linkers (including recent clang lld) should be # fine with -r -b binary, but this does break on some ports. -BIN_LD ?= $(LD) -r -b binary +BIN_LD ?= $(LD) ${LLD_EMUL} -r -b binary # If BIN_ARCH and BIN_FMT are defined, we assume LD_BINARY is broken # and do this instead. This is apparently needed for linux-mips64el,