]> git.saurik.com Git - redis.git/blame - Makefile
ZSets double to string serialization fixed
[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
325d1eb4 5uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
6ifeq ($(uname_S),SunOS)
7 CFLAGS?= -std=c99 -pedantic -O2 -Wall -W -D__EXTENSIONS__ -D_XPG6
a7866db6 8 CCLINK?= -ldl -lnsl -lsocket -lm
325d1eb4 9else
5b19e727 10 CFLAGS?= -std=c99 -pedantic -O2 -Wall -W $(ARCH)
a7866db6 11 CCLINK?= -lm
325d1eb4 12endif
13CCOPT= $(CFLAGS) $(CCLINK) $(ARCH)
01fe7151 14DEBUG?= -g -rdynamic -ggdb
ed9b544e 15
5f5b9840 16OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o
ed9b544e 17BENCHOBJ = ae.o anet.o benchmark.o sds.o adlist.o zmalloc.o
18CLIOBJ = anet.o sds.o adlist.o redis-cli.o zmalloc.o
19
20PRGNAME = redis-server
21BENCHPRGNAME = redis-benchmark
22CLIPRGNAME = redis-cli
23
24all: redis-server redis-benchmark redis-cli
25
26# Deps (use make dep to generate this)
9e9c0ce1 27adlist.o: adlist.c adlist.h zmalloc.h
28ae.o: ae.c ae.h zmalloc.h
29anet.o: anet.c fmacros.h anet.h
30benchmark.o: benchmark.c fmacros.h ae.h anet.h sds.h adlist.h zmalloc.h
31dict.o: dict.c fmacros.h dict.h zmalloc.h
32lzf_c.o: lzf_c.c lzfP.h
33lzf_d.o: lzf_d.c lzfP.h
34pqsort.o: pqsort.c
35redis-cli.o: redis-cli.c fmacros.h anet.h sds.h adlist.h zmalloc.h
36redis.o: redis.c fmacros.h ae.h sds.h anet.h dict.h adlist.h zmalloc.h lzf.h pqsort.h config.h
37sds.o: sds.c sds.h zmalloc.h
38zmalloc.o: zmalloc.c config.h
ed9b544e 39
40redis-server: $(OBJ)
41 $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
42 @echo ""
43 @echo "Hint: To run the test-redis.tcl script is a good idea."
44 @echo "Launch the redis server with ./redis-server, then in another"
45 @echo "terminal window enter this directory and run 'make test'."
46 @echo ""
47
48redis-benchmark: $(BENCHOBJ)
49 $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ)
50
51redis-cli: $(CLIOBJ)
52 $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ)
53
54.c.o:
325d1eb4 55 $(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $<
ed9b544e 56
57clean:
58 rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o
59
60dep:
61 $(CC) -MM *.c
62
63test:
64 tclsh test-redis.tcl
65
66bench:
67 ./redis-benchmark
378fd421 68
69log:
70 git log '--pretty=format:%ad %s' --date=short > Changelog
fd8ccf44 71
7232bit:
73 make ARCH="-arch i386"