-
Notifications
You must be signed in to change notification settings - Fork 206
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 844 Bytes
/
Makefile
File metadata and controls
38 lines (29 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# set environment variable RM_INCLUDE_DIR to the location of redismodule.h
ifndef RM_INCLUDE_DIR
RM_INCLUDE_DIR=../
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
export TESTMODULE_SO = rmodule_test.so
export TEST_OBJS = test_string.o test_util.o librmutil.a
export
test_rmodule: librmutil.a $(TEST_OBJS)
$(MAKE) -f testmodule/Makefile
.PHONY: test_rmodule
test: test_periodic test_vector test_rmodule
.PHONY: test