Skip to content

fhilg/omnetpp-federate

 
 

Repository files navigation

These build instructions relate to the source code version of MOSAIC. To build the omnet-federate from the binary version of MOSAIC follow the manual that guides you to the installation using omnet_installer.sh from the MOSAIC distribution. When using the installer all dependencies but omnetpp, inet and premake itself have to be manually resolved too.

Dependencies

The omnetpp-federate has the following dependencies:

  1. dev-libs/protobuf
  2. dev-libs/protobuf[test]? ( dev-cpp/gtest )
  3. net-misc/inet
  4. net-misc/omnetpp

Building omnetpp-federate introduces new dependencies:

  • dev-util/premake and dev-util/premake-autoconf

The source code and binary tar balls for Windows, Linux and Mac OS X of premake are available at https://premake.github.io/download.html. When you choose the binary version then the tar ball extracts just one single binary called premake5 for direct use. Please keep in mind that premake is written as a c-binding to a modified variant of lua that is statically linked in. The currently (premake5-alpha12) linked in lua version is 5.3 which should be considered when placing extensions of premake.

The building of premake5 from source for linux is strait forward and is done with GNU make.

~$ make -f Bootstrap.mak linux
~# cp bin/release/premake5 /usr/local/bin

The second dependency premake5-autoconf can be downloaded from https://github.com/Blizzard/premake-autoconf.git. It consists of a flat directory of lua files. These can be directly placed in the omnet-federate build directory or in a directory your premake5 can find it. Usually it will show the search directories that is looking into for modules when a module was not found, i.e. /usr/local/share/lua/5.3/. The premake5-autoconf module introduces 1. support for autoconf style checks for headers and libraries and 2. full clang support.

Ubuntu 16.04 xenial users can use a package from "PPA for Paul McEnery", see https://launchpad.net/~pmcenery/+archive/ubuntu/ppa/+packages?field.name_filter=premake&field.status_filter=published&field.series_filter=.

Build from MOSAIC source

~$ premake5 gmake
~$ make config=debug clean # config=release
~$ make config=debug # config=release

Some source file are generated by the OMNeT++ message compiler or the protobuf compiler. To regenerate these files pass the options --generate-opp-messages and/or --generate-protobuf. The regeneration is done during make.

Install from MOSAIC source

To trigger the install target pass --install to premake5 and run make as super user.

~$ premake5 gmake --install
~# make config=debug clean
~# make config=debug

Run

To run omnetpp-federate with NED files specify the NED root source folder:

~$ /usr/bin/omnetpp-federate -n /usr/share/ned omnetpp.ini

Otherwise, if there are multiple directories then you can specify the NED source directories by setting the environment variable NEDPATH.

~$ export NEDPATH="/usr/include/inet:/usr/share/ned"
~$ /usr/bin/omnetpp-federate

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 93.3%
  • Lua 6.7%