fixed makefile paths

master
Dvir Volk 9 years ago
parent fe752c081d
commit 1896ff9a64

@ -1,6 +1,10 @@
#set environment variable RM_INCLUDE_DIR to the location of redismodule.h #set environment variable RM_INCLUDE_DIR to the location of redismodule.h
ifndef RM_INCLUDE_DIR ifndef RM_INCLUDE_DIR
RM_INCLUDE_DIR=../../ RM_INCLUDE_DIR=../
endif
ifndef RMUTIL_LIBDIR
RMUTIL_LIBDIR=../rmutil
endif endif
# find the OS # find the OS
@ -20,13 +24,13 @@ CC=gcc
all: module.so all: module.so
.c.xo: #c.xo:
$(CC) -I. $(CFLAGS) $(SHOBJ_CFLAGS) -fPIC -c $< -o $@ #$(CC) -I. $(CFLAGS) $(SHOBJ_CFLAGS) -fPIC -c $< -o $@
#mdma.xo: ./index.h #mdma.xo: ./index.h
module.so: module.o module.so: module.o
$(LD) -o $@ module.o $(SHOBJ_LDFLAGS) $(LIBS) -L../ -lrmutil -lc $(LD) -o $@ module.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc
clean: clean:
rm -rf *.xo *.so *.o rm -rf *.xo *.so *.o

@ -1,6 +1,6 @@
#include "../../redismodule.h" #include "../redismodule.h"
#include "../util.h" #include "../rmutil/util.h"
#include "../strings.h" #include "../rmutil/strings.h"
/* EXAMPLE.PARSE [SUM <x> <y>] | [PROD <x> <y>] /* EXAMPLE.PARSE [SUM <x> <y>] | [PROD <x> <y>]
* Demonstrates the automatic arg parsing utility. * Demonstrates the automatic arg parsing utility.
@ -14,6 +14,7 @@ int ParseCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
return RedisModule_WrongArity(ctx); return RedisModule_WrongArity(ctx);
} }
// init auto memory for created strings // init auto memory for created strings
RedisModule_AutoMemory(ctx); RedisModule_AutoMemory(ctx);
long long x,y; long long x,y;

Loading…
Cancel
Save