#
# $XORP: xorp/fea/Jamfile,v 1.25 2007/12/28 05:12:34 pavlin Exp $
#

SubDir TOP fea ;
SubIncludeOnce TOP libxorp ;
SubIncludeOnce TOP libcomm ;
SubIncludeOnce TOP xrl interfaces ;
SubIncludeOnce TOP xrl targets ;
SubIncludeOnce TOP libxipc ;
SubIncludeOnce TOP libproto ;
SubIncludeOnce TOP libfeaclient ;
SubIncludeOnce TOP mrt ;
SubIncludeOnce TOP cli ;
SubIncludeOnce TOP cli libtecla ;
SubIncludeOnce TOP fea data_plane ;
SubDir TOP fea ;

Library libfea_data_plane_base :
	fea_data_plane_manager.cc
	fibconfig_forwarding.cc
	ifconfig_property.cc
	io_ip.cc
	io_link.cc
	io_tcpudp.cc
	;

Library libfea : 
	fea_io.cc
	fea_node.cc
	fibconfig.cc
	fibconfig_transaction.cc
	ifconfig.cc
	ifconfig_reporter.cc
	ifconfig_transaction.cc
	iftree.cc
	io_ip_manager.cc
	io_link_manager.cc
	io_tcpudp_manager.cc
	libfeaclient_bridge.cc
	mfea_config.cc
	mfea_dataflow.cc
	mfea_mrouter.cc
	mfea_node.cc
	mfea_node_cli.cc
	mfea_vif.cc
	nexthop_port_mapper.cc
	pa_backend_dummy.cc
	pa_backend_ipfw2.cc
	pa_entry.cc
	pa_table.cc
	pa_transaction.cc
	profile_vars.cc
	xrl_packet_acl.cc
	xrl_fea_io.cc
	xrl_fea_node.cc
	xrl_fea_target.cc
	xrl_fib_client_manager.cc
	xrl_io_ip_manager.cc
	xrl_io_link_manager.cc
	xrl_io_tcpudp_manager.cc
	xrl_mfea_node.cc
	;

FEA_LDADD =
	libfea
	libxorp_data_plane_managers
	libxorp_fibconfig
	libxorp_ifconfig
	libxorp_io
	libxorp_control_socket
	libfea_data_plane_base
	libfeafibclientxif
	libfearawlinkclientxif
	libfearawpkt4clientxif
	libfearawpkt6clientxif
	libsocket4userxif
	libsocket6userxif
	libfindereventnotifierxif
	libfeabase
	libclimanagerxif
	libmfeaclientxif
	libmfeabase
	libmrt
	libcli
	libtecla
	libcliprocessorxif
	libclibase
	libfeaclient
	libfeaifmgrmirrorxif
	libpacketaclbase
	libprofileclientxif
	libproto
	libxipc
	libcomm
	libxorp
	;

Main xorp_fea : xorp_fea.cc ;
LINKLIBS on xorp_fea = $(LINKLIBS) $(PCAP_LIB) ;
LinkLibraries xorp_fea : $(FEA_LDADD) ;

#
# Hack to build dummy FEA in Jam in a hopefully portable way.
#
# XXX: MainFromObjects supplies the SUFEXE suffix if and only if
# the filename is not explicitly gristed. Here, it has to be.
#
MainFromObjects <fea>xorp_fea_dummy$(SUFEXE) : <fea>fea_dummy$(SUFOBJ) ;
LINKLIBS on <fea>xorp_fea_dummy$(SUFEXE) = $(LINKLIBS) $(PCAP_LIB) ;
LinkLibraries <fea>xorp_fea_dummy$(SUFEXE) : $(FEA_LDADD) ;
Object <fea>fea_dummy$(SUFOBJ) : xorp_fea.cc ;
C++FLAGS on <fea>fea_dummy$(SUFOBJ) += -DFEA_DUMMY ;

if $(MAKE_CHECK) {

 Main test_xrl_sockets4_udp : test_xrl_sockets4_udp.cc ;
 LinkLibraries test_xrl_sockets4_udp :
	libfea
	libxorp_data_plane_managers
	libxorp_fibconfig
	libxorp_ifconfig
	libxorp_control_socket
	libfea_data_plane_base
	libsocket4xif
	libsocket6xif
	libsocket4userxif
	libsocket6userxif
	libtestsocket4
	libxipc
	libcomm
	libxorp
	;

 Main test_xrl_sockets4_tcp : test_xrl_sockets4_tcp.cc ;
 LinkLibraries test_xrl_sockets4_tcp :
	libfea
	libxorp_data_plane_managers
	libxorp_fibconfig
	libxorp_ifconfig
	libxorp_control_socket
	libfea_data_plane_base
	libsocket4xif
	libsocket6xif
	libsocket4userxif
	libsocket6userxif
	libtestsocket4
	libxipc
	libcomm
	libxorp
	;
} # MAKE_CHECK

InstallBin $(PREFIX)/fea :
	xorp_fea xorp_fea_click_config_generator xorp_fea_dummy ;

SubIncludeOnce TOP fea tools ;
