INCLUDEPATH	= include
win32-borland:INCLUDEPATH += $(BCB)/include $(BCB)/include/vcl
DEFINES         = REENTRANT ZTHREAD_STATIC NDEBUG
win32:DEFINES   += _WIN32 _LIB WIN32 DISABLE_IO_INTERRUPT
unix:DEFINES    += _POSIX
unix:TMAKE_CXXFLAGS = -fexceptions
unix:LIBS       = -lpthread
TEMPLATE	= lib
DESTDIR         = lib
win32-msvc:TMAKE_CXXFLAGS +=/EHsc
win32-borland:TMAKE_CXXFLAGS += -P -xp -WM
CONFIG          = warn_off release staticlib
VERSION         = 2.0.5

HEADERS		= \
		  include/zthread/AbstractExecutor.h \
		  include/zthread/AbstractThreadLocal.h \
		  include/zthread/AsyncExecutor.h \
		  include/zthread/Barrier.h \
		  include/zthread/BiasedRWLock.h \
		  include/zthread/BlockingQueue.h \
		  include/zthread/BufferedQueue.h \
		  include/zthread/Cancelable.h \
		  include/zthread/Condition.h \
		  include/zthread/Counted.h \
		  include/zthread/CountingSemaphore.h \
		  include/zthread/Executor.h \
		  include/zthread/Factory.h \
		  include/zthread/FairRWLock.h \
		  include/zthread/FastMutex.h \
		  include/zthread/FastRecursiveMutex.h \
		  include/zthread/FastThreadLocal.h \
		  include/zthread/Guard.h \
		  include/zthread/InheritableThreadLocal.h \
		  include/zthread/Latch.h \
		  include/zthread/Lockable.h \
		  include/zthread/LockedQueue.h \
		  include/zthread/MonitoredQueue.h \
		  include/zthread/Mutex.h \
		  include/zthread/NullMutex.h \
		  include/zthread/Observable.h \
		  include/zthread/PoolExecutor.h \
		  include/zthread/Queue.h \
		  include/zthread/RWLock.h \
		  include/zthread/RecursiveMutex.h \
		  include/zthread/Semaphore.h \
		  include/zthread/SharedInstance.h \
		  include/zthread/SimpleQueue.h \
		  include/zthread/Singleton.h \
		  include/zthread/SyncExecutor.h \
		  include/zthread/SynchronizationExceptions.h \
		  include/zthread/Thread.h \
		  include/zthread/ThreadLocal.h \
		  include/zthread/Timer.h \
		  include/zthread/TimerThread.h \
		  include/zthread/Worker.h \
		  include/zthread/ZThread.h \
		  src/State.h \
		  src/Synchronized.h \
		  src/Time.h \
		  src/ValueHolder.h \
		  src/ConditionImpl.h \
		  src/MutexImpl.h \
		  src/SemaphoreImpl.h
		  
win32:HEADERS  += \
		  include/zthread/WIN32_FastMutex.h \
                  include/zthread/WIN32_FastRecursiveMutex.h \
		  src/WIN32_Monitor.h \
		  src/WIN32_ThreadImpl.h \
		  src/WIN32_ThreadLocalImpl.h \
		  src/WIN32_ThreadManager.h \
		  src/StdAfx.h 

unix:HEADERS	+= \
		  src/POSIX_Monitor.h \
		  src/POSIX_ThreadImpl.h \
		  src/POSIX_ThreadLocalImpl.h \
		  src/POSIX_ThreadManager.h \
		  include/zthread/POSIX_FastMutex.h \
		  include/zthread/POSIX_FastRecursiveMutex.h \
		  src/config.h


SOURCES		= \
		  src/AbstractThreadLocal.cxx \
		  src/Condition.cxx \
		  src/ConditionImpl.cxx \
		  src/CountingSemaphore.cxx \
		  src/Mutex.cxx \
		  src/MutexImpl.cxx \
		  src/RWLock.cxx \
		  src/RecursiveMutex.cxx \
		  src/Semaphore.cxx \
		  src/SemaphoreImpl.cxx \
		  src/State.cxx \
		  src/SynchronizationExceptions.cxx \
		  src/Thread.cxx \
		  src/Time.cxx \
		  src/Timer.cxx 

win32:SOURCES  += \
                  src/WIN32_ThreadImpl.cxx \
		  src/WIN32_ThreadLocalImpl.cxx \
		  src/WIN32_ThreadManager.cxx\
		  src/StdAfx.cxx 


unix:SOURCES   += \
		  src/POSIX_FastRecursiveMutex.cc \
		  src/POSIX_ThreadImpl.cc \
		  src/POSIX_ThreadLocalImpl.cc \
		  src/POSIX_ThreadManager.cc 

INTERFACES	=
TARGET = ZThread
