Makefile revision 0d2d6577
1cd139dc7SShuo ChenCXXFLAGS=-g -Wall -rdynamic -march=native 24886147bSShuo ChenCXXFLAGS+=-O2 3cd139dc7SShuo Chen 40d2d6577SShuo ChenHEADERS=$(wildcard *.h) 5cd139dc7SShuo ChenTESTS= atomic_unittest \ 6cd139dc7SShuo Chen exception_test \ 7cd139dc7SShuo Chen blockingqueue_test \ 8cd139dc7SShuo Chen singleton_test \ 9cd139dc7SShuo Chen singleton_threadlocal_test \ 10cd139dc7SShuo Chen threadlocal_test \ 11cd139dc7SShuo Chen threadlocalsingleton_test \ 12cd139dc7SShuo Chen thread_test \ 13cd139dc7SShuo Chen threadpool_test 14cd139dc7SShuo Chen 15cd139dc7SShuo Chenall: $(TESTS) 16cd139dc7SShuo Chen 170d2d6577SShuo Chen$(TESTS): $(HEADERS) 180d2d6577SShuo Chen 190d2d6577SShuo Chen$(TESTS): 200d2d6577SShuo Chen g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) -lpthread 210d2d6577SShuo Chen 22cd139dc7SShuo Chenatomic_unittest: test/Atomic_unittest.cc 23cd139dc7SShuo Chen 24cd139dc7SShuo Chenblockingqueue_test: test/BlockingQueue_test.cc CountDownLatch.cc Thread.cc 25cd139dc7SShuo Chen 26cd139dc7SShuo Chenexception_test: test/Exception_test.cc Exception.cc 27cd139dc7SShuo Chen 28cd139dc7SShuo Chensingleton_test: test/Singleton_test.cc Thread.cc 29cd139dc7SShuo Chen 30cd139dc7SShuo Chensingleton_threadlocal_test: test/SingletonThreadLocal_test.cc Thread.cc 31cd139dc7SShuo Chen 32cd139dc7SShuo Chenthread_test: test/Thread_test.cc Thread.cc 33cd139dc7SShuo Chen 34cd139dc7SShuo Chenthreadlocal_test: test/ThreadLocal_test.cc Thread.cc 35cd139dc7SShuo Chen 36cd139dc7SShuo Chenthreadlocalsingleton_test: test/ThreadLocalSingleton_test.cc Thread.cc 37cd139dc7SShuo Chen 38cd139dc7SShuo Chenthreadpool_test: test/ThreadPool_test.cc Thread.cc ThreadPool.cc CountDownLatch.cc Exception.cc 39cd139dc7SShuo Chen 40cd139dc7SShuo Chenclean: 41cd139dc7SShuo Chen rm -f $(TESTS) 42