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.
49 lines
1.8 KiB
49 lines
1.8 KiB
Index: src/Makefile |
|
--- src/Makefile.orig 2017-11-16 16:25:39.000000000 +0100 |
|
+++ src/Makefile 2018-04-25 22:54:19.551677000 +0200 |
|
@@ -10,17 +10,10 @@ |
|
# find the OS |
|
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') |
|
|
|
-# Compile flags for linux / osx |
|
-ifeq ($(uname_S),Linux) |
|
- SHOBJ_CFLAGS ?= -fno-common -g -ggdb |
|
- SHOBJ_LDFLAGS ?= -shared -Bsymbolic -l:libcblas.a -l:libatlas.a |
|
-else |
|
- SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb |
|
- SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup -framework Accelerate |
|
- BLAS_INCLUDE ?= /System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ |
|
-endif |
|
+SHOBJ_CFLAGS ?= -fno-common |
|
+SHOBJ_LDFLAGS ?= -shared -Bsymbolic -lopenblas |
|
|
|
-CFLAGS = -I$(RM_INCLUDE_DIR) -Wall -g -fPIC -O2 -std=gnu99 -pthread |
|
+CFLAGS = -I$(RM_INCLUDE_DIR) -fPIC -O2 -std=gnu99 -pthread |
|
CC=gcc |
|
|
|
OBJS=rmalloc.o forest.o forest-type.o feature-vec.o reg.o regression-type.o matrix.o matrix-type.o kmeans.o kmeans-type.o util/logging.o util/thpool.o |
|
@@ -31,7 +24,7 @@ |
|
all: redis-ml.so |
|
|
|
redis-ml.so: rmutil/librmutil.a redis-ml.o $(OBJS) |
|
- $(LD) -o $@ redis-ml.o $(OBJS) $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc |
|
+ $(CC) -o $@ redis-ml.o $(OBJS) $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc |
|
|
|
rmutil/librmutil.a: |
|
echo "making rmutil" && cd rmutil && $(MAKE) all |
|
Index: src/rmutil/sdsalloc.h |
|
--- src/rmutil/sdsalloc.h.orig 2017-11-16 16:25:39.000000000 +0100 |
|
+++ src/rmutil/sdsalloc.h 2018-04-25 22:53:52.904926000 +0200 |
|
@@ -36,12 +36,7 @@ |
|
* the include of your alternate allocator if needed (not needed in order |
|
* to use the default libc allocator). */ |
|
|
|
-#if defined(__MACH__) |
|
#include <stdlib.h> |
|
-#else |
|
-#include <malloc.h> |
|
-#endif |
|
-//#include "zmalloc.h" |
|
#define s_malloc malloc |
|
#define s_realloc realloc |
|
#define s_free free
|
|
|