summaryrefslogtreecommitdiff
blob: 7ebff12b519641c87c6f0cd860f4043ee1779f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/src/Makefile b/src/Makefile
index fdbe36a..df224ae 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -26,12 +26,7 @@ PREFIX?=/usr/local
 INSTALL_BIN=$(PREFIX)/bin
 INSTALL=install
 
-# Default allocator
-ifeq ($(uname_S),Linux)
-	MALLOC=jemalloc
-else
-	MALLOC=libc
-endif
+MALLOC?=jemalloc
 
 # Backwards compatibility for selecting an allocator
 ifeq ($(USE_TCMALLOC),yes)
@@ -103,9 +98,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
 endif
 
 ifeq ($(MALLOC),jemalloc)
-	DEPENDENCY_TARGETS+= jemalloc
-	FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
-	FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a
+	FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
+	FINAL_LIBS+= -ljemalloc -ldl
 endif
 
 REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)