I have OLSR building now. Haven't actually tested it out in the SVN
tree, but this is a good first step at least.
I can't get the tools to compile either...but hopefully they aren't
critical.
I also created an SConscript file for olsr/tools, but it doesn't
actually compile. Might be worth adding as a place-holder though.
To build:
scons enable_olsr=yes
Thanks,
Ben
--
Ben Greear <[email protected]>
Candela Technologies Inc http://www.candelatech.com
diff --git a/SConscript b/SConscript
index 7eef942..489b46b 100644
--- a/SConscript
+++ b/SConscript
@@ -45,4 +45,8 @@ subdirs = [
'bgp',
]
+if env['WITH_OLSR']:
+ subdirs.append('contrib/olsr')
+
+
SConscript(dirs = subdirs, exports='env')
diff --git a/SConstruct b/SConstruct
index 8e7291a..5011ad4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -42,6 +42,7 @@ Help("""
Default is "obj/<arch>-<os>-<rel>".
prefix=<some path> to specify a different install directory.
Default is "/usr/local/xorp".
+ enable_olsr=true if you want to build OLSR.
""")
import sys
@@ -61,6 +62,7 @@ vars.AddVariables(
BoolVariable('debug_msg', 'Build with debug messages', False),
BoolVariable('debug_fn', 'Build with function names in debug_msg output',
False),
BoolVariable('debug_cb', 'Build with callback debugging', False),
+ BoolVariable('enable_olsr', 'Build OLSR', False),
)
build_arch = os.uname()[4].lower()
@@ -132,6 +134,10 @@ print 'Debug messages: ', env['debug_msg']
print 'Debug function names: ', env['debug_fn']
print 'Debug callbacks: ', env['debug_cb']
+env['WITH_OLSR'] = ARGUMENTS.get('enable_olsr', False)
+print 'Enable OLSR: ', env['enable_olsr']
+
+
env['CONFIGURELOG'] = str(builddir) + os.sep + 'config.log'
env['CONFIGUREDIR'] = str(builddir) + os.sep + '.sconf_temp'
@@ -212,10 +218,9 @@ env['mandir'] = ARGUMENTS.get('mandir', '$datarootdir/man')
env['XORP_SOURCEDIR'] = sourcedir
env['XORP_BUILDDIR'] = builddir
-# turnoff bgp, olsr for now.
-# XXX bgp is always built, olsr never built.
+# XXX bgp is always built
env['WITH_BGP'] = ARGUMENTS.get('enable-bgp', False)
-env['WITH_OLSR'] = ARGUMENTS.get('enable-olsr', False)
+
########## start configure magic
diff --git a/contrib/olsr/SConscript b/contrib/olsr/SConscript
index 5a007f7..25e37ff 100644
--- a/contrib/olsr/SConscript
+++ b/contrib/olsr/SConscript
@@ -36,21 +36,22 @@ env.AppendUnique(CPPPATH = [
])
env.AppendUnique(LIBPATH = [
- '../libxorp',
- '../libcomm',
- '../libxipc',
- '../libproto',
- '../libfeaclient',
- '../policy/backend',
- '../policy/common',
- '../xrl/interfaces',
- '../xrl/targets',
- '../mrt',
+ '../../libxorp',
+ '../../libcomm',
+ '../../libxipc',
+ '../../libproto',
+ '../../libfeaclient',
+ '../../policy/backend',
+ '../../policy/common',
+ '../../xrl/interfaces',
+ '../../xrl/targets',
+ '../../mrt',
'.'
])
env.AppendUnique(LIBS = [
'olsr',
+ 'olsrxrl',
'olsr4base',
'policybackend',
'policycommon',
@@ -59,6 +60,7 @@ env.AppendUnique(LIBS = [
'findereventnotifierxif',
'feaifmgrmirrorxif',
'feaifmgrreplicatorxif',
+ 'libsocket4xif',
'profileclientxif',
'fearawpkt4xif',
'fearawpkt6xif',
@@ -87,7 +89,6 @@ libolsrsrcs = [
'twohop.cc',
]
-
if is_shared:
libolsr = env.SharedLibrary(target = 'libolsr', source = libolsrsrcs, LIBS
= '')
env.Alias('install',
@@ -117,11 +118,11 @@ olsr4srcs = [
'xorp_olsr.cc',
]
-olsr4 = env.Program(target = 'xorp_olsr4', source = olsr4srcs)
-# XXX not ready for prime time.
+olsr4 = env.Program(target = 'xorp_olsr4', source = olsr4srcs)
+olsrpath = '$exec_prefix/contrib/olsr'
env.Alias('install',
- env.InstallProgram('$bindir', olsr4))
+ env.InstallProgram(olsrpath, olsr4))
Default(libolsr, libolsrxrl, olsr4)
# Copyright (c) 2009 XORP, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, Version 2, June
# 1991 as published by the Free Software Foundation. Redistribution
# and/or modification of this program under the terms of any other
# version of the GNU General Public License is not permitted.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
# see the GNU General Public License, Version 2, a copy of which can be
# found in the XORP LICENSE.gpl file.
#
# XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
# http://xorp.net
# $XORP$
import os
Import('env')
env = env.Clone()
is_shared = env.has_key('SHAREDLIBS')
env.AppendUnique(CPPPATH = [
'#',
'../..',
'../../..',
'$BUILDDIR',
])
env.AppendUnique(LIBPATH = [
'../../../libxorp',
'../../../libcomm',
'../../../libxipc',
'../../../libproto',
'../../../xrl/interfaces',
'../../../xrl/targets',
'.',
])
env.AppendUnique(LIBS = [
'xipc',
'xorp',
'proto',
'comm',
])
cleardbsrcs = [
'clear_database.cc'
]
printdbsrcs = [
'print_databases.cc',
]
cleardb = env.Program(target = 'clear_database', source = cleardbsrcs)
printdb = env.Program(target = 'print_databases', source = printdbsrcs)
olsrtoolpath = '$exec_prefix/contrib/olsr/tools'
env.Alias('install',
env.InstallProgram(olsrtoolpath, cleardb))
env.Alias('install',
env.InstallProgram(olsrtoolpath, printdb))
# This won't compile, can't find olsr4_xif.hh file, not sure what is supposed to
# create it --Ben
#Default(cleardb, printdb)
Default()
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers