1572c4311Sfengbojiang# Redis Makefile 2572c4311Sfengbojiang# Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com> 3572c4311Sfengbojiang# This file is released under the BSD license, see the COPYING file 4572c4311Sfengbojiang# 5572c4311Sfengbojiang# The Makefile composes the final FINAL_CFLAGS and FINAL_LDFLAGS using 6572c4311Sfengbojiang# what is needed for Redis plus the standard CFLAGS and LDFLAGS passed. 7572c4311Sfengbojiang# However when building the dependencies (Jemalloc, Lua, Hiredis, ...) 8572c4311Sfengbojiang# CFLAGS and LDFLAGS are propagated to the dependencies, so to pass 9572c4311Sfengbojiang# flags only to be used when compiling / linking Redis itself REDIS_CFLAGS 10572c4311Sfengbojiang# and REDIS_LDFLAGS are used instead (this is the case of 'make gcov'). 11572c4311Sfengbojiang# 12572c4311Sfengbojiang# Dependencies are stored in the Makefile.dep file. To rebuild this file 13572c4311Sfengbojiang# Just use 'make dep', but this is only needed by developers. 14572c4311Sfengbojiang 15572c4311Sfengbojiangifeq ($(FF_PATH),) 16572c4311Sfengbojiang FF_PATH=/usr/local 17572c4311Sfengbojiang $(warning FF_PATH environment variable not defined, default FF_PATH=/usr/local) 18572c4311Sfengbojiangendif 19572c4311Sfengbojiang 20*8d76b62eSfengbojiangifneq ($(shell pkg-config --exists libdpdk && echo 0),0) 21*8d76b62eSfengbojiang$(error "no installation of DPDK found, maybe you shuld export environment variable `PKG_CONFIG_PATH`") 22572c4311Sfengbojiangendif 23572c4311Sfengbojiang 24572c4311Sfengbojiangrelease_hdr := $(shell sh -c './mkreleasehdr.sh') 25572c4311Sfengbojianguname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') 26572c4311Sfengbojianguname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') 27572c4311SfengbojiangOPTIMIZATION?=-O2 28572c4311SfengbojiangDEPENDENCY_TARGETS=hiredis linenoise lua 29572c4311SfengbojiangNODEPS:=clean distclean 30572c4311Sfengbojiang 31572c4311Sfengbojiang# Default settings 32572c4311SfengbojiangSTD=-std=c99 -pedantic -DREDIS_STATIC='' -D_POSIX_C_SOURCE=199506L 33572c4311Sfengbojiangifneq (,$(findstring clang,$(CC))) 34572c4311Sfengbojiangifneq (,$(findstring FreeBSD,$(uname_S))) 35572c4311Sfengbojiang STD+=-Wno-c11-extensions 36572c4311Sfengbojiangendif 37572c4311Sfengbojiangendif 38572c4311SfengbojiangWARN=-Wall -W -Wno-missing-field-initializers 39572c4311SfengbojiangOPT=$(OPTIMIZATION) 40572c4311Sfengbojiang 41572c4311SfengbojiangPREFIX?=/usr/local 42572c4311SfengbojiangINSTALL_BIN=$(PREFIX)/bin 43572c4311SfengbojiangINSTALL=install 44572c4311Sfengbojiang 45572c4311Sfengbojiang# Default allocator defaults to Jemalloc if it's not an ARM 46572c4311SfengbojiangMALLOC=libc 47572c4311Sfengbojiangifneq ($(uname_M),armv6l) 48572c4311Sfengbojiangifneq ($(uname_M),armv7l) 49572c4311Sfengbojiangifeq ($(uname_S),Linux) 50572c4311Sfengbojiang MALLOC=jemalloc 51572c4311Sfengbojiangendif 52572c4311Sfengbojiangendif 53572c4311Sfengbojiangendif 54572c4311Sfengbojiang 55572c4311Sfengbojiang# To get ARM stack traces if Redis crashes we need a special C flag. 56572c4311Sfengbojiangifneq (,$(filter aarch64 armv,$(uname_M))) 57572c4311Sfengbojiang CFLAGS+=-funwind-tables 58572c4311Sfengbojiangelse 59572c4311Sfengbojiangifneq (,$(findstring armv,$(uname_M))) 60572c4311Sfengbojiang CFLAGS+=-funwind-tables 61572c4311Sfengbojiangendif 62572c4311Sfengbojiangendif 63572c4311Sfengbojiang 64572c4311Sfengbojiang# Backwards compatibility for selecting an allocator 65572c4311Sfengbojiangifeq ($(USE_TCMALLOC),yes) 66572c4311Sfengbojiang MALLOC=tcmalloc 67572c4311Sfengbojiangendif 68572c4311Sfengbojiang 69572c4311Sfengbojiangifeq ($(USE_TCMALLOC_MINIMAL),yes) 70572c4311Sfengbojiang MALLOC=tcmalloc_minimal 71572c4311Sfengbojiangendif 72572c4311Sfengbojiang 73572c4311Sfengbojiangifeq ($(USE_JEMALLOC),yes) 74572c4311Sfengbojiang MALLOC=jemalloc 75572c4311Sfengbojiangendif 76572c4311Sfengbojiang 77572c4311Sfengbojiangifeq ($(USE_JEMALLOC),no) 78572c4311Sfengbojiang MALLOC=libc 79572c4311Sfengbojiangendif 80572c4311Sfengbojiang 81572c4311Sfengbojiang# Override default settings if possible 82572c4311Sfengbojiang-include .make-settings 83572c4311Sfengbojiang 84572c4311SfengbojiangFINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) 85572c4311SfengbojiangFINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) 86572c4311SfengbojiangFINAL_LIBS=-lm 87572c4311SfengbojiangDEBUG=-g -ggdb 88572c4311Sfengbojiang 89572c4311Sfengbojiangifeq ($(uname_S),SunOS) 90572c4311Sfengbojiang # SunOS 91572c4311Sfengbojiang ifneq ($(@@),32bit) 92572c4311Sfengbojiang CFLAGS+= -m64 93572c4311Sfengbojiang LDFLAGS+= -m64 94572c4311Sfengbojiang endif 95572c4311Sfengbojiang DEBUG=-g 96572c4311Sfengbojiang DEBUG_FLAGS=-g 97572c4311Sfengbojiang export CFLAGS LDFLAGS DEBUG DEBUG_FLAGS 98572c4311Sfengbojiang INSTALL=cp -pf 99572c4311Sfengbojiang FINAL_CFLAGS+= -D__EXTENSIONS__ -D_XPG6 100572c4311Sfengbojiang FINAL_LIBS+= -ldl -lnsl -lsocket -lresolv -lpthread -lrt 101572c4311Sfengbojiangelse 102572c4311Sfengbojiangifeq ($(uname_S),Darwin) 103572c4311Sfengbojiang # Darwin 104572c4311Sfengbojiang FINAL_LIBS+= -ldl 105572c4311Sfengbojiangelse 106572c4311Sfengbojiangifeq ($(uname_S),AIX) 107572c4311Sfengbojiang # AIX 108572c4311Sfengbojiang FINAL_LDFLAGS+= -Wl,-bexpall 109572c4311Sfengbojiang FINAL_LIBS+=-ldl -pthread -lcrypt -lbsd 110572c4311Sfengbojiangelse 111572c4311Sfengbojiangifeq ($(uname_S),OpenBSD) 112572c4311Sfengbojiang # OpenBSD 113572c4311Sfengbojiang FINAL_LIBS+= -lpthread 114572c4311Sfengbojiang ifeq ($(USE_BACKTRACE),yes) 115572c4311Sfengbojiang FINAL_CFLAGS+= -DUSE_BACKTRACE -I/usr/local/include 116572c4311Sfengbojiang FINAL_LDFLAGS+= -L/usr/local/lib 117572c4311Sfengbojiang FINAL_LIBS+= -lexecinfo 118572c4311Sfengbojiang endif 119572c4311Sfengbojiang 120572c4311Sfengbojiangelse 121572c4311Sfengbojiangifeq ($(uname_S),FreeBSD) 122572c4311Sfengbojiang # FreeBSD 123572c4311Sfengbojiang FINAL_LIBS+= -lpthread -lexecinfo 124572c4311Sfengbojiangelse 125572c4311Sfengbojiangifeq ($(uname_S),DragonFly) 126572c4311Sfengbojiang # FreeBSD 127572c4311Sfengbojiang FINAL_LIBS+= -lpthread -lexecinfo 128572c4311Sfengbojiangelse 129572c4311Sfengbojiang # All the other OSes (notably Linux) 130572c4311Sfengbojiang FINAL_LDFLAGS+= -rdynamic 131572c4311Sfengbojiang FINAL_LIBS+=-ldl -pthread -lrt 132572c4311Sfengbojiangendif 133572c4311Sfengbojiangendif 134572c4311Sfengbojiangendif 135572c4311Sfengbojiangendif 136572c4311Sfengbojiangendif 137572c4311Sfengbojiangendif 138572c4311Sfengbojiang# Include paths to dependencies 139572c4311SfengbojiangFINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src 140572c4311Sfengbojiang 141572c4311Sfengbojiangifeq ($(MALLOC),tcmalloc) 142572c4311Sfengbojiang FINAL_CFLAGS+= -DUSE_TCMALLOC 143572c4311Sfengbojiang FINAL_LIBS+= -ltcmalloc 144572c4311Sfengbojiangendif 145572c4311Sfengbojiang 146572c4311Sfengbojiangifeq ($(MALLOC),tcmalloc_minimal) 147572c4311Sfengbojiang FINAL_CFLAGS+= -DUSE_TCMALLOC 148572c4311Sfengbojiang FINAL_LIBS+= -ltcmalloc_minimal 149572c4311Sfengbojiangendif 150572c4311Sfengbojiang 151572c4311Sfengbojiangifeq ($(MALLOC),jemalloc) 152572c4311Sfengbojiang DEPENDENCY_TARGETS+= jemalloc 153572c4311Sfengbojiang FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include 154572c4311Sfengbojiang FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS) 155572c4311Sfengbojiangendif 156572c4311Sfengbojiang 157572c4311SfengbojiangFINAL_CFLAGS+= -DHAVE_FF_KQUEUE 158572c4311SfengbojiangFINAL_CFLAGS+= -I$(FF_PATH)/lib 159572c4311Sfengbojiang 160*8d76b62eSfengbojiangPKGCONF ?= pkg-config 161*8d76b62eSfengbojiang 162*8d76b62eSfengbojiangFINAL_LIBS+= $(shell $(PKGCONF) --static --libs libdpdk) 163572c4311SfengbojiangFINAL_LIBS+= -L${FF_PATH}/lib -Wl,--whole-archive,-lfstack,--no-whole-archive 164572c4311SfengbojiangFINAL_LIBS+= -Wl,--no-whole-archive -lrt -lm -ldl -lcrypto -lpthread -lnuma 165572c4311Sfengbojiang 166572c4311SfengbojiangREDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) 167572c4311SfengbojiangREDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS) 168572c4311SfengbojiangREDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL) 169572c4311Sfengbojiang 170572c4311SfengbojiangCCCOLOR="\033[34m" 171572c4311SfengbojiangLINKCOLOR="\033[34;1m" 172572c4311SfengbojiangSRCCOLOR="\033[33m" 173572c4311SfengbojiangBINCOLOR="\033[37;1m" 174572c4311SfengbojiangMAKECOLOR="\033[32;1m" 175572c4311SfengbojiangENDCOLOR="\033[0m" 176572c4311Sfengbojiang 177572c4311Sfengbojiangifndef V 178572c4311SfengbojiangQUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR) 1>&2; 179572c4311SfengbojiangQUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2; 180572c4311SfengbojiangQUIET_INSTALL = @printf ' %b %b\n' $(LINKCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2; 181572c4311Sfengbojiangendif 182572c4311Sfengbojiang 183572c4311SfengbojiangREDIS_SERVER_NAME=redis-server 184572c4311SfengbojiangREDIS_SENTINEL_NAME=redis-sentinel 185572c4311SfengbojiangREDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o anet_ff.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o 186572c4311SfengbojiangREDIS_CLI_NAME=redis-cli 187572c4311SfengbojiangREDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o anet.o anet_ff.o ae.o crc64.o siphash.o crc16.o 188572c4311SfengbojiangREDIS_BENCHMARK_NAME=redis-benchmark 189572c4311SfengbojiangREDIS_BENCHMARK_OBJ=ae.o anet.o anet_ff.o redis-benchmark.o adlist.o zmalloc.o redis-benchmark.o 190572c4311SfengbojiangREDIS_CHECK_RDB_NAME=redis-check-rdb 191572c4311SfengbojiangREDIS_CHECK_AOF_NAME=redis-check-aof 192572c4311Sfengbojiang 193572c4311Sfengbojiangall: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) 194572c4311Sfengbojiang @echo "" 195572c4311Sfengbojiang @echo "Hint: It's a good idea to run 'make test' ;)" 196572c4311Sfengbojiang @echo "" 197572c4311Sfengbojiang 198572c4311SfengbojiangMakefile.dep: 199572c4311Sfengbojiang -$(REDIS_CC) -MM *.c > Makefile.dep 2> /dev/null || true 200572c4311Sfengbojiang 201572c4311Sfengbojiangifeq (0, $(words $(findstring $(MAKECMDGOALS), $(NODEPS)))) 202572c4311Sfengbojiang-include Makefile.dep 203572c4311Sfengbojiangendif 204572c4311Sfengbojiang 205572c4311Sfengbojiang.PHONY: all 206572c4311Sfengbojiang 207572c4311Sfengbojiangpersist-settings: distclean 208572c4311Sfengbojiang echo STD=$(STD) >> .make-settings 209572c4311Sfengbojiang echo WARN=$(WARN) >> .make-settings 210572c4311Sfengbojiang echo OPT=$(OPT) >> .make-settings 211572c4311Sfengbojiang echo MALLOC=$(MALLOC) >> .make-settings 212572c4311Sfengbojiang echo CFLAGS=$(CFLAGS) >> .make-settings 213572c4311Sfengbojiang echo LDFLAGS=$(LDFLAGS) >> .make-settings 214572c4311Sfengbojiang echo REDIS_CFLAGS=$(REDIS_CFLAGS) >> .make-settings 215572c4311Sfengbojiang echo REDIS_LDFLAGS=$(REDIS_LDFLAGS) >> .make-settings 216572c4311Sfengbojiang echo PREV_FINAL_CFLAGS=$(FINAL_CFLAGS) >> .make-settings 217572c4311Sfengbojiang echo PREV_FINAL_LDFLAGS=$(FINAL_LDFLAGS) >> .make-settings 218572c4311Sfengbojiang -(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS)) 219572c4311Sfengbojiang 220572c4311Sfengbojiang.PHONY: persist-settings 221572c4311Sfengbojiang 222572c4311Sfengbojiang# Prerequisites target 223572c4311Sfengbojiang.make-prerequisites: 224572c4311Sfengbojiang @touch $@ 225572c4311Sfengbojiang 226572c4311Sfengbojiang# Clean everything, persist settings and build dependencies if anything changed 227572c4311Sfengbojiangifneq ($(strip $(PREV_FINAL_CFLAGS)), $(strip $(FINAL_CFLAGS))) 228572c4311Sfengbojiang.make-prerequisites: persist-settings 229572c4311Sfengbojiangendif 230572c4311Sfengbojiang 231572c4311Sfengbojiangifneq ($(strip $(PREV_FINAL_LDFLAGS)), $(strip $(FINAL_LDFLAGS))) 232572c4311Sfengbojiang.make-prerequisites: persist-settings 233572c4311Sfengbojiangendif 234572c4311Sfengbojiang 235572c4311Sfengbojiang# redis-server 236572c4311Sfengbojiang$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) 237572c4311Sfengbojiang $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) 238572c4311Sfengbojiang 239572c4311Sfengbojiang# redis-sentinel 240572c4311Sfengbojiang$(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) 241572c4311Sfengbojiang $(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) 242572c4311Sfengbojiang 243572c4311Sfengbojiang# redis-check-rdb 244572c4311Sfengbojiang$(REDIS_CHECK_RDB_NAME): $(REDIS_SERVER_NAME) 245572c4311Sfengbojiang $(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_CHECK_RDB_NAME) 246572c4311Sfengbojiang 247572c4311Sfengbojiang# redis-check-aof 248572c4311Sfengbojiang$(REDIS_CHECK_AOF_NAME): $(REDIS_SERVER_NAME) 249572c4311Sfengbojiang $(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME) 250572c4311Sfengbojiang 251572c4311Sfengbojiang# redis-cli 252572c4311Sfengbojiang$(REDIS_CLI_NAME): $(REDIS_CLI_OBJ) 253572c4311Sfengbojiang $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o $(FINAL_LIBS) 254572c4311Sfengbojiang 255572c4311Sfengbojiang# redis-benchmark 256572c4311Sfengbojiang$(REDIS_BENCHMARK_NAME): $(REDIS_BENCHMARK_OBJ) 257572c4311Sfengbojiang $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) 258572c4311Sfengbojiang 259572c4311Sfengbojiangdict-benchmark: dict.c zmalloc.c sds.c siphash.c 260572c4311Sfengbojiang $(REDIS_CC) $(FINAL_CFLAGS) $^ -D DICT_BENCHMARK_MAIN -o $@ $(FINAL_LIBS) 261572c4311Sfengbojiang 262572c4311Sfengbojiang# Because the jemalloc.h header is generated as a part of the jemalloc build, 263572c4311Sfengbojiang# building it should complete before building any other object. Instead of 264572c4311Sfengbojiang# depending on a single artifact, build all dependencies first. 265572c4311Sfengbojiang%.o: %.c .make-prerequisites 266572c4311Sfengbojiang $(REDIS_CC) -c $< 267572c4311Sfengbojiang 268572c4311Sfengbojiangclean: 269572c4311Sfengbojiang rm -rf $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) *.o *.gcda *.gcno *.gcov redis.info lcov-html Makefile.dep dict-benchmark 270572c4311Sfengbojiang 271572c4311Sfengbojiang.PHONY: clean 272572c4311Sfengbojiang 273572c4311Sfengbojiangdistclean: clean 274572c4311Sfengbojiang -(cd ../deps && $(MAKE) distclean) 275572c4311Sfengbojiang -(rm -f .make-*) 276572c4311Sfengbojiang 277572c4311Sfengbojiang.PHONY: distclean 278572c4311Sfengbojiang 279572c4311Sfengbojiangtest: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME) 280572c4311Sfengbojiang @(cd ..; ./runtest) 281572c4311Sfengbojiang 282572c4311Sfengbojiangtest-sentinel: $(REDIS_SENTINEL_NAME) 283572c4311Sfengbojiang @(cd ..; ./runtest-sentinel) 284572c4311Sfengbojiang 285572c4311Sfengbojiangcheck: test 286572c4311Sfengbojiang 287572c4311Sfengbojianglcov: 288572c4311Sfengbojiang $(MAKE) gcov 289572c4311Sfengbojiang @(set -e; cd ..; ./runtest --clients 1) 290572c4311Sfengbojiang @geninfo -o redis.info . 291572c4311Sfengbojiang @genhtml --legend -o lcov-html redis.info 292572c4311Sfengbojiang 293572c4311Sfengbojiangtest-sds: sds.c sds.h 294572c4311Sfengbojiang $(REDIS_CC) sds.c zmalloc.c -DSDS_TEST_MAIN $(FINAL_LIBS) -o /tmp/sds_test 295572c4311Sfengbojiang /tmp/sds_test 296572c4311Sfengbojiang 297572c4311Sfengbojiang.PHONY: lcov 298572c4311Sfengbojiang 299572c4311Sfengbojiangbench: $(REDIS_BENCHMARK_NAME) 300572c4311Sfengbojiang ./$(REDIS_BENCHMARK_NAME) 301572c4311Sfengbojiang 302572c4311Sfengbojiang32bit: 303572c4311Sfengbojiang @echo "" 304572c4311Sfengbojiang @echo "WARNING: if it fails under Linux you probably need to install libc6-dev-i386" 305572c4311Sfengbojiang @echo "" 306572c4311Sfengbojiang $(MAKE) CFLAGS="-m32" LDFLAGS="-m32" 307572c4311Sfengbojiang 308572c4311Sfengbojianggcov: 309572c4311Sfengbojiang $(MAKE) REDIS_CFLAGS="-fprofile-arcs -ftest-coverage -DCOVERAGE_TEST" REDIS_LDFLAGS="-fprofile-arcs -ftest-coverage" 310572c4311Sfengbojiang 311572c4311Sfengbojiangnoopt: 312572c4311Sfengbojiang $(MAKE) OPTIMIZATION="-O0" 313572c4311Sfengbojiang 314572c4311Sfengbojiangvalgrind: 315572c4311Sfengbojiang $(MAKE) OPTIMIZATION="-O0" MALLOC="libc" 316572c4311Sfengbojiang 317572c4311Sfengbojianghelgrind: 318572c4311Sfengbojiang $(MAKE) OPTIMIZATION="-O0" MALLOC="libc" CFLAGS="-D__ATOMIC_VAR_FORCE_SYNC_MACROS" 319572c4311Sfengbojiang 320572c4311Sfengbojiangsrc/help.h: 321572c4311Sfengbojiang @../utils/generate-command-help.rb > help.h 322572c4311Sfengbojiang 323572c4311Sfengbojianginstall: all 324572c4311Sfengbojiang @mkdir -p $(INSTALL_BIN) 325572c4311Sfengbojiang $(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(INSTALL_BIN) 326572c4311Sfengbojiang $(REDIS_INSTALL) $(REDIS_BENCHMARK_NAME) $(INSTALL_BIN) 327572c4311Sfengbojiang $(REDIS_INSTALL) $(REDIS_CLI_NAME) $(INSTALL_BIN) 328572c4311Sfengbojiang $(REDIS_INSTALL) $(REDIS_CHECK_RDB_NAME) $(INSTALL_BIN) 329572c4311Sfengbojiang $(REDIS_INSTALL) $(REDIS_CHECK_AOF_NAME) $(INSTALL_BIN) 330572c4311Sfengbojiang @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_SENTINEL_NAME) 331572c4311Sfengbojiang 332572c4311Sfengbojianguninstall: 333572c4311Sfengbojiang rm -f $(INSTALL_BIN)/{$(REDIS_SERVER_NAME),$(REDIS_BENCHMARK_NAME),$(REDIS_CLI_NAME),$(REDIS_CHECK_RDB_NAME),$(REDIS_CHECK_AOF_NAME),$(REDIS_SENTINEL_NAME)} 334