]>
Commit | Line | Data |
---|---|---|
57172ffb | 1 | # Redis C++ Client Library Makefile |
2 | ||
3 | #CFLAGS?= -pedantic -O2 -Wall -W -DNDEBUG | |
4 | CFLAGS?= -pedantic -O0 -W -DDEBUG -g | |
5 | CC = g++ | |
6 | ||
7 | CLIENTOBJS = anet.o redisclient.o | |
8 | LIBNAME = libredisclient.a | |
9 | ||
10 | TESTAPP = test_client | |
11 | TESTAPPOBJS = test_client.o | |
12 | TESTAPPLIBS = $(LIBNAME) -lstdc++ | |
13 | ||
14 | all: $(LIBNAME) $(TESTAPP) | |
15 | ||
16 | $(LIBNAME): $(CLIENTOBJS) | |
17 | ar rcs $(LIBNAME) $(CLIENTOBJS) | |
18 | ||
19 | .c.o: | |
20 | $(CC) -c $(CFLAGS) $< | |
21 | ||
22 | .cpp.o: | |
23 | $(CC) -c $(CFLAGS) $< | |
24 | ||
25 | $(TESTAPP): $(LIBNAME) $(TESTAPPOBJS) | |
26 | $(CC) -o $(TESTAPP) $(TESTAPPOBJS) $(TESTAPPLIBS) | |
27 | ||
28 | test: $(TESTAPP) | |
29 | @./test_client | |
30 | ||
31 | check: test | |
32 | ||
33 | clean: | |
34 | rm -rf $(LIBNAME) *.o $(TESTAPP) | |
35 | ||
36 | dep: | |
37 | $(CC) -MM *.c *.cpp | |
38 | ||
39 | log: | |
40 | git log '--pretty=format:%ad %s' --date=short > Changelog | |
41 | ||
42 | anet.o: anet.c fmacros.h anet.h | |
43 | redisclient.o: redisclient.cpp redisclient.h anet.h | |
44 |