diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:52:54 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:52:54 +0100 |
| commit | dcacc00e3750300617ba6e16eb346713f91a783a (patch) | |
| tree | 38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/redis-unstable/deps/Makefile | |
| parent | 58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff) | |
| download | crep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz | |
Remove testing data
Diffstat (limited to 'examples/redis-unstable/deps/Makefile')
| -rw-r--r-- | examples/redis-unstable/deps/Makefile | 151 |
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 | |||
| 3 | uname_S:= $(shell sh -c 'uname -s 2>/dev/null || echo not') | ||
| 4 | |||
| 5 | LUA_DEBUG?=no | ||
| 6 | LUA_COVERAGE?=no | ||
| 7 | |||
| 8 | CCCOLOR="\033[34m" | ||
| 9 | LINKCOLOR="\033[34;1m" | ||
| 10 | SRCCOLOR="\033[33m" | ||
| 11 | BINCOLOR="\033[37;1m" | ||
| 12 | MAKECOLOR="\033[32;1m" | ||
| 13 | ENDCOLOR="\033[0m" | ||
| 14 | |||
| 15 | DEPS_CFLAGS := $(CFLAGS) | ||
| 16 | DEPS_LDFLAGS := $(LDFLAGS) | ||
| 17 | CLANG := $(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. | ||
| 23 | ifeq ($(SANITIZER),memory) | ||
| 24 | ifeq (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 | ||
| 27 | else | ||
| 28 | $(error "MemorySanitizer needs to be compiled and linked with clang. Please use CC=clang") | ||
| 29 | endif | ||
| 30 | endif | ||
| 31 | |||
| 32 | default: | ||
| 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 | ||
| 42 | ifneq ($(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 | ||
| 46 | endif | ||
| 47 | |||
| 48 | # Clean everything when LDFLAGS is different | ||
| 49 | ifneq ($(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 | ||
| 53 | endif | ||
| 54 | |||
| 55 | distclean: | ||
| 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 | |||
| 68 | ifneq (,$(filter $(BUILD_TLS),yes module)) | ||
| 69 | HIREDIS_MAKE_FLAGS = USE_SSL=1 | ||
| 70 | endif | ||
| 71 | |||
| 72 | # Special care is needed to pass additional CFLAGS/LDFLAGS to hiredis as it | ||
| 73 | # modifies these variables in its Makefile. | ||
| 74 | hiredis: .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 | |||
| 80 | linenoise: .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 | |||
| 86 | hdr_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 | |||
| 92 | fpconv: .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 | |||
| 98 | fast_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 | |||
| 104 | XXHASH_CFLAGS = -fPIC $(DEPS_CFLAGS) | ||
| 105 | xxhash: .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 | |||
| 110 | ifeq ($(uname_S),SunOS) | ||
| 111 | # Make isinf() available | ||
| 112 | LUA_CFLAGS= -D__C99FEATURES__=1 | ||
| 113 | endif | ||
| 114 | |||
| 115 | LUA_CFLAGS+= -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP $(DEPS_CFLAGS) | ||
| 116 | LUA_LDFLAGS+= $(DEPS_LDFLAGS) | ||
| 117 | ifeq ($(LUA_DEBUG),yes) | ||
| 118 | LUA_CFLAGS+= -O0 -g -DLUA_USE_APICHECK | ||
| 119 | else | ||
| 120 | LUA_CFLAGS+= -O2 | ||
| 121 | endif | ||
| 122 | ifeq ($(LUA_COVERAGE),yes) | ||
| 123 | LUA_CFLAGS += -fprofile-arcs -ftest-coverage | ||
| 124 | LUA_LDFLAGS += -fprofile-arcs -ftest-coverage | ||
| 125 | endif | ||
| 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. | ||
| 130 | AR=ar | ||
| 131 | ARFLAGS=rc | ||
| 132 | |||
| 133 | lua: .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 | |||
| 139 | JEMALLOC_CFLAGS=$(CFLAGS) | ||
| 140 | JEMALLOC_LDFLAGS=$(LDFLAGS) | ||
| 141 | |||
| 142 | ifneq ($(DEB_HOST_GNU_TYPE),) | ||
| 143 | JEMALLOC_CONFIGURE_OPTS += --host=$(DEB_HOST_GNU_TYPE) | ||
| 144 | endif | ||
| 145 | |||
| 146 | jemalloc: .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 | ||
