-
Notifications
You must be signed in to change notification settings - Fork 935
/
Makefile
84 lines (59 loc) · 2.33 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
CXXFLAGS=-g -Wall -I /usr/local/include
CXXFLAGS+=-O2
HEADERS=$(wildcard *.h)
TESTS= atomic_unittest \
blockingqueue_test \
boundedblockingqueue_test \
copyonwrite_test \
exception_test \
fork_test \
singleton_test \
singleton_threadlocal_test \
threadlocal_test \
threadlocalsingleton_test \
thread_bench \
thread_test \
threadpool_test \
exit_deadlock \
mutual_deadlock \
nonrecursivemutex_test \
requestinventory_test \
requestinventory_test2 \
self_deadlock \
weakcallback_test \
signalslot_test \
waiter_test
all: $(TESTS)
$(TESTS): $(HEADERS)
$(TESTS):
$(CXX) $(CXXFLAGS) -o $@ $(filter %.cc,$^) $(LDFLAGS) -lpthread
atomic_unittest: test/Atomic_unittest.cc
blockingqueue_test: test/BlockingQueue_test.cc Thread.cc
boundedblockingqueue_test: test/BoundedBlockingQueue_test.cc Thread.cc
copyonwrite_test: test/CopyOnWrite_test.cc Thread.cc
exit_deadlock: test/ExitDeadLock.cc Thread.cc
mutual_deadlock: test/MutualDeadLock.cc Thread.cc
nonrecursivemutex_test: test/NonRecursiveMutex_test.cc Thread.cc
requestinventory_test: test/RequestInventory_test.cc Thread.cc
requestinventory_test2: test/RequestInventory_test2.cc Thread.cc
self_deadlock: test/SelfDeadLock.cc Thread.cc
exception_test: test/Exception_test.cc Exception.cc
fork_test: test/Fork_test.cc Thread.cc
singleton_test: test/Singleton_test.cc Thread.cc
singleton_test: CXXFLAGS += -ftemplate-depth-1000
singleton_threadlocal_test: test/SingletonThreadLocal_test.cc Thread.cc
thread_test: test/Thread_test.cc Thread.cc
thread_bench: test/Thread_bench.cc Thread.cc ../datetime/Timestamp.cc
threadlocal_test: test/ThreadLocal_test.cc Thread.cc
threadlocalsingleton_test: test/ThreadLocalSingleton_test.cc Thread.cc
threadpool_test: test/ThreadPool_test.cc Thread.cc ThreadPool.cc Exception.cc
weakcallback_test: test/WeakCallback_test.cc
weakcallback_test: CXXFLAGS += -Wextra --std=c++0x -DBOOST_TEST_DYN_LINK
weakcallback_test: LDFLAGS += -lboost_unit_test_framework
signalslot_test: test/SignalSlot_test.cc Thread.cc
signalslot_test: CXXFLAGS += -Wextra --std=c++0x -DBOOST_TEST_DYN_LINK
signalslot_test: LDFLAGS += -lboost_unit_test_framework
waiter_test: test/Waiter_test.cc Thread.cc
waiter_test: CXXFLAGS += --std=c++0x
clean:
rm -f $(TESTS)