Skip to content

Latest commit

 

History

History
161 lines (121 loc) · 5.76 KB

INSTALL.md

File metadata and controls

161 lines (121 loc) · 5.76 KB

Build Instructions

This project contains both the original Maven pom.xml files and the new Makefile and associated build.mk files.

This document describe how to use GNU make to build the release package.

NOTE: Building the documentation and running the tests are unsupported -- use Maven for that.

Required Dependencies

To compile the code, a number of JARs are required to be available in the libs subdirectory:

Create the libs directory under the main directory -- where the file you are reading is located -- and copy all the above-mentioned JARs into it (you may organize them into a hierachy of subdirectories, if you feel like). Different versions from the ones shown above may or may not work -- for example, jreadline-0.20 won't.

NOTE: apache-log4j-extras-1.2.17.jar is optional -- you may skip it if you don't need Apache log4j Extras' features.

Optional Dependencies

The Mobicents jSS7 support both Digium and Dialogic E1/T1 boards.

To enable support for them, the following drivers/libraries must be installed:

Again, different versions from the ones listed above may or may not work.

NOTE: Digium support has been tested on real hardware, whereas Dialogic support was not.

Incremental Compilation

If the jdeps utility from OpenJDK 1.8 is available, incremental compilation will be automatically enabled. The benefit of incremental compilation is that when one or more (re)source file is modified, only the minimum required class/jar/whatever is rebuilt. This is highly desirable while developing the source code.

However, should it be necessary (e.g., to spare you a few seconds if you intend to compile the source only once), you may disable it creating a file named localdefs.mk in the main directory -- where the Makefile is located -- containing the following text:

HAVE_JDEPS = false

Alternatively, you may specify it in the make command line, e.g.:

make HAVE_JDEPS=false

Native Libraries

For people may be interested only in the M3UA (SIGTRAN) transport layer and for support for Digium and Dialogic cards requires additional drivers/libraries, the support for Digium/Dialogic hardware is disabled by default.

To enable it, create the file localdefs.mk (as described above) and add to it:

ENABLE_DAHDI = true

to enable support for Digium cards, and/or:

ENABLE_DIALOGIC = true

to enable support for Dialogic cards.

Alternatively, you may add them to the make command line, e.g.:

make ENABLE_DAHDI=true ENABLE_DIALOGIC=true package

If the Digium/Dialogic drivers are installed system-wide, the compiler should be able to find the required include files and libraries.

Should it fail, try adding the CPPFLAGS and LDFLAGS variables to the make command line, e.g.:

make "CPPFLAGS=-I/path/to/dpk/INC -I/path/to/dahdi/include"
     "LDFLAGS=-L/path/to/dpk/lib64 -L/path/to/dahdi/lib" package

Building

To build everything, run:

make package

This will build an archive named something like mobicents-ss7-2.1.0.FINAL-p1.tar.gz inside the packages directory.

To compile only, run:

make compile

or just:

make

There is no install target, however the archive produced by make package is (almost) identical to the one produced by Maven (except for the documentation), i.e., you can execute the (un)install target provided by the build.xml inside the archive (requires ant).

Other available targets are:

  • jars, to build all the JARs and native libraries
  • clean, to remove all the files generated by make
  • build/classes/some/path/to/package/SomeClass.class, to compile only the specified class (or classes) -- useful to test changes made to SomeClass.java
  • build/resources/some-jarname/path/to/resource/ResourceName, to process the specified resource file -- useful to verify the result of filtering

Every other target is for internal use only and should not be invoked directly.