-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6497eb2
commit 3ca80e7
Showing
7 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#set environment variable RM_INCLUDE_DIR to the location of redismodule.h | ||
ifndef RM_INCLUDE_DIR | ||
RM_INCLUDE_DIR=../ | ||
endif | ||
|
||
ifndef RMUTIL_LIBDIR | ||
RMUTIL_LIBDIR=../rmutil | ||
endif | ||
|
||
# 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 | ||
else | ||
SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb | ||
SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup | ||
endif | ||
CFLAGS = -I$(RM_INCLUDE_DIR) -Wall -g -fPIC -lc -lm -O3 -std=gnu99 | ||
CC=gcc | ||
|
||
all: rmutil module.so | ||
|
||
rmutil: FORCE | ||
$(MAKE) -C $(RMUTIL_LIBDIR) | ||
|
||
module.so: module.o | ||
$(LD) -o $@ module.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc | ||
|
||
clean: FORCE | ||
rm -rf *.xo *.so *.o | ||
|
||
FORCE: |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.