diff --git a/.gitignore b/.gitignore index 1ee2844..415df43 100644 --- a/.gitignore +++ b/.gitignore @@ -97,6 +97,7 @@ install_manifest.txt compile_commands.json CTestTestfile.cmake _deps +build/ # ---> Ninja .ninja_deps diff --git a/rmutil/Makefile b/rmutil/Makefile deleted file mode 100644 index 0bb6dd9..0000000 --- a/rmutil/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# set environment variable RM_INCLUDE_DIR to the location of redismodule.h -ifndef RM_INCLUDE_DIR - RM_INCLUDE_DIR=../include/ -endif - -CFLAGS ?= -g -fPIC -O3 -std=gnu99 -Wall -Wno-unused-function -CFLAGS += -I$(RM_INCLUDE_DIR) -CC=gcc - -OBJS=util.o strings.o sds.o vector.o alloc.o periodic.o - -all: librmutil.a - -clean: - rm -rf *.o *.a - -librmutil.a: $(OBJS) - ar rcs $@ $^ - -test_vector: test_vector.o vector.o - $(CC) -Wall -o $@ $^ -lc -lpthread -O0 - @(sh -c ./$@) -.PHONY: test_vector - -test_periodic: test_periodic.o periodic.o - $(CC) -Wall -o $@ $^ -lc -lpthread -O0 - @(sh -c ./$@) -.PHONY: test_periodic - -test: test_periodic test_vector -.PHONY: test diff --git a/source/Makefile b/source/Makefile deleted file mode 100644 index 876bf25..0000000 --- a/source/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -#set environment variable RM_INCLUDE_DIR to the location of redismodule.h -ifndef RM_INCLUDE_DIR - RM_INCLUDE_DIR=../include/ -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 -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: - rm -rf *.xo *.so *.o - -FORCE: