summaryrefslogtreecommitdiffstats
path: root/tests/modules/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:31:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:31:02 +0000
commitbb12c1fd00eb51118749bbbc69c5596835fcbd3b (patch)
tree88038a98bd31c1b765f3390767a2ec12e37c79ec /tests/modules/Makefile
parentInitial commit. (diff)
downloadredis-bb12c1fd00eb51118749bbbc69c5596835fcbd3b.tar.xz
redis-bb12c1fd00eb51118749bbbc69c5596835fcbd3b.zip
Adding upstream version 5:7.0.15.upstream/5%7.0.15upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/modules/Makefile80
1 files changed, 80 insertions, 0 deletions
diff --git a/tests/modules/Makefile b/tests/modules/Makefile
new file mode 100644
index 0000000..5606940
--- /dev/null
+++ b/tests/modules/Makefile
@@ -0,0 +1,80 @@
+
+# find the OS
+uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+
+warning_cflags = -W -Wall -Wno-missing-field-initializers
+ifeq ($(uname_S),Darwin)
+ SHOBJ_CFLAGS ?= $(warning_cflags) -dynamic -fno-common -g -ggdb -std=c99 -O2
+ SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
+else # Linux, others
+ SHOBJ_CFLAGS ?= $(warning_cflags) -fno-common -g -ggdb -std=c99 -O2
+ SHOBJ_LDFLAGS ?= -shared
+endif
+
+ifeq ($(uname_S),Linux)
+ LD = gcc
+ CC = gcc
+endif
+
+# OS X 11.x doesn't have /usr/lib/libSystem.dylib and needs an explicit setting.
+ifeq ($(uname_S),Darwin)
+ifeq ("$(wildcard /usr/lib/libSystem.dylib)","")
+LIBS = -L /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lsystem
+endif
+endif
+
+TEST_MODULES = \
+ commandfilter.so \
+ basics.so \
+ testrdb.so \
+ fork.so \
+ infotest.so \
+ propagate.so \
+ misc.so \
+ hooks.so \
+ blockonkeys.so \
+ blockonbackground.so \
+ scan.so \
+ datatype.so \
+ datatype2.so \
+ auth.so \
+ keyspace_events.so \
+ blockedclient.so \
+ getkeys.so \
+ getchannels.so \
+ test_lazyfree.so \
+ timer.so \
+ defragtest.so \
+ keyspecs.so \
+ hash.so \
+ zset.so \
+ stream.so \
+ mallocsize.so \
+ aclcheck.so \
+ list.so \
+ subcommands.so \
+ reply.so \
+ cmdintrospection.so \
+ eventloop.so \
+ moduleconfigs.so \
+ moduleconfigstwo.so \
+ publish.so \
+ usercall.so
+
+.PHONY: all
+
+all: $(TEST_MODULES)
+
+32bit:
+ $(MAKE) CFLAGS="-m32" LDFLAGS="-m32"
+
+%.xo: %.c ../../src/redismodule.h
+ $(CC) -I../../src $(CFLAGS) $(SHOBJ_CFLAGS) -fPIC -c $< -o $@
+
+%.so: %.xo
+ $(LD) -o $@ $^ $(SHOBJ_LDFLAGS) $(LDFLAGS) $(LIBS)
+
+.PHONY: clean
+
+clean:
+ rm -f $(TEST_MODULES) $(TEST_MODULES:.so=.xo)