]>
Commit | Line | Data |
---|---|---|
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 | 5 | DEBUG?= -g -rdynamic -ggdb |
942a3961 | 6 | CFLAGS?= -std=c99 -O2 -pedantic -Wall -W |
fd8ccf44 | 7 | CCOPT= $(CFLAGS) $(ARCH) |
ed9b544e | 8 | |
5f5b9840 | 9 | OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o |
ed9b544e | 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) | |
9e9c0ce1 | 20 | adlist.o: adlist.c adlist.h zmalloc.h |
21 | ae.o: ae.c ae.h zmalloc.h | |
22 | anet.o: anet.c fmacros.h anet.h | |
23 | benchmark.o: benchmark.c fmacros.h ae.h anet.h sds.h adlist.h zmalloc.h | |
24 | dict.o: dict.c fmacros.h dict.h zmalloc.h | |
25 | lzf_c.o: lzf_c.c lzfP.h | |
26 | lzf_d.o: lzf_d.c lzfP.h | |
27 | pqsort.o: pqsort.c | |
28 | redis-cli.o: redis-cli.c fmacros.h anet.h sds.h adlist.h zmalloc.h | |
29 | redis.o: redis.c fmacros.h ae.h sds.h anet.h dict.h adlist.h zmalloc.h lzf.h pqsort.h config.h | |
30 | sds.o: sds.c sds.h zmalloc.h | |
31 | zmalloc.o: zmalloc.c config.h | |
ed9b544e | 32 | |
33 | redis-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 | ||
41 | redis-benchmark: $(BENCHOBJ) | |
42 | $(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ) | |
43 | ||
44 | redis-cli: $(CLIOBJ) | |
45 | $(CC) -o $(CLIPRGNAME) $(CCOPT) $(DEBUG) $(CLIOBJ) | |
46 | ||
47 | .c.o: | |
48 | $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $< | |
49 | ||
50 | clean: | |
51 | rm -rf $(PRGNAME) $(BENCHPRGNAME) $(CLIPRGNAME) *.o | |
52 | ||
53 | dep: | |
54 | $(CC) -MM *.c | |
55 | ||
56 | test: | |
57 | tclsh test-redis.tcl | |
58 | ||
59 | bench: | |
60 | ./redis-benchmark | |
378fd421 | 61 | |
62 | log: | |
63 | git log '--pretty=format:%ad %s' --date=short > Changelog | |
fd8ccf44 | 64 | |
65 | 32bit: | |
66 | make ARCH="-arch i386" |