#
#  ***********************************************************************
#  *                         Makefile                                    *
#  * POSIX Synchronous                                                   *
#  *                                                                     *
#  * Author: Arash Partow - 2000                                         *
#  * URL: http://www.partow.net/programming/posixsynchwrapper/index.html *
#  *                                                                     *
#  * Copyright Notice:                                                   *
#  * Free use of this library is permitted under the guidelines and      *
#  * in accordance with the most current version of the Common Public    *
#  * License.                                                            *
#  * http://www.opensource.org/licenses/cpl.php                          *
#  *                                                                     *
#  ***********************************************************************
#


CC               = -c++
OPTIONS          = -pedantic -ansi -Wall -o
OPTIONS_LIBS     = -pedantic -ansi -Wall -c
LIBS             = -lpthread

CPP_SRC = POSIXThread.cpp \
	POSIXMutex.cpp \
	POSIXScopeMutex.cpp \
	POSIXReadWriteMutex.cpp \
	POSIXCondition.cpp \
	POSIXSynchronousException.cpp \
	POSIXSynchronousEvent.cpp \
	Utils.cpp


OBJECTS = $(CPP_SRC:.cpp=.o)


%.o: %.h %.cpp
	$(CC) $(OPTIONS_LIBS) $*.cpp


all: $(OBJECTS) MultiConditionTest ThreadJoinTest

MultiConditionTest: $(OBJECTS) Examples/MultiConditionTest.cpp
	$(CC) $(OPTIONS) Examples/MultiConditionTest Examples/MultiConditionTest.cpp $(OBJECTS) $(LIBS)

ThreadJoinTest: $(OBJECTS) Examples/ThreadJoinTest.cpp
	$(CC) $(OPTIONS) Examples/ThreadJoinTest Examples/ThreadJoinTest.cpp $(OBJECTS) $(LIBS)



clean:
	rm -f core *.o *.bak *stackdump *#


#
# The End !
#
