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