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.
 
 
 
 
 
 

35 lines
1.1 KiB

Index: Makefile
--- Makefile.orig 2018-01-29 15:57:25.000000000 +0100
+++ Makefile 2018-03-18 10:16:55.479776000 +0100
@@ -1,22 +1,27 @@
-DEBUGFLAGS = -g -ggdb -O2
+DEBUGFLAGS =
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
-CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
+CPPFLAGS += -fPIC -std=gnu99 -D_GNU_SOURCE
# Compile flags for linux / osx
ifeq ($(uname_S),Linux)
- SHOBJ_CFLAGS ?= -fno-common -g -ggdb
+ SHOBJ_CFLAGS ?= -fno-common
+ SHOBJ_LDFLAGS ?= -shared -Bsymbolic -Bsymbolic-functions
+else
+ifeq ($(uname_S),FreeBSD)
+ LD=$(CC)
+ SHOBJ_CFLAGS ?= -fno-common
SHOBJ_LDFLAGS ?= -shared -Bsymbolic -Bsymbolic-functions
else
CFLAGS += -mmacosx-version-min=10.6
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