You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.1 KiB

Index: Makefile
--- Makefile.orig 2019-07-22 19:06:48.995439000 +0200
+++ Makefile 2019-07-22 19:09:24.645964000 +0200
@@ -1,18 +1,24 @@
-DEBUGFLAGS = -g -ggdb -O2
+DEBUGFLAGS = -O2
ifeq ($(DEBUG), 1)
DEBUGFLAGS = -g -ggdb -O0
endif
# find the OS
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-CPPFLAGS = -Wall -Wno-unused-function $(DEBUGFLAGS) -fPIC -std=gnu99 -D_GNU_SOURCE
+CPPFLAGS = -Wno-unused-function $(DEBUGFLAGS) -fPIC -std=gnu99 -D_GNU_SOURCE
# CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
# Compile flags for linux / osx
ifeq ($(uname_S),Linux)
CC=gcc
LD=gcc
- SHOBJ_CFLAGS ?= -fno-common -g -ggdb
+ SHOBJ_CFLAGS ?= -fno-common
+ SHOBJ_LDFLAGS ?= -shared -Wl,-Bsymbolic,-Bsymbolic-functions
+else
+ifeq ($(uname_S),FreeBSD)
+ CC=gcc
+ LD=gcc
+ SHOBJ_CFLAGS ?= -fno-common
SHOBJ_LDFLAGS ?= -shared -Wl,-Bsymbolic,-Bsymbolic-functions
else
CC=clang
@@ -20,6 +26,7 @@
SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb
SHOBJ_LDFLAGS ?= -dylib -exported_symbol _RedisModule_OnLoad -macosx_version_min 10.6
endif
+endif
ROOT=$(shell pwd)
# Flags for preprocessor