]> git.saurik.com Git - redis.git/blame - Makefile
SUNION, SUNIONSTORE, Initial work on non blocking replication
[redis.git] / Makefile
CommitLineData
ed9b544e 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
5DEBUG?= -g
53f8c2c7 6CFLAGS?= -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM
ed9b544e 7CCOPT= $(CFLAGS)
8
774e3047 9OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o
ed9b544e 10BENCHOBJ = ae.o anet.o benchmark.o sds.o adlist.o zmalloc.o
11CLIOBJ = anet.o sds.o adlist.o redis-cli.o zmalloc.o
12
13PRGNAME = redis-server
14BENCHPRGNAME = redis-benchmark
15CLIPRGNAME = redis-cli
16
17all: redis-server redis-benchmark redis-cli
18
19# Deps (use make dep to generate this)
20adlist.o: adlist.c adlist.h
21ae.o: ae.c ae.h
22anet.o: anet.c anet.h
23benchmark.o: benchmark.c ae.h anet.h sds.h adlist.h
24dict.o: dict.c dict.h
25redis-cli.o: redis-cli.c anet.h sds.h adlist.h
092dac2a 26redis.o: redis.c ae.h sds.h anet.h dict.h adlist.h zmalloc.c zmalloc.h
ed9b544e 27sds.o: sds.c sds.h
28sha1.o: sha1.c sha1.h
29zmalloc.o: zmalloc.c
30
31redis-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
39redis-benchmark: $(BENCHOBJ)
40 $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ)
41
42redis-cli: $(CLIOBJ)
43 $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ)
44
45.c.o:
46 $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
47
48clean:
49 rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o
50
51dep:
52 $(CC) -MM *.c
53
54test:
55 tclsh test-redis.tcl
56
57bench:
58 ./redis-benchmark
378fd421 59
60log:
61 git log '--pretty=format:%ad %s' --date=short > Changelog