###########################################################################
-# Load utilities and setup libraries
+def updateRevision(target, source, env):
+ rev = env['ENV']['REVISION'][1:]
+ if ':' in rev:
+ print
+ print "Working copy not clean. Run 'svn update'"
+ print
+ return 1
+ if 'm' in rev and not ARGUMENTS.get('force_deb'):
+ print
+ print "Working copy contains local changes. Commit first"
+ print
+ return 1
+ if 's' in rev:
+ rev = rev[:-1]
+ if 'm' in rev:
+ rev = rev[:-1]
+ changelog = file('debian/changelog.template').read() % {
+ 'rev': rev,
+ 'user': pwd.getpwuid(os.getuid()).pw_gecos.split(',')[0].strip(),
+ 'date': time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) }
+ file('debian/changelog','w').write(changelog)
+
+
+###########################################################################
+# Load utilities and setup libraries and configure build
+
SENFSCons.UseBoost()
SENFSCons.UseSTLPort()
env = SENFSCons.MakeEnvironment()
else:
rev = 'r' + os.popen("svnversion").read().strip().lower()
-# Configure build
env.Append(
CPPPATH = [ '#' ],
LIBS = [ 'iberty', '$BOOSTREGEXLIB' ],
Export('env')
-# Build modules (that is, instruct to build ... the build happens later)
+# Create Doxyfile.local if not cleaning and the file does not exist
+# otherwise doxygen will barf on this non-existent file
+if not env.GetOption('clean') and not os.path.exists("Doxyfile.local"):
+ Execute(Touch("Doxyfile.local"))
+
+###########################################################################
+# Define build targets
+
SConscript(glob.glob("*/SConscript"))
SENFSCons.StandardTargets(env)
SENFSCons.GlobalTargets(env)
SENFSCons.Doxygen(env)
-
SENFSCons.DoxyXRef(env,
HTML_HEADER = '#/doclib/doxy-header-overview.html',
HTML_FOOTER = '#/doclib/doxy-footer.html')
-def updateRevision(target, source, env):
- rev = env['ENV']['REVISION'][1:]
- if ':' in rev:
- print
- print "Working copy not clean. Run 'svn update'"
- print
- return 1
- if 'm' in rev and not ARGUMENTS.get('force_deb'):
- print
- print "Working copy contains local changes. Commit first"
- print
- return 1
- if 's' in rev:
- rev = rev[:-1]
- if 'm' in rev:
- rev = rev[:-1]
- changelog = file('debian/changelog.template').read() % {
- 'rev': rev,
- 'user': pwd.getpwuid(os.getuid()).pw_gecos.split(',')[0].strip(),
- 'date': time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) }
- file('debian/changelog','w').write(changelog)
+# Build combined library 'libsenf'
+libsenf = env.Library(
+ SENFSCons.LibPath('senf'),
+ Flatten([ env.File(SENFSCons.LibPath(lib)).sources for lib in env['ALLLIBS'] ]))
+env.Default(libsenf)
+env.Alias('install_all', env.Install('$LIBINSTALLDIR', libsenf))
-if not os.environ.get('debian_build'):
- env.AlwaysBuild(
- env.Alias('deb', [], [ updateRevision,
- "dpkg-buildpackage -us -uc -rfakeroot -I.svn" ]))
+env.AlwaysBuild(
+ env.Alias('deb', [], [ updateRevision,
+ "dpkg-buildpackage -us -uc -rfakeroot -I.svn" ]))
- env.AlwaysBuild(
- env.Alias('debsrc', [], [ updateRevision,
- "dpkg-buildpackage -us -uc -rfakeroot -S -I.svn" ]))
+env.AlwaysBuild(
+ env.Alias('debsrc', [], [ updateRevision,
+ "dpkg-buildpackage -us -uc -rfakeroot -S -I.svn" ]))
- env.AlwaysBuild(
- env.Alias('debbin', [], [ updateRevision,
- "dpkg-buildpackage -us -uc -rfakeroot -nc" ]))
-
-# Create Doxyfile.local if not cleaning and the file does not exist
-# otherwise doxygen will barf on this non-existent file
-if not env.GetOption('clean') and not os.path.exists("Doxyfile.local"):
- Execute(Touch("Doxyfile.local"))
+env.AlwaysBuild(
+ env.Alias('debbin', [], [ updateRevision,
+ "dpkg-buildpackage -us -uc -rfakeroot -nc" ]))
Standards-Version: 3.7.2
Section: libs
-Package: libsenf-ppi-dev
+Package: libsenf-dev
Section: libdevel
Architecture: any
-Depends: libsenf-scheduler-dev (= ${Source-Version}), libsenf-packets-dev (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: SENF Extensible Network Framework, Packet Processing Infrastructure
- The SENF Simple and Extensible Network Framework aims to be a
- complete set of libraries to facilitate the development of network
- applications focusing on network protocols on the layers below the
- application layer. However, the framework includes many general
- purpose utilities and will be expedient to use well beyond its primary
- objective.
-
-Package: libsenf-packets-dev
-Section: libdevel
-Architecture: any
-Depends: libsenf-socket-dev (= ${Source-Version}), libsenf-utils-dev (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: SENF Extensible Network Framework, Packets library
- The SENF Simple and Extensible Network Framework aims to be a
- complete set of libraries to facilitate the development of network
- applications focusing on network protocols on the layers below the
- application layer. However, the framework includes many general
- purpose utilities and will be expedient to use well beyond its primary
- objective.
-
-Package: libsenf-scheduler-dev
-Section: libdevel
-Architecture: any
-Depends: libsenf-socket-dev (= ${Source-Version}), libsenf-utils-dev (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: SENF Extensible Network Framework, Scheduler, development files
- The SENF Simple and Extensible Network Framework aims to be a
- complete set of libraries to facilitate the development of network
- applications focusing on network protocols on the layers below the
- application layer. However, the framework includes many general
- purpose utilities and will be expedient to use well beyond its primary
- objective.
-
-Package: libsenf-socket-dev
-Section: libdevel
-Architecture: any
-Depends: libsenf-utils-dev (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: SENF Extensible Network Framework, Socket library, development files
- The SENF Simple and Extensible Network Framework aims to be a
- complete set of libraries to facilitate the development of network
- applications focusing on network protocols on the layers below the
- application layer. However, the framework includes many general
- purpose utilities and will be expedient to use well beyond its primary
- objective.
-
-Package: libsenf-utils-dev
-Section: libdevel
-Architecture: any
-Depends: binutils-dev, libboost-dev, libboost-regex-dev, libboost-date-time-dev, libboost-thread-dev, ${shlibs:Depends}, ${misc:Depends}
-Description: SENF Extensible Network Framework, Utilities, development files
+Depends: binutils-dev, libboost-dev, libboost-regex-dev, libboost-date-time-dev, libboost-thread-dev
+Description: SENF Extensible Network Framework, development files
The SENF Simple and Extensible Network Framework aims to be a
complete set of libraries to facilitate the development of network
applications focusing on network protocols on the layers below the
--- /dev/null
+debian/tmp/usr/lib/libsenf.a
+debian/tmp/usr/lib/*.o usr/lib/senf-packets
+debian/tmp/usr/include
+debian/README usr/share/doc/libsenf-dev
+++ /dev/null
-debian/tmp/usr/lib/libPackets.a
-debian/tmp/usr/lib/libPackets_*.a
-debian/tmp/usr/lib/*.o usr/lib/Packets
-debian/tmp/usr/include/Packets
-debian/README usr/share/doc/libsenf-packets-dev
+++ /dev/null
-debian/tmp/usr/lib/libPPI.a
-debian/tmp/usr/include/PPI
-debian/README usr/share/doc/libsenf-ppi-dev
+++ /dev/null
-debian/tmp/usr/lib/libScheduler.a
-debian/tmp/usr/include/Scheduler
-debian/README usr/share/doc/libsenf-scheduler-dev
+++ /dev/null
-debian/tmp/usr/lib/libSocket.a
-debian/tmp/usr/include/Socket
-debian/README usr/share/doc/libsenf-socket-dev
+++ /dev/null
-debian/tmp/usr/lib/libUtils.a
-debian/tmp/usr/include/Utils
-debian/README usr/share/doc/libsenf-utils-dev
LINKFLAGS = [ '-g' ])
env.Append(CPPDEFINES = [ '$EXTRA_DEFINES' ],
- LIBS = [ '$EXTRA_LIBS' ])
+ LIBS = [ '$EXTRA_LIBS' ],
+ ALLLIBS = [])
return env