Makefile revision 4670cafe
1cd139dc7SShuo ChenCXXFLAGS=-g -Wall -rdynamic -march=native 24886147bSShuo ChenCXXFLAGS+=-O2 3cd139dc7SShuo Chen 40d2d6577SShuo ChenHEADERS=$(wildcard *.h) 5cd139dc7SShuo ChenTESTS= atomic_unittest \ 6cd139dc7SShuo Chen blockingqueue_test \ 79d9bda4cSShuo Chen boundedblockingqueue_test \ 82d3b4de6SShuo Chen copyonwrite_test \ 950da4f87SShuo Chen exception_test \ 1050da4f87SShuo Chen fork_test \ 11cd139dc7SShuo Chen singleton_test \ 12cd139dc7SShuo Chen singleton_threadlocal_test \ 13cd139dc7SShuo Chen threadlocal_test \ 14cd139dc7SShuo Chen threadlocalsingleton_test \ 15cd139dc7SShuo Chen thread_test \ 16d3811de4SShuo Chen threadpool_test \ 17d3811de4SShuo Chen exit_deadlock \ 18d3811de4SShuo Chen mutual_deadlock \ 192d3b4de6SShuo Chen nonrecursivemutex_test \ 202d3b4de6SShuo Chen requestinventory_test \ 212d3b4de6SShuo Chen requestinventory_test2 \ 22a0e66be7SShuo Chen self_deadlock \ 234670cafeSShuo Chen weakcallback_test \ 244670cafeSShuo Chen signalslot_test 25cd139dc7SShuo Chen 26cd139dc7SShuo Chenall: $(TESTS) 27cd139dc7SShuo Chen 280d2d6577SShuo Chen$(TESTS): $(HEADERS) 290d2d6577SShuo Chen 300d2d6577SShuo Chen$(TESTS): 310d2d6577SShuo Chen g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) -lpthread 320d2d6577SShuo Chen 33cd139dc7SShuo Chenatomic_unittest: test/Atomic_unittest.cc 34cd139dc7SShuo Chen 35b24dfd25SShuo Chenblockingqueue_test: test/BlockingQueue_test.cc Thread.cc 36cd139dc7SShuo Chen 37b24dfd25SShuo Chenboundedblockingqueue_test: test/BoundedBlockingQueue_test.cc Thread.cc 389d9bda4cSShuo Chen 392d3b4de6SShuo Chencopyonwrite_test: test/CopyOnWrite_test.cc Thread.cc 402d3b4de6SShuo Chen 41d3811de4SShuo Chenexit_deadlock: test/ExitDeadLock.cc Thread.cc 42d3811de4SShuo Chen 43d3811de4SShuo Chenmutual_deadlock: test/MutualDeadLock.cc Thread.cc 44d3811de4SShuo Chen 452d3b4de6SShuo Chennonrecursivemutex_test: test/NonRecursiveMutex_test.cc Thread.cc 462d3b4de6SShuo Chen 472d3b4de6SShuo Chenrequestinventory_test: test/RequestInventory_test.cc Thread.cc 482d3b4de6SShuo Chenrequestinventory_test2: test/RequestInventory_test2.cc Thread.cc 492d3b4de6SShuo Chen 50d3811de4SShuo Chenself_deadlock: test/SelfDeadLock.cc Thread.cc 5162574298SShuo Chen 52cd139dc7SShuo Chenexception_test: test/Exception_test.cc Exception.cc 53cd139dc7SShuo Chen 5450da4f87SShuo Chenfork_test: test/Fork_test.cc Thread.cc 5550da4f87SShuo Chen 56cd139dc7SShuo Chensingleton_test: test/Singleton_test.cc Thread.cc 572d3b4de6SShuo Chensingleton_test: CXXFLAGS += -ftemplate-depth-1000 58cd139dc7SShuo Chen 59cd139dc7SShuo Chensingleton_threadlocal_test: test/SingletonThreadLocal_test.cc Thread.cc 60cd139dc7SShuo Chen 61cd139dc7SShuo Chenthread_test: test/Thread_test.cc Thread.cc 62cd139dc7SShuo Chen 63cd139dc7SShuo Chenthreadlocal_test: test/ThreadLocal_test.cc Thread.cc 64cd139dc7SShuo Chen 65cd139dc7SShuo Chenthreadlocalsingleton_test: test/ThreadLocalSingleton_test.cc Thread.cc 66cd139dc7SShuo Chen 67b24dfd25SShuo Chenthreadpool_test: test/ThreadPool_test.cc Thread.cc ThreadPool.cc Exception.cc 68cd139dc7SShuo Chen 69a0e66be7SShuo Chenweakcallback_test: test/WeakCallback_test.cc 70a0e66be7SShuo Chenweakcallback_test: CXXFLAGS += -Wextra --std=c++0x -DBOOST_TEST_DYN_LINK -lboost_unit_test_framework 71a0e66be7SShuo Chen 724670cafeSShuo Chensignalslot_test: test/SignalSlot_test.cc 734670cafeSShuo Chensignalslot_test: CXXFLAGS += -Wextra --std=c++0x -DBOOST_TEST_DYN_LINK -lboost_unit_test_framework 744670cafeSShuo Chen 75cd139dc7SShuo Chenclean: 76cd139dc7SShuo Chen rm -f $(TESTS) 77