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.
To compile the code, a number of JARs are required to be available in
the libs
subdirectory:
- java-getopt-1.0.14.jar
- javolution-5.5.1.jar
- jmxtools-1.2.1.jar
- jreadline-0.17.jar
- log4j-1.2.17.zip, the JAR (
log4j-1.2.17.jar
) is inside the ZIP - apache-log4j-extras-1.2.17-bin.tar.gz, the JAR
(
apache-log4j-extras-1.2.17.jar
) is inside the TAR - JBoss AS 5.1.0.GA, copy at least the following JARs from the
jboss-5.1.0.GA/lib
directory:- jboss-common-core.jar
- jboss-dependency.jar
- jboss-j2se.jar
- jboss-kernel.jar
- jboss-logging-spi.jar
- jboss-mdr.jar
- jboss-reflect.jar
- jboss-system.jar
- jboss-system-jmx.jar
- jboss-xml-binding.jar
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.
The Mobicents jSS7 support both Digium and Dialogic E1/T1 boards.
To enable support for them, the following drivers/libraries must be installed:
- for Digium cards, the DAHDI drivers (tested against version 2.9.1 and 2.10.0)
- for Dialogic cards, the DSI Development Package (compiled against version 6.6.1)
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.
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
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
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 librariesclean
, to remove all the files generated by makebuild/classes/some/path/to/package/SomeClass.class
, to compile only the specified class (or classes) -- useful to test changes made to SomeClass.javabuild/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.