]> git.saurik.com Git - redis.git/blame - Makefile
in-memory specialized object encoding (for now 32 signed integers only)
[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
01fe7151 5DEBUG?= -g -rdynamic -ggdb
942a3961 6CFLAGS?= -std=c99 -O2 -pedantic -Wall -W
ed9b544e 7CCOPT= $(CFLAGS)
8
5f5b9840 9OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.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)
9e9c0ce1 20adlist.o: adlist.c adlist.h zmalloc.h
21ae.o: ae.c ae.h zmalloc.h
22anet.o: anet.c fmacros.h anet.h
23benchmark.o: benchmark.c fmacros.h ae.h anet.h sds.h adlist.h zmalloc.h
24dict.o: dict.c fmacros.h dict.h zmalloc.h
25lzf_c.o: lzf_c.c lzfP.h
26lzf_d.o: lzf_d.c lzfP.h
27pqsort.o: pqsort.c
28redis-cli.o: redis-cli.c fmacros.h anet.h sds.h adlist.h zmalloc.h
29redis.o: redis.c fmacros.h ae.h sds.h anet.h dict.h adlist.h zmalloc.h lzf.h pqsort.h config.h
30sds.o: sds.c sds.h zmalloc.h
31zmalloc.o: zmalloc.c config.h
ed9b544e 32
33redis-server: $(OBJ)
34 $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
35 @echo ""
36 @echo "Hint: To run the test-redis.tcl script is a good idea."
37 @echo "Launch the redis server with ./redis-server, then in another"
38 @echo "terminal window enter this directory and run 'make test'."
39 @echo ""
40
41redis-benchmark: $(BENCHOBJ)
42 $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ)
43
44redis-cli: $(CLIOBJ)
45 $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ)
46
47.c.o:
48 $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
49
50clean:
51 rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o
52
53dep:
54 $(CC) -MM *.c
55
56test:
57 tclsh test-redis.tcl
58
59bench:
60 ./redis-benchmark
378fd421 61
62log:
63 git log '--pretty=format:%ad %s' --date=short > Changelog