#
# $XORP: xorp/contrib/olsr/Jamfile,v 1.2 2008/05/15 08:41:24 bms Exp $
#

SubDir TOP contrib olsr ;
SubIncludeOnce TOP libxorp ;
SubIncludeOnce TOP libcomm ;
SubIncludeOnce TOP xrl interfaces ;
SubIncludeOnce TOP xrl targets ;
SubIncludeOnce TOP libxipc ;
SubIncludeOnce TOP libfeaclient ;
SubIncludeOnce TOP libproto ;
SubIncludeOnce TOP policy backend ;
SubIncludeOnce TOP policy common ;
SubDir TOP contrib olsr ;

SAVE_C++FLAGS = $(C++FLAGS) ;

C++FLAGS += -DDEBUG_LOGGING ;
C++FLAGS += -DDEBUG_PRINT_FUNCTION_NAME ;
#C++FLAGS += -DDETAILED_DEBUG ;

Library libolsr :
	external.cc
	face.cc
	face_manager.cc
	link.cc
	message.cc
	neighbor.cc
	neighborhood.cc
	olsr.cc
	olsr_types.cc
	policy_varrw.cc
	#profile_vars.cc
	route_manager.cc
	topology.cc
	twohop.cc
	;

Library libolsrxrl :
	xrl_io.cc
	xrl_queue.cc
	xrl_port.cc
	xrl_target.cc
	;

Library libolsrtest :
	debug_io.cc
	emulate_net.cc
	;

LINKLIBS_OLSR_COMMON =
	libolsr
	libolsr4base
	libpolicybackend
	libpolicycommon
	libfeaclient
	libsocket4xif
	libribxif
	libfindereventnotifierxif
	libfeaifmgrmirrorxif
	libfeaifmgrreplicatorxif
	libprofileclientxif
	libfeaifmgrmirrorbase
	libproto
	libxipc
	libcomm
	libxorp
	;

Main xorp_olsr4 : xorp_olsr.cc ;
LinkLibraries xorp_olsr4 :
	libolsrxrl
	$(LINKLIBS_OLSR_COMMON)
	;

#if $(MAKE_CHECK) {
LINKLIBS_OLSR_TEST =
	libolsrtest
	$(LINKLIBS_OLSR_COMMON)
	;

 # A tool to test the basic Olsr data types.
 Main test_olsr_types : test_olsr_types.cc ;
 LinkLibraries	test_olsr_types : $(LINKLIBS_OLSR_TEST) ;

 # A tool to test the Olsr message classes.
 Main test_message : test_message.cc ;
 LinkLibraries	test_message : $(LINKLIBS_OLSR_TEST) ;

 # Test basic Olsr functionality with 1 and 2 interfaces.
 Main test_faces : test_faces.cc ;
 LinkLibraries	test_faces : $(LINKLIBS_OLSR_TEST) ;

 # A command driven OLSR topology simulator.
 Main test_simulator : test_simulator.cc ;
 LinkLibraries	test_simulator : $(LINKLIBS_OLSR_TEST) ;
#} # MAKE_CHECK

InstallBin $(PREFIX)/olsr : xorp_olsr4 ;

SubIncludeOnce TOP contrib olsr tools ;

C++FLAGS = $(SAVE_C++FLAGS) ;
