2019-03-24 10:03:03 +00:00
|
|
|
|
|
|
|
# find the OS
|
|
|
|
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
|
|
|
|
2020-12-13 15:09:54 +00:00
|
|
|
ifeq ($(uname_S),Darwin)
|
2019-03-24 10:03:03 +00:00
|
|
|
SHOBJ_CFLAGS ?= -W -Wall -dynamic -fno-common -g -ggdb -std=c99 -O2
|
|
|
|
SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
|
2020-12-13 15:09:54 +00:00
|
|
|
else # Linux, others
|
|
|
|
SHOBJ_CFLAGS ?= -W -Wall -fno-common -g -ggdb -std=c99 -O2
|
|
|
|
SHOBJ_LDFLAGS ?= -shared
|
2019-03-24 10:03:03 +00:00
|
|
|
endif
|
|
|
|
|
2019-10-23 16:32:35 +00:00
|
|
|
TEST_MODULES = \
|
|
|
|
commandfilter.so \
|
|
|
|
testrdb.so \
|
|
|
|
fork.so \
|
|
|
|
infotest.so \
|
|
|
|
propagate.so \
|
2019-10-24 06:38:52 +00:00
|
|
|
misc.so \
|
2018-03-29 10:46:13 +00:00
|
|
|
hooks.so \
|
2019-10-17 12:37:01 +00:00
|
|
|
blockonkeys.so \
|
2021-01-29 13:38:30 +00:00
|
|
|
blockonbackground.so \
|
2019-11-19 10:08:02 +00:00
|
|
|
scan.so \
|
2019-02-26 01:23:11 +00:00
|
|
|
datatype.so \
|
2020-07-23 09:38:51 +00:00
|
|
|
auth.so \
|
2020-09-09 13:01:16 +00:00
|
|
|
keyspace_events.so \
|
2020-10-05 14:06:35 +00:00
|
|
|
blockedclient.so \
|
2020-11-11 20:57:33 +00:00
|
|
|
getkeys.so \
|
2020-11-16 08:34:04 +00:00
|
|
|
test_lazyfree.so \
|
|
|
|
timer.so \
|
2021-01-28 14:19:43 +00:00
|
|
|
defragtest.so \
|
|
|
|
stream.so
|
2020-09-09 13:01:16 +00:00
|
|
|
|
2019-03-24 10:03:03 +00:00
|
|
|
|
2019-10-23 16:32:35 +00:00
|
|
|
.PHONY: all
|
2019-03-24 10:03:03 +00:00
|
|
|
|
2019-10-23 16:32:35 +00:00
|
|
|
all: $(TEST_MODULES)
|
2019-09-27 09:24:06 +00:00
|
|
|
|
2020-05-27 15:09:09 +00:00
|
|
|
32bit:
|
|
|
|
$(MAKE) CFLAGS="-m32" LDFLAGS="-melf_i386"
|
|
|
|
|
2019-10-23 16:32:35 +00:00
|
|
|
%.xo: %.c ../../src/redismodule.h
|
|
|
|
$(CC) -I../../src $(CFLAGS) $(SHOBJ_CFLAGS) -fPIC -c $< -o $@
|
2019-09-30 17:47:35 +00:00
|
|
|
|
2019-10-23 16:32:35 +00:00
|
|
|
%.so: %.xo
|
2021-02-03 15:35:28 +00:00
|
|
|
$(LD) -o $@ $< $(SHOBJ_LDFLAGS) $(LDFLAGS) $(LIBS)
|
2019-07-24 09:58:15 +00:00
|
|
|
|
2019-10-23 16:32:35 +00:00
|
|
|
.PHONY: clean
|
2019-10-23 16:38:30 +00:00
|
|
|
|
2019-10-23 16:32:35 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(TEST_MODULES) $(TEST_MODULES:.so=.xo)
|