--- src/Makefile.orig 2019-09-25 10:40:18 UTC +++ src/Makefile @@ -29,7 +29,7 @@ endif WARN=-Wall -W -Wno-missing-field-initializers OPT=$(OPTIMIZATION) -PREFIX?=/usr/local +PREFIX:=$(PREFIX) INSTALL_BIN=$(PREFIX)/bin INSTALL=install @@ -75,7 +75,6 @@ endif FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) FINAL_LIBS=-lm -DEBUG=-g -ggdb ifeq ($(uname_S),SunOS) # SunOS @@ -94,6 +93,11 @@ ifeq ($(uname_S),Darwin) # Darwin FINAL_LIBS+= -ldl else +ifeq ($(uname_S),FreeBSD) + # FreeBSD + FINAL_CFLAGS?= $(CFLAGS) $(REDIS_CFLAGS) -I${PREFIX}/include + FINAL_LDFLAGS= $(LDFLAGS) -pthread +else ifeq ($(uname_S),AIX) # AIX FINAL_LDFLAGS+= -Wl,-bexpall @@ -120,6 +124,7 @@ else # All the other OSes (notably Linux) FINAL_LDFLAGS+= -rdynamic FINAL_LIBS+=-ldl -pthread -lrt +endif endif endif endif