2 # Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com>
3 # This file is released under the BSD license, see the COPYING file
5 DEBUG?= -g -rdynamic -ggdb
6 CFLAGS?= -std=c99 -pedantic -O0 -Wall -W -DSDS_ABORT_ON_OOM
9 OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o
10 BENCHOBJ = ae.o anet.o benchmark.o sds.o adlist.o zmalloc.o
11 CLIOBJ = anet.o sds.o adlist.o redis-cli.o zmalloc.o
13 PRGNAME = redis-server
14 BENCHPRGNAME = redis-benchmark
15 CLIPRGNAME = redis-cli
17 all: redis-server redis-benchmark redis-cli
19 # Deps (use make dep to generate this)
20 adlist.o: adlist.c adlist.h
23 benchmark.o: benchmark.c ae.h anet.h sds.h adlist.h
25 redis-cli.o: redis-cli.c anet.h sds.h adlist.h
26 redis.o: redis.c ae.h sds.h anet.h dict.h adlist.h zmalloc.c zmalloc.h
32 $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
34 @echo "Hint: To run the test-redis.tcl script is a good idea."
35 @echo "Launch the redis server with ./redis-server, then in another"
36 @echo "terminal window enter this directory and run 'make test'."
39 redis-benchmark: $(BENCHOBJ)
40 $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ)
43 $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ)
46 $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
49 rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o
61 git log '--pretty=format:%ad %s' --date=short > Changelog