summaryrefslogtreecommitdiff
path: root/examples/redis-unstable/deps/Makefile
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
commitdcacc00e3750300617ba6e16eb346713f91a783a (patch)
tree38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/redis-unstable/deps/Makefile
parent58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff)
downloadcrep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz
Remove testing data
Diffstat (limited to 'examples/redis-unstable/deps/Makefile')
-rw-r--r--examples/redis-unstable/deps/Makefile151
1 files changed, 0 insertions, 151 deletions
diff --git a/examples/redis-unstable/deps/Makefile b/examples/redis-unstable/deps/Makefile
deleted file mode 100644
index c1d13bd..0000000
--- a/examples/redis-unstable/deps/Makefile
+++ /dev/null
@@ -1,151 +0,0 @@
1# Redis dependency Makefile
2
3uname_S:= $(shell sh -c 'uname -s 2>/dev/null || echo not')
4
5LUA_DEBUG?=no
6LUA_COVERAGE?=no
7
8CCCOLOR="\033[34m"
9LINKCOLOR="\033[34;1m"
10SRCCOLOR="\033[33m"
11BINCOLOR="\033[37;1m"
12MAKECOLOR="\033[32;1m"
13ENDCOLOR="\033[0m"
14
15DEPS_CFLAGS := $(CFLAGS)
16DEPS_LDFLAGS := $(LDFLAGS)
17CLANG := $(findstring clang,$(shell sh -c '$(CC) --version | head -1'))
18
19# MSan looks for errors related to uninitialized memory.
20# Make sure to build the dependencies with MSan as it needs all the code to be instrumented.
21# A library could be used to initialize memory but if it's not build with --fsanitize=memory then
22# MSan doesn't know about it and will spit false positive error when that memory is then used.
23ifeq ($(SANITIZER),memory)
24ifeq (clang, $(CLANG))
25 DEPS_CFLAGS+=-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-sanitize-recover=all -fno-omit-frame-pointer
26 DEPS_LDFLAGS+=-fsanitize=memory
27else
28 $(error "MemorySanitizer needs to be compiled and linked with clang. Please use CC=clang")
29endif
30endif
31
32default:
33 @echo "Explicit target required"
34
35.PHONY: default
36
37# Prerequisites target
38.make-prerequisites:
39 @touch $@
40
41# Clean everything when CFLAGS is different
42ifneq ($(shell sh -c '[ -f .make-cflags ] && cat .make-cflags || echo none'), $(CFLAGS))
43.make-cflags: distclean
44 -(echo "$(CFLAGS)" > .make-cflags)
45.make-prerequisites: .make-cflags
46endif
47
48# Clean everything when LDFLAGS is different
49ifneq ($(shell sh -c '[ -f .make-ldflags ] && cat .make-ldflags || echo none'), $(LDFLAGS))
50.make-ldflags: distclean
51 -(echo "$(LDFLAGS)" > .make-ldflags)
52.make-prerequisites: .make-ldflags
53endif
54
55distclean:
56 -(cd hiredis && $(MAKE) clean) > /dev/null || true
57 -(cd linenoise && $(MAKE) clean) > /dev/null || true
58 -(cd lua && $(MAKE) clean) > /dev/null || true
59 -(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true
60 -(cd hdr_histogram && $(MAKE) clean) > /dev/null || true
61 -(cd fpconv && $(MAKE) clean) > /dev/null || true
62 -(cd fast_float && $(MAKE) clean) > /dev/null || true
63 -(cd xxhash && $(MAKE) clean) > /dev/null || true
64 -(rm -f .make-*)
65
66.PHONY: distclean
67
68ifneq (,$(filter $(BUILD_TLS),yes module))
69 HIREDIS_MAKE_FLAGS = USE_SSL=1
70endif
71
72# Special care is needed to pass additional CFLAGS/LDFLAGS to hiredis as it
73# modifies these variables in its Makefile.
74hiredis: .make-prerequisites
75 @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
76 cd hiredis && $(MAKE) static $(HIREDIS_MAKE_FLAGS) HIREDIS_CFLAGS="$(DEPS_CFLAGS)" HIREDIS_LDFLAGS="$(DEPS_LDFLAGS)"
77
78.PHONY: hiredis
79
80linenoise: .make-prerequisites
81 @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
82 cd linenoise && $(MAKE) CFLAGS="$(DEPS_CFLAGS)" LDFLAGS="$(DEPS_LDFLAGS)"
83
84.PHONY: linenoise
85
86hdr_histogram: .make-prerequisites
87 @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
88 cd hdr_histogram && $(MAKE) CFLAGS="$(DEPS_CFLAGS)" LDFLAGS="$(DEPS_LDFLAGS)"
89
90.PHONY: hdr_histogram
91
92fpconv: .make-prerequisites
93 @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
94 cd fpconv && $(MAKE) CFLAGS="$(DEPS_CFLAGS)" LDFLAGS="$(DEPS_LDFLAGS)"
95
96.PHONY: fpconv
97
98fast_float: .make-prerequisites
99 @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
100 cd fast_float && $(MAKE) libfast_float CFLAGS="$(DEPS_CFLAGS)" LDFLAGS="$(DEPS_LDFLAGS)"
101
102.PHONY: fast_float
103
104XXHASH_CFLAGS = -fPIC $(DEPS_CFLAGS)
105xxhash: .make-prerequisites
106 @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
107 cd xxhash && $(MAKE) lib CFLAGS="$(XXHASH_CFLAGS)" LDFLAGS="$(DEPS_LDFLAGS)"
108.PHONY: xxhash
109
110ifeq ($(uname_S),SunOS)
111 # Make isinf() available
112 LUA_CFLAGS= -D__C99FEATURES__=1
113endif
114
115LUA_CFLAGS+= -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP $(DEPS_CFLAGS)
116LUA_LDFLAGS+= $(DEPS_LDFLAGS)
117ifeq ($(LUA_DEBUG),yes)
118 LUA_CFLAGS+= -O0 -g -DLUA_USE_APICHECK
119else
120 LUA_CFLAGS+= -O2
121endif
122ifeq ($(LUA_COVERAGE),yes)
123 LUA_CFLAGS += -fprofile-arcs -ftest-coverage
124 LUA_LDFLAGS += -fprofile-arcs -ftest-coverage
125endif
126
127# lua's Makefile defines AR="ar rcu", which is unusual, and makes it more
128# challenging to cross-compile lua (and redis). These defines make it easier
129# to fit redis into cross-compilation environments, which typically set AR.
130AR=ar
131ARFLAGS=rc
132
133lua: .make-prerequisites
134 @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
135 cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)"
136
137.PHONY: lua
138
139JEMALLOC_CFLAGS=$(CFLAGS)
140JEMALLOC_LDFLAGS=$(LDFLAGS)
141
142ifneq ($(DEB_HOST_GNU_TYPE),)
143JEMALLOC_CONFIGURE_OPTS += --host=$(DEB_HOST_GNU_TYPE)
144endif
145
146jemalloc: .make-prerequisites
147 @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
148 cd jemalloc && ./configure --disable-cxx --with-version=5.3.0-0-g0 --with-lg-quantum=3 --disable-cache-oblivious --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS)
149 cd jemalloc && $(MAKE) lib/libjemalloc.a
150
151.PHONY: jemalloc