From 3e6578e32f0b8cdd0d8e5f9523968c13602ab741 Mon Sep 17 00:00:00 2001 From: Daniel Price Date: Mon, 11 Mar 2013 18:04:40 -0700 Subject: [PATCH] Define AR to help with lua cross-compilation Closes #997 --- deps/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deps/Makefile b/deps/Makefile index 5a95545defd3..e183ede9c210 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -60,10 +60,15 @@ endif LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI $(CFLAGS) LUA_LDFLAGS+= $(LDFLAGS) +# lua's Makefile defines AR="ar rcu", which is unusual, and makes it more +# challenging to cross-compile lua (and redis). These defines make it easier +# to fit redis into cross-compilation environments, which typically set AR. +AR=ar +ARFLAGS=rcu lua: .make-prerequisites @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) - cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" + cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)" .PHONY: lua