includedir = ${prefix}/include/zthread
SUBDIRS=.

## header files
ZTHREAD_HDRS = \
AbstractExecutor.h   Worker.h \
AsyncExecutor.h      FastMutex.h                 RWLock.h \
AutoPtr.h            FastRecursiveMutex.h        RecursiveMutex.h \
Barrier.h            Guard.h                     Semaphore.h \
BiasedRWLock.h       Latch.h                     SharedInstance.h \
BlockingQueue.h      Lockable.h                  Singleton.h \
BufferedQueue.h      LockedQueue.h               SynchronizationExceptions.h\
Cancelable.h         SyncExecutor.h 		 PlainMutex.h \
CheckedMutex.h       MonitoredQueue.h            Thread.h \
Condition.h          Mutex.h                     ThreadLocal.h \
AbstractThreadLocal.h InheritableThreadLocal.h   FastThreadLocal.h \
CountingSemaphore.h  POSIX_FastMutex.h           WIN32_FastMutex.h \
POSIX_FastRecursiveMutex.h  WIN32_FastRecursiveMutex.h \
Executor.h           PoolExecutor.h              ZThread.h \
FairRWLock.h         Queue.h                     Timer.h \
SimpleQueue.h        NullMutex.h                 Observable.h \
Factory.h            TimerThread.h	



## install the headers
install-data-local:
	@$(mkinstalldirs) $(DESTDIR)$(includedir); \
	for f in $(ZTHREAD_HDRS); do \
		if test -f $(top_srcdir)/include/zthread/$$f; then \
			p=$(top_srcdir)/include/zthread/$$f; \
			$(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/$$f; \
		fi; \
	done

## install the headers
uninstall-local:
	@for f in $(ZTHREAD_HDRS); do \
		if test -f $(top_srcdir)/include/zthread/$$f; then \
			p=$(DESTDIR)$(includedir)/$$f; \
			if test -f $$p; then rm -f $$p; fi; \
		fi; \
	done; \
	rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir) 

## include the zthread dir in the dist
dist-hook:
	cp -dpR $(top_srcdir)/include/zthread $(distdir)
