ROOT_DIR=..

#now include the inc files of all subdirectories
include TIMERS/Makefile.inc
include METRICS/Makefile.inc

SRC_GOSSIP = vrt.cc vrtEntry.cc \
	connectivityAgent.cc controlAgent.cc dataAgent.cc \
	gossipAgent.cc  gossipHost.cc leaveAgent.cc \
	neighborTable.cc partitionAgent.cc \
	partitionAgentQueue.cc performanceAgent.cc performanceAgentMetric.cc \
	pokeAgent.cc pokeMgr.cc rttEstimationAgent.cc sourceEntry.cc \
	bwLevelMgr.cc physicalDelay.cc physicalBW.cc path.cc \
	childList.cc global.cc payLoad.cc query.cc performanceHistory.cc \
	smallProbe.cc smallProbeSender.cc smallProbeReceiver.cc \
	overheadStat.cc gossipPayLoad.cc

SRC_GOSSIP_TOTAL= $(SRC_GOSSIP) $(addprefix TIMERS/,$(SRC_TIMERS)) \
	$(addprefix METRICS/,$(SRC_METRICS))

OBJ_GOSSIP_TOTAL=$(SRC_GOSSIP_TOTAL:.cc=.o)

libGossip.a: $(OBJ_GOSSIP_TOTAL)

#Do a make in each subdirectory and then make the library
all: doTIMERS doMETRICS libGossip.a

doTIMERS:
	$(MAKE) -C TIMERS all

doMETRICS:
	$(MAKE) -C METRICS all

#Clean this directory and then clean all subdirectories.
clean: cleandir
	$(MAKE) -C TIMERS clean
	$(MAKE) -C METRICS clean

include $(ROOT_DIR)/Makefile.rules

