diff options
author | zach shipko <zachshipko@gmail.com> | 2016-06-14 13:46:42 +0000 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-10-26 09:11:04 +0200 |
commit | 473640790f2755f5319cd1cf7f5cb6281f8aa4e2 (patch) | |
tree | 7d5dccf93e7e5b8a4382aa0e93cfb11d3f1a88a3 | |
parent | 9ada818b8633c3784dbab355dc81e0e049360e83 (diff) | |
download | redis-473640790f2755f5319cd1cf7f5cb6281f8aa4e2.tar.gz |
BSDs don't have -ldl
-rw-r--r-- | src/Makefile | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile index 459bcab83..fdbe36a30 100644 --- a/src/Makefile +++ b/src/Makefile @@ -55,7 +55,7 @@ endif FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) -I../deps/geohash-int FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) -FINAL_LIBS=-lm -ldl +FINAL_LIBS=-lm DEBUG=-g -ggdb ifeq ($(uname_S),SunOS) @@ -65,17 +65,27 @@ ifeq ($(uname_S),SunOS) FINAL_LIBS+= -ldl -lnsl -lsocket -lresolv -lpthread -lrt else ifeq ($(uname_S),Darwin) - # Darwin (nothing to do) + # Darwin + FINAL_LIBS+= -ldl else ifeq ($(uname_S),AIX) # AIX FINAL_LDFLAGS+= -Wl,-bexpall - FINAL_LIBS+= -pthread -lcrypt -lbsd - + FINAL_LIBS+=-ldl -pthread -lcrypt -lbsd +else +ifeq ($(uname_S),OpenBSD) + # OpenBSD + FINAL_LIBS+= -lpthread +else +ifeq ($(uname_S),FreeBSD) + # FreeBSD + FINAL_LIBS+= -lpthread else # All the other OSes (notably Linux) FINAL_LDFLAGS+= -rdynamic - FINAL_LIBS+= -pthread + FINAL_LIBS+=-ldl -pthread +endif +endif endif endif endif |