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
ifndef RM_INCLUDE_DIR
RM_INCLUDE_DIR=../../
RM_INCLUDE_DIR=../
endif
ifndef RMUTIL_LIBDIR
RMUTIL_LIBDIR=../rmutil
endif
# find the OS
@ -20,13 +24,13 @@ CC=gcc
all: module.so
.c.xo:
$(CC) -I. $(CFLAGS) $(SHOBJ_CFLAGS) -fPIC -c $< -o $@
#c.xo:
#$(CC) -I. $(CFLAGS) $(SHOBJ_CFLAGS) -fPIC -c $< -o $@
#mdma.xo: ./index.h
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:
rm -rf *.xo *.so *.o

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

Loading…
Cancel
Save