Makefile revision 2d3b4de6
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 \ 22d3811de4SShuo Chen self_deadlock 23cd139dc7SShuo Chen 24cd139dc7SShuo Chenall: $(TESTS) 25cd139dc7SShuo Chen 260d2d6577SShuo Chen$(TESTS): $(HEADERS) 270d2d6577SShuo Chen 280d2d6577SShuo Chen$(TESTS): 290d2d6577SShuo Chen g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) -lpthread 300d2d6577SShuo Chen 31cd139dc7SShuo Chenatomic_unittest: test/Atomic_unittest.cc 32cd139dc7SShuo Chen 33b24dfd25SShuo Chenblockingqueue_test: test/BlockingQueue_test.cc Thread.cc 34cd139dc7SShuo Chen 35b24dfd25SShuo Chenboundedblockingqueue_test: test/BoundedBlockingQueue_test.cc Thread.cc 369d9bda4cSShuo Chen 372d3b4de6SShuo Chencopyonwrite_test: test/CopyOnWrite_test.cc Thread.cc 382d3b4de6SShuo Chen 39d3811de4SShuo Chenexit_deadlock: test/ExitDeadLock.cc Thread.cc 40d3811de4SShuo Chen 41d3811de4SShuo Chenmutual_deadlock: test/MutualDeadLock.cc Thread.cc 42d3811de4SShuo Chen 432d3b4de6SShuo Chennonrecursivemutex_test: test/NonRecursiveMutex_test.cc Thread.cc 442d3b4de6SShuo Chen 452d3b4de6SShuo Chenrequestinventory_test: test/RequestInventory_test.cc Thread.cc 462d3b4de6SShuo Chenrequestinventory_test2: test/RequestInventory_test2.cc Thread.cc 472d3b4de6SShuo Chen 48d3811de4SShuo Chenself_deadlock: test/SelfDeadLock.cc Thread.cc 4962574298SShuo Chen 50cd139dc7SShuo Chenexception_test: test/Exception_test.cc Exception.cc 51cd139dc7SShuo Chen 5250da4f87SShuo Chenfork_test: test/Fork_test.cc Thread.cc 5350da4f87SShuo Chen 54cd139dc7SShuo Chensingleton_test: test/Singleton_test.cc Thread.cc 552d3b4de6SShuo Chensingleton_test: CXXFLAGS += -ftemplate-depth-1000 56cd139dc7SShuo Chen 57cd139dc7SShuo Chensingleton_threadlocal_test: test/SingletonThreadLocal_test.cc Thread.cc 58cd139dc7SShuo Chen 59cd139dc7SShuo Chenthread_test: test/Thread_test.cc Thread.cc 60cd139dc7SShuo Chen 61cd139dc7SShuo Chenthreadlocal_test: test/ThreadLocal_test.cc Thread.cc 62cd139dc7SShuo Chen 63cd139dc7SShuo Chenthreadlocalsingleton_test: test/ThreadLocalSingleton_test.cc Thread.cc 64cd139dc7SShuo Chen 65b24dfd25SShuo Chenthreadpool_test: test/ThreadPool_test.cc Thread.cc ThreadPool.cc Exception.cc 66cd139dc7SShuo Chen 67cd139dc7SShuo Chenclean: 68cd139dc7SShuo Chen rm -f $(TESTS) 69