ROOT_DIR=..

# hack now for including etb.cc.  should move etb.cc to a common library
# shared between inetProxy and inetDriver  -- yhchu
SRC_PGM = inetProxy.cc ../InetExp/etb.cc listenPort.cc proxyClient.cc rtp.cc streamSelector.cc clientMgr.cc streamSelectorMgr.cc
#SRC_PGM = inetProxy.cc ../InetExp/etb.cc
OBJ_PGM = $(SRC_PGM:.cc=.o)

# somehow in Linux, the order of library include is important
# Internet must percede Gossip
LIB_INTERNET =  -L $(ROOT_DIR)/Internet -lInternet  -L $(ROOT_DIR)/TimerEvents -lEvent -L $(ROOT_DIR)/Tfrc -lTfrc -L $(ROOT_DIR)/Gossip -lGossip -L $(ROOT_DIR)/Util -lUtil 

PGM = proxy

$(PGM):   $(OBJ_PGM) MAKE_INTERNET_LIB
	$(CPP) $(CPPFLAGS) -o $@ $(OBJ_PGM) $(LIB_INTERNET) $(LIB)

inetpurify:   $(OBJ_PGM) MAKE_INTERNET_LIB
	purify $(CPP) $(CPPFLAGS) -o $@ $(OBJ_PGM) $(LIB_INTERNET) $(LIB)

clean: cleandir CLEAN_INTERNET_LIB
	rm -f $(PGM)

include $(ROOT_DIR)/Makefile.rules

