Makefile revision 4886147b
1cd139dc7SShuo ChenCXXFLAGS=-g -Wall -rdynamic -march=native 24886147bSShuo ChenCXXFLAGS+=-O2 3cd139dc7SShuo Chen 4cd139dc7SShuo ChenTESTS= atomic_unittest \ 5cd139dc7SShuo Chen exception_test \ 6cd139dc7SShuo Chen blockingqueue_test \ 7cd139dc7SShuo Chen singleton_test \ 8cd139dc7SShuo Chen singleton_threadlocal_test \ 9cd139dc7SShuo Chen threadlocal_test \ 10cd139dc7SShuo Chen threadlocalsingleton_test \ 11cd139dc7SShuo Chen thread_test \ 12cd139dc7SShuo Chen threadpool_test 13cd139dc7SShuo Chen 14cd139dc7SShuo Chenall: $(TESTS) 15cd139dc7SShuo Chen 16cd139dc7SShuo Chenatomic_unittest: test/Atomic_unittest.cc 17cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ 18cd139dc7SShuo Chen 19cd139dc7SShuo Chenblockingqueue_test: test/BlockingQueue_test.cc CountDownLatch.cc Thread.cc 20cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ -lpthread 21cd139dc7SShuo Chen 22cd139dc7SShuo Chenexception_test: test/Exception_test.cc Exception.cc 23cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ 24cd139dc7SShuo Chen 25cd139dc7SShuo Chensingleton_test: test/Singleton_test.cc Thread.cc 26cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ -lpthread 27cd139dc7SShuo Chen 28cd139dc7SShuo Chensingleton_threadlocal_test: test/SingletonThreadLocal_test.cc Thread.cc 29cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ -lpthread 30cd139dc7SShuo Chen 31cd139dc7SShuo Chenthread_test: test/Thread_test.cc Thread.cc 32cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ -lpthread 33cd139dc7SShuo Chen 34cd139dc7SShuo Chenthreadlocal_test: test/ThreadLocal_test.cc Thread.cc 35cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ -lpthread 36cd139dc7SShuo Chen 37cd139dc7SShuo Chenthreadlocalsingleton_test: test/ThreadLocalSingleton_test.cc Thread.cc 38cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ -lpthread 39cd139dc7SShuo Chen 40cd139dc7SShuo Chenthreadpool_test: test/ThreadPool_test.cc Thread.cc ThreadPool.cc CountDownLatch.cc Exception.cc 41cd139dc7SShuo Chen g++ $(CXXFLAGS) -o $@ $^ -lpthread 42cd139dc7SShuo Chen 43cd139dc7SShuo Chenclean: 44cd139dc7SShuo Chen rm -f $(TESTS) 45