Makefile revision 62574298
1CXXFLAGS=-g -Wall -rdynamic -march=native 2CXXFLAGS+=-O2 3 4HEADERS=$(wildcard *.h) 5TESTS= atomic_unittest \ 6 blockingqueue_test \ 7 exception_test \ 8 fork_test \ 9 singleton_test \ 10 singleton_threadlocal_test \ 11 threadlocal_test \ 12 threadlocalsingleton_test \ 13 thread_test \ 14 threadpool_test 15 16all: $(TESTS) 17 18$(TESTS): $(HEADERS) 19 20$(TESTS): 21 g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) -lpthread 22 23atomic_unittest: test/Atomic_unittest.cc 24 25blockingqueue_test: test/BlockingQueue_test.cc CountDownLatch.cc Thread.cc 26 27exit_deadlock: test/ExitDeadLock.cc 28 g++ $(CXXFLAGS) -o $@ $(filter %.cc,$^) -lpthread 29 30exception_test: test/Exception_test.cc Exception.cc 31 32fork_test: test/Fork_test.cc Thread.cc 33 34singleton_test: test/Singleton_test.cc Thread.cc 35 36singleton_threadlocal_test: test/SingletonThreadLocal_test.cc Thread.cc 37 38thread_test: test/Thread_test.cc Thread.cc 39 40threadlocal_test: test/ThreadLocal_test.cc Thread.cc 41 42threadlocalsingleton_test: test/ThreadLocalSingleton_test.cc Thread.cc 43 44threadpool_test: test/ThreadPool_test.cc Thread.cc ThreadPool.cc CountDownLatch.cc Exception.cc 45 46clean: 47 rm -f $(TESTS) 48