Makefile revision b24dfd25
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 \ 850da4f87SShuo Chen exception_test \ 950da4f87SShuo Chen fork_test \ 10cd139dc7SShuo Chen singleton_test \ 11cd139dc7SShuo Chen singleton_threadlocal_test \ 12cd139dc7SShuo Chen threadlocal_test \ 13cd139dc7SShuo Chen threadlocalsingleton_test \ 14cd139dc7SShuo Chen thread_test \ 15cd139dc7SShuo Chen threadpool_test 16cd139dc7SShuo Chen 17cd139dc7SShuo Chenall: $(TESTS) 18cd139dc7SShuo Chen 190d2d6577SShuo Chen$(TESTS): $(HEADERS) 200d2d6577SShuo Chen 210d2d6577SShuo Chen$(TESTS): 220d2d6577SShuo Chen g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) -lpthread 230d2d6577SShuo Chen 24cd139dc7SShuo Chenatomic_unittest: test/Atomic_unittest.cc 25cd139dc7SShuo Chen 26b24dfd25SShuo Chenblockingqueue_test: test/BlockingQueue_test.cc Thread.cc 27cd139dc7SShuo Chen 28b24dfd25SShuo Chenboundedblockingqueue_test: test/BoundedBlockingQueue_test.cc Thread.cc 299d9bda4cSShuo Chen 3062574298SShuo Chenexit_deadlock: test/ExitDeadLock.cc 3162574298SShuo Chen g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) -lpthread 3262574298SShuo Chen 33cd139dc7SShuo Chenexception_test: test/Exception_test.cc Exception.cc 34cd139dc7SShuo Chen 3550da4f87SShuo Chenfork_test: test/Fork_test.cc Thread.cc 3650da4f87SShuo Chen 37cd139dc7SShuo Chensingleton_test: test/Singleton_test.cc Thread.cc 38cd139dc7SShuo Chen 39cd139dc7SShuo Chensingleton_threadlocal_test: test/SingletonThreadLocal_test.cc Thread.cc 40cd139dc7SShuo Chen 41cd139dc7SShuo Chenthread_test: test/Thread_test.cc Thread.cc 42cd139dc7SShuo Chen 43cd139dc7SShuo Chenthreadlocal_test: test/ThreadLocal_test.cc Thread.cc 44cd139dc7SShuo Chen 45cd139dc7SShuo Chenthreadlocalsingleton_test: test/ThreadLocalSingleton_test.cc Thread.cc 46cd139dc7SShuo Chen 47b24dfd25SShuo Chenthreadpool_test: test/ThreadPool_test.cc Thread.cc ThreadPool.cc Exception.cc 48cd139dc7SShuo Chen 49cd139dc7SShuo Chenclean: 50cd139dc7SShuo Chen rm -f $(TESTS) 51