Add ARCH to Makefile CFLAGS / LDFLAGS.

This makes builiding with an optional 32 bit target simpler. For
instance Redis (that contains an embedded copy of hiredis) when compiled
with "make 32bit" uses to pass an ARCH parameter to force an hiredis
32 bit build.
This commit is contained in:
antirez 2012-08-21 14:29:49 +02:00
parent 7ec4df9403
commit 7f346477c8

View File

@ -15,8 +15,8 @@ CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
OPTIMIZATION?=-O3
WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
DEBUG?= -g -ggdb
REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG)
REAL_LDFLAGS=$(LDFLAGS)
REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
DYLIBSUFFIX=so
STLIBSUFFIX=a