Files
zeekay ceddaa4db5 merge: upstream/unstable (-X ours, brand preserved)
# Conflicts:
#	AGENTS.md
#	AGENTS.md~upstream_unstable
#	deps/libkv/tests/ut_connect_fallback.c
#	deps/libvalkey/docs/standalone.md
#	src/dict.c
#	src/unit/test_fifo.c
#	src/unit/test_files.h
#	src/unit/test_help.h
#	src/unit/test_kv_strtod.c
#	src/unit/test_main.c
#	src/unit/test_mutexqueue.c
#	src/unit/test_util.c
#	tests/cluster/cluster.tcl
#	tests/cluster/run.tcl
#	tests/cluster/tests/03-failover-loop.tcl
#	tests/cluster/tests/04-resharding.tcl
#	tests/cluster/tests/07-replica-migration.tcl
#	tests/cluster/tests/12-replica-migration-2.tcl
#	tests/cluster/tests/12.1-replica-migration-3.tcl
#	tests/cluster/tests/28-cluster-shards.tcl
#	tests/cluster/tests/includes/init-tests.tcl
#	tests/cluster/tests/includes/utils.tcl
2026-06-02 10:21:23 -07:00

93 lines
2.0 KiB
Makefile

# 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=gnu11 -O2
SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
else # Linux, others
SHOBJ_CFLAGS ?= $(warning_cflags) -fno-common -g -ggdb -std=gnu11 -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 \
commandresult.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 \
block_keyspace_notification.so \
blockedclient.so \
getkeys.so \
getchannels.so \
test_lazyfree.so \
timer.so \
defragtest.so \
keyspecs.so \
hash.so \
hash_stringref.so \
zset.so \
stream.so \
mallocsize.so \
aclcheck.so \
list.so \
subcommands.so \
reply.so \
cmdintrospection.so \
eventloop.so \
moduleconfigs.so \
moduleconfigstwo.so \
moduleparameter.so \
publish.so \
usercall.so \
postnotifications.so \
moduleauthtwo.so \
rdbloadsave.so \
crash.so \
cluster.so \
helloscripting.so \
unsupported_features.so \
deferred_reply.so
.PHONY: all
all: $(TEST_MODULES)
32bit:
$(MAKE) CFLAGS="-m32" LDFLAGS="-m32"
%.xo: %.c ../../src/kvmodule.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)