summaryrefslogtreecommitdiff
path: root/databases/redis72/files/patch-src-Makefile
blob: 6b3ed47b68be88fab3765af6f454a8a80576c706 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
--- src/Makefile.orig	2019-11-29 16:35:59 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
 
 # Linux ARM needs -latomic at linking time
 ifneq (,$(filter aarch64 armv,$(uname_M)))
@@ -105,6 +104,11 @@ ifeq ($(uname_S),Darwin)
 	OPENSSL_CFLAGS=-I/usr/local/opt/openssl/include
 	OPENSSL_LDFLAGS=-L/usr/local/opt/openssl/lib
 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
@@ -131,6 +135,7 @@ else
 	# All the other OSes (notably Linux)
 	FINAL_LDFLAGS+= -rdynamic
 	FINAL_LIBS+=-ldl -pthread -lrt
+endif
 endif
 endif
 endif