]> git.saurik.com Git - redis.git/blame - client-libraries/cpp/Makefile
ignore gcc warning about write() return code not checked. It is esplicitily this...
[redis.git] / client-libraries / cpp / Makefile
CommitLineData
57172ffb 1# Redis C++ Client Library Makefile
2
3#CFLAGS?= -pedantic -O2 -Wall -W -DNDEBUG
4CFLAGS?= -pedantic -O0 -W -DDEBUG -g
5CC = g++
6
7CLIENTOBJS = anet.o redisclient.o
8LIBNAME = libredisclient.a
9
10TESTAPP = test_client
11TESTAPPOBJS = test_client.o
12TESTAPPLIBS = $(LIBNAME) -lstdc++
13
14all: $(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
28test: $(TESTAPP)
29 @./test_client
30
31check: test
32
33clean:
34 rm -rf $(LIBNAME) *.o $(TESTAPP)
35
36dep:
37 $(CC) -MM *.c *.cpp
38
39log:
40 git log '--pretty=format:%ad %s' --date=short > Changelog
41
42anet.o: anet.c fmacros.h anet.h
43redisclient.o: redisclient.cpp redisclient.h anet.h
44