forked from mrpi/redis-cplusplus-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (40 loc) · 1.82 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Redis C++ Client Library Makefile
VPATH = tests
#CFLAGS?= -pedantic -O2 -Wall -DNEBUG -W
CFLAGS?= -pedantic -O0 -W -DDEBUG -g
CC = g++
CLIENTOBJS = anet.o
LIBNAME = libredisclient.a
TESTAPP = test_client
TESTAPPOBJS = test_client.o test_lists.o test_sets.o test_zsets.o test_hashes.o test_cluster.o test_distributed_strings.o test_distributed_ints.o test_distributed_mutexes.o test_generic.o benchmark.o functions.o
TESTAPPLIBS = $(LIBNAME) -lstdc++ -lpthread -lboost_thread-mt
all: $(LIBNAME) $(TESTAPP)
$(LIBNAME): $(CLIENTOBJS)
ar rcs $(LIBNAME) $(CLIENTOBJS)
.c.o:
$(CC) -c $(CFLAGS) $<
.cpp.o:
$(CC) -c $(CFLAGS) $<
$(TESTAPP): $(LIBNAME) $(TESTAPPOBJS)
$(CC) -o $(TESTAPP) $(TESTAPPOBJS) $(TESTAPPLIBS)
test: $(TESTAPP)
@./test_client
check: test
clean:
rm -rf $(LIBNAME) *.o $(TESTAPP)
dep:
$(CC) -MM *.c *.cpp
log:
git log '--pretty=format:%ad %s' --date=short > Changelog
anet.o: anet.c fmacros.h anet.h
test_client.o: redisclient.h test_client.cpp tests/functions.h
test_lists.o: redisclient.h tests/test_lists.cpp tests/functions.h
test_sets.o: redisclient.h tests/test_sets.cpp tests/functions.h
test_zsets.o: redisclient.h tests/test_zsets.cpp tests/functions.h
test_hashes.o: redisclient.h tests/test_hashes.cpp tests/functions.h
test_cluster.o: redisclient.h tests/test_cluster.cpp tests/functions.h
test_distributed_strings.o: redisclient.h tests/test_distributed_strings.cpp tests/functions.h
test_distributed_ints.o: redisclient.h tests/test_distributed_ints.cpp tests/functions.h
test_distributed_mutexes.o: redisclient.h tests/test_distributed_mutexes.cpp tests/functions.h
test_generic.o: redisclient.h tests/test_generic.cpp
benchmark.o: redisclient.h tests/benchmark.cpp tests/functions.h