#######################################################################
# Author: UGUR CETINTEMEL                     
#######################################################################
#                                                                     #
# Deno stuff
#                                                                     #
#######################################################################
 
CC    =	/usr/bin/g++
LIB   =	-lm -lpthread ## -lc_r
TIMER =	timersun.o

INCLUDEDIR = /home/ugur/Port

CFLAGS =  -DCPP -DGPP -D_REENTRANT -I$(INCLUDEDIR) -c

VPATH = /home/ugur/Port/h

OBJECTS = Deno.o util.o item.o rv.o netutil.o message.o log.o \
	 servermgr.o network.o   display.o \
	 stats.o synchmgr.o  transaction.o \
	 transmgr.o vote.o votemgr.o securitymgr.o

deno:	$(OBJECTS)
	${CC} -o $@  $(OBJECTS)	 ${LIB}

analyse: analyse.o
	${CC} -o $@  analyse.o

analyse.o: StdAfx.h analyse.h \
	analyse.cpp 
	${CC} -c -g analyse.cpp  

Deno.o:	StdAfx.h deno.h rv.h display.h servermgr.h \
	Deno.cpp
	${CC} ${CFLAGS} Deno.cpp

util.o:	StdAfx.h util.h \
	util.cpp
	${CC} ${CFLAGS} util.cpp

item.o:	StdAfx.h util.h item.h \
	item.cpp
	${CC} ${CFLAGS} item.cpp

netutil.o: StdAfx.h netutil.h network.h \
	netutil.cpp
	${CC} ${CFLAGS} netutil.cpp

message.o: StdAfx.h message.h \
	message.cpp
	${CC} ${CFLAGS} message.cpp

network.o: StdAfx.h network.h servermgr.h deno.h display.h netutil.h stats.h \
	network.cpp
	${CC} ${CFLAGS} network.cpp

rv.o:	StdAfx.h rv.h \
	rv.cpp
	${CC} ${CFLAGS} rv.cpp

servermgr.o:	servermgr.h \
	servermgr.cpp
	${CC} ${CFLAGS} servermgr.cpp

stats.o: StdAfx.h stats.h util.h display.h \
	stats.cpp
	${CC} ${CFLAGS} stats.cpp

synchmgr.o: StdAfx.h synchmgr.h display.h util.h servermgr.h stats.h \
	message.h deno.h vote.h network.h transaction.h log.h \
	rv.h transmgr.h \
	synchmgr.cpp
	${CC} ${CFLAGS} synchmgr.cpp

transaction.o: StdAfx.h	transaction.h item.h util.h display.h \
	transaction.cpp
	${CC} ${CFLAGS} transaction.cpp

transmgr.o: StdAfx.h transmgr.h transaction.h item.h util.h log.h \
	votemgr.h stats.h rv.h display.h synchmgr.h stats.h \
	transmgr.cpp
	${CC} ${CFLAGS} transmgr.cpp

vote.o:	StdAfx.h vote.h util.h \
	vote.cpp
	${CC} ${CFLAGS} vote.cpp

votemgr.o: StdAfx.h votemgr.h display.h synchmgr.h transmgr.h deno.h \
	message.h util.h log.h transaction.h vote.h network.h \
	votemgr.cpp
	${CC} ${CFLAGS} votemgr.cpp

securitymgr.o:	StdAfx.h securitymgr.h display.h synchmgr.h transmgr.h deno.h \
		securitymgr.cpp
		${CC} ${CFLAGS} securitymgr.cpp

display.o: StdAfx.h display.h transaction.h vote.h log.h message.h \
	stats.h util.h \
	display.cpp
	${CC} ${CFLAGS} display.cpp

log.o:	StdAfx.h log.h item.h transaction.h display.h util.h \
	log.cpp
	${CC} ${CFLAGS} log.cpp

clean:	
	\rm -f *.o core deno

tar:	
	tar cvf DenoPort.tar makefile *.cpp *.h

backup: 
	tar cvf DenoPort.tar makefile *.cpp *.h \
	gzip DenoPort.tar;





