Last active
June 15, 2017 12:50
-
-
Save dvirsky/a8407b69fc14335d8250c3b194ff85ee to your computer and use it in GitHub Desktop.
Revisions
-
dvirsky revised this gist
Jun 15, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ else endif SOURCEDIR=$(shell pwd -P) CC_SOURCES = $(wildcard $(SOURCEDIR)/*.c) CC_OBJECTS = $(patsubst $(SOURCEDIR)/%.c, $(SOURCEDIR)/%.o, $(CC_SOURCES)) all: module.so -
dvirsky revised this gist
May 10, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ CC_OBJECTS = $(patsubst $(SOURCEDIR)/%.c, $(SOURCEDIR)/%.o, $(CC_SOURCES)) all: module.so module.so: $(CC_OBJECTS) $(LD) -o $@ $(CC_OBJECTS) $(SHOBJ_LDFLAGS) -lc clean: rm -rvf *.xo *.so *.o *.a -
dvirsky renamed this gist
May 10, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
dvirsky created this gist
May 10, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ DEBUGFLAGS = -g -ggdb -O2 ifeq ($(DEBUG), 1) DEBUGFLAGS = -g -ggdb -O0 endif # find the OS uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') CFLAGS = -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') # Compile flags for linux / osx ifeq ($(uname_S),Linux) SHOBJ_CFLAGS ?= -fno-common -g -ggdb 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 SOURCEDIR=$(shell pwd -P) CC_SOURCES = $(wildcard $(SOURCEDIR)/*.c) $(wildcard $(SOURCEDIR)/dep/*.c) CC_OBJECTS = $(patsubst $(SOURCEDIR)/%.c, $(SOURCEDIR)/%.o, $(CC_SOURCES)) all: module.so module.so: $(CC_OBJECTS) $(LD) -o $@ $(CC_OBJECTS) -lc clean: rm -rvf *.xo *.so *.o *.a