]> git.saurik.com Git - redis.git/blob - Makefile
Don't accept SAVE if BGSAVE is in progress
[redis.git] / Makefile
1 # Redis Makefile
2 # Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com>
3 # This file is released under the BSD license, see the COPYING file
4
5 DEBUG?= -g
6 CFLAGS?= -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM
7 CCOPT= $(CFLAGS)
8
9 OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.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
12
13 PRGNAME = redis-server
14 BENCHPRGNAME = redis-benchmark
15 CLIPRGNAME = redis-cli
16
17 all: redis-server redis-benchmark redis-cli
18
19 # Deps (use make dep to generate this)
20 adlist.o: adlist.c adlist.h
21 ae.o: ae.c ae.h
22 anet.o: anet.c anet.h
23 benchmark.o: benchmark.c ae.h anet.h sds.h adlist.h
24 dict.o: dict.c dict.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
27 sds.o: sds.c sds.h
28 sha1.o: sha1.c sha1.h
29 zmalloc.o: zmalloc.c
30
31 redis-server: $(OBJ)
32 $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
33 @echo ""
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'."
37 @echo ""
38
39 redis-benchmark: $(BENCHOBJ)
40 $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ)
41
42 redis-cli: $(CLIOBJ)
43 $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ)
44
45 .c.o:
46 $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
47
48 clean:
49 rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o
50
51 dep:
52 $(CC) -MM *.c
53
54 test:
55 tclsh test-redis.tcl
56
57 bench:
58 ./redis-benchmark
59
60 log:
61 git log '--pretty=format:%ad %s' --date=short > Changelog