The FreeHEP libraries consist of 2 parts: The Java Libraries, and the Native Libraries. The latter are wrappers to, for instance, legacy Fortran code and to hook up the FreeHEP Java libraries to C++. In most cases one would only need to build the Java Libraries.
To build the FreeHEP Java libraries you have to use ANT, which comes as part of the checked out CVS tree. The build of FreeHEP was tested on WindowsXP/2000/NT, Linux and Solaris, using the Java Development Kit 1.4 or later.
Execute the following 5 steps:
Step | Unix (Linux/Solaris) example | Windows (2000/NT) example |
---|---|---|
1 |
setenv JDK_HOME /usr/local/jdk-1.4.0 |
set JDK_HOME=D:\jdk-1.4.0 |
2 |
setenv PATH /bin: |
set PATH=%JDK_HOME%\bin;%PATH% |
3 |
setenv FREEHEP /home/duns/freehep |
set FREEHEP=D:\home\duns\freehep |
4 |
cd /home/duns/freehep |
cd D:\home\duns\freehep |
5 |
tools/ant |
tools\ant |
You may want to add FREEHEP/tools to your PATH, and try also the following commands:
Command | Description |
---|---|
ant help |
shows usage of ANT for FreeHEP |
ant -projecthelp |
lists all available targets |
ant -Djar=base |
builds only the jar file with name "freehep-base" |
To build the FreeHEP Native libraries you have to use gmake, which comes for Windows as part of the checked out CVS tree and is normally part of Unix/MacOSX (use make) systems.
You further need a C/C++ compiler and if you want to link with CERNLIB the Fortran compile-time libraries.
We assume you have already set up your environment for compiling the Java libraries.
Now execute the following 4 steps:
Step | Unix (Linux/Solaris/MacOS X) example | Windows (XP/2000/NT) example |
---|---|---|
1 |
setenv OS Linux | Solaris | Darwin |
normally already set to Windows... |
2 |
normally already set to /cern/pro |
set CERN_ROOT=D:\cern\pro |
3 |
cd /home/duns/freehep |
cd D:\home\duns\freehep |
4 |
gmake make (on MacOS X) |
gmake |
Steps 2 may be omitted, in which case parts of the FreeHEP native libraries will not be compiled.