summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-07-28 10:38:11 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-07-28 10:42:57 +0200
commite1f01c9b28751d71ba0df682fb0f6b62f4db9191 (patch)
tree90d58ff18a1aeaa947f49a334443918da42a7af1 /src/Makefile
parentc1b270127c0dc81f901d56e2aa474b85459a7678 (diff)
downloadredis-e1f01c9b28751d71ba0df682fb0f6b62f4db9191.tar.gz
Fix link order for ld --as-needed (thanks to Nigel Babu)
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile
index 67b09723b..f2bbfacda 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -32,7 +32,7 @@ ifeq ($(USE_TCMALLOC),yes)
CCLINK+= -ltcmalloc
CFLAGS+= -DUSE_TCMALLOC
endif
-CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
+CCOPT= $(CFLAGS) $(ARCH) $(PROF)
PREFIX= /usr/local
INSTALL_BIN= $(PREFIX)/bin
@@ -130,12 +130,12 @@ dependencies:
cd ../deps/linenoise && $(MAKE) ARCH="$(ARCH)"
redis-server: $(OBJ)
- $(QUIET_LINK)$(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
+ $(QUIET_LINK)$(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ) $(CCLINK)
redis-benchmark: dependencies $(BENCHOBJ)
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)hiredis$(ENDCOLOR)
cd ../deps/hiredis && $(MAKE) static ARCH="$(ARCH)"
- $(QUIET_LINK)$(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ) ../deps/hiredis/libhiredis.a
+ $(QUIET_LINK)$(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ) ../deps/hiredis/libhiredis.a $(CCLINK)
redis-benchmark.o:
$(QUIET_CC)$(CC) -c $(CFLAGS) -I../deps/hiredis $(DEBUG) $(COMPILE_TIME) $<
@@ -147,10 +147,10 @@ redis-cli.o:
$(QUIET_CC)$(CC) -c $(CFLAGS) -I../deps/hiredis -I../deps/linenoise $(DEBUG) $(COMPILE_TIME) $<
redis-check-dump: $(CHECKDUMPOBJ)
- $(QUIET_LINK)$(CC) -o $(CHECKDUMPPRGNAME) $(CCOPT) $(DEBUG) $(CHECKDUMPOBJ)
+ $(QUIET_LINK)$(CC) -o $(CHECKDUMPPRGNAME) $(CCOPT) $(DEBUG) $(CHECKDUMPOBJ) $(CCLINK)
redis-check-aof: $(CHECKAOFOBJ)
- $(QUIET_LINK)$(CC) -o $(CHECKAOFPRGNAME) $(CCOPT) $(DEBUG) $(CHECKAOFOBJ)
+ $(QUIET_LINK)$(CC) -o $(CHECKAOFPRGNAME) $(CCOPT) $(DEBUG) $(CHECKAOFOBJ) $(CCLINK)
.c.o:
$(QUIET_CC)$(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $<