NAR Properties

Below are the properties by group for the NAR plugin. The properties with the [arch.[os.[linker.]] prefix can either be set in general, architecture specific, architecture-os specific or architecture-os-linker specific. The latter overruling the former ones. The defaults for these combiations are listed in two separate tables below.

Command Line Flags

Flag Description
maven -Dverbose Output NAR debug stetements
maven -X Output maven debug statements

General

Property Description Default Value
freehep.nar.arch Architecture [arch] (ex: x86, i386, sparc, ...) ${os.arch}
freehep.nar.os Operating System [os] (ex: Linux, win32, MacOSX, SunOs, ...) ${os.name} (Note: no spaces)
[arch.[os.]]freehep.nar.linker Linker [linker] (ex: msvc, g++, CC, ...), but you may use any name here and override it in the property arch.os.linker.freehep.nar.linker to the real linker name. Architecture-OS specific, see below.

Architecture/OS Independent Settings

Property Description Default Value
freehep.nar.src Source file directory src/main/cpp
freehep.nar.cpp.src.includes C++ file pattern to include **/*.h **/*.hh **/*.cc **/*.cpp **/*.cxx
freehep.nar.cpp.src.excludes C++ file pattern to exclude
freehep.nar.c.src.includes C file pattern to include **/*.h **/*.c
freehep.nar.c.src.excludes C file pattern to exclude
freehep.nar.fortran.src.includes Fortran file pattern to include **/*.f **/*.for
freehep.nar.fortran.src.excludes Fortran file pattern to exclude
freehep.nar.test.src Test source file directory src/test/cpp
freehep.nar.compile.includepath Include path for compilation src/main/include
freehep.nar.compile.sysincludepath System include path for compilation
freehep.nar.compile.withjava Adds the Java Virtual Machine include files for compilation false (automatic if the nar:jni goal is run and headers are generated)
freehep.nar.test.compile.includepath Include path for compilation of tests src/test/include
freehep.nar.link.withjava Enables the linking with the Java Virtual Machine ${freehep.nar.compile.withjava}
freehep.nar.jni.classpath Classpath to add for nar:jni goal
freehep.nar.tests List of test (executables) to be generated
freehep.nar.includefilesonly Generates only common NAR file. Machine-OS specific NAR file will not be made. false
freehep.nar.aol Architecture-OS-Linker [aol] name, used for naming the machine specific NAR and used for the destination directory arch-os-linker
freehep.nar.dest Output directory ${maven.build.dir}/nar
freehep.nar.test.dest Test output directory ${maven.build.dir}/test-nar

Compilers and Linkers

Property Description Default Value
[arch.[os.[linker.]freehep.nar.cpp.compiler C++ Compiler Architecture-OS-Linker specific, see below
[arch.[os.[linker.]freehep.nar.c.compiler C Compiler Architecture-OS-Linker specific, see below
[arch.[os.[linker.]freehep.nar.fortran.compiler Fortran Compiler Architecture-OS-Linker specific, see below
arch.os.linker.freehep.nar.linker Real linker name Architecture-OS-Linker specific, see below

Unified Compiler and Linker Options

Property Description Default Value
[arch.[os.[linker.]freehep.nar.rtti Enable Runtime Type Identification true
[arch.[os.[linker.]freehep.nar.exceptions Enable Exception Handling true
[arch.[os.[linker.]freehep.nar.runtime Use static or dynamic runtime library dynamic
[arch.[os.[linker.]freehep.nar.optmize Set optimization level none
[arch.[os.[linker.]freehep.nar.multithreaded Enable multithreading false
[arch.[os.[linker.]freehep.nar.incremental Enable incremental linking false
[arch.[os.[linker.]freehep.nar.failonerror Abort if an error is detected true
[arch.[os.[linker.]freehep.nar.libtool Use libtool to compile and link false
[arch.[os.[linker.]freehep.nar.debug Generate debugging code false
[arch.[os.[linker.]freehep.nar.outtype Type of library to be generated (use "jni" for native shareable code with java) static
[arch.[os.[linker.]freehep.nar.test.outtype Type of test output to be generated executable

Additional Compiler and Linker Options

Property Description Default Value
[arch.[os.[linker.]freehep.nar.compiler.arg.start|mid|end Space delimited list of optional compiler arguments. start|mid|end specifies the position in the compiler argument list.
[arch.[os.[linker.]freehep.nar.cpp.compiler.arg.start|mid|end Space delimited list of optional cpp compiler arguments. start|mid|end specifies the position in the compiler argument list.
[arch.[os.[linker.]freehep.nar.c.compiler.arg.start|mid|end Space delimited list of optional c compiler arguments. start|mid|end specifies the position in the compiler argument list.
[arch.[os.[linker.]freehep.nar.fortran.compiler.arg.start|mid|end Space delimited list of optional fortran compiler arguments. start|mid|end specifies the position in the compiler argument list.
[arch.[os.[linker.]freehep.nar.linker.arg.start|mid|end Space delimited list of optional linker arguments. start|mid|end specifies the position in the linker argument list.
[arch.[os.[linker.]freehep.nar.linker.test.arg.start|mid|end Space delimited list of optional linker arguments for creating the test output. start|mid|end specifies the position in the linker argument list.

Java Settings

Property Description Default Value
[arch.[os.[linker.]freehep.nar.java.home Java Home (jdk) ${java.home}/..
[arch.[os.[linker.]freehep.nar.java.include Directory to look for include files for jni ${freehep.nar.java.home}/include
[arch.[os.[linker.]freehep.nar.java.include.os OS specific directory to look for include files for jni Architecture-OS-Linker specific, see below
[arch.[os.[linker.]freehep.nar.java.vm Location to the jvm Architecture-OS-Linker specific, see below

File Prefixes, Suffixes and Extensions

Property Description Default Value
[arch.[os.[linker.]freehep.nar.lib.prefix Prefix for library name Architecture-OS-Linker specific, see below
[arch.[os.[linker.]freehep.nar.static.extension Extension for static library Architecture-OS-Linker specific, see below
[arch.[os.[linker.]freehep.nar.shared.extension Extension for shared library Architecture-OS-Linker specific, see below
[arch.[os.[linker.]freehep.nar.plugin.extension Extension for plugin library Architecture-OS-Linker specific, see below
[arch.[os.[linker.]freehep.nar.executable.extension Extension for executable output Architecture-OS-Linker specific, see below

Extra Libraries (please use nar dependencies rather than these)

Property Description Default Value
freehep.nar.libs.type Type for libraries static
freehep.nar.libs List of library modules to link against [X]
freehep.nar.lib.X.libs List of library names to link against X
freehep.nar.lib.X.dir Directory where to look for X ${freehep.nar.dest}/lib
freehep.nar.lib.X.type Type of library X ${freehep.nar.libs.type}

NAR packaging

[arch.[os.[linker.]freehep.nar.arch.includes Include these files and libraries in the arch specific nar file Architecture-OS-Linker specific, see below

Default values for Architecture and Operating System specific properties

Below are the defaults for the architecture and os specific properties. Each of the property names is prefixed with the arch.os name as given in the different columns.

Property x86.win32 i386.Linux amd64.Linux ppc.MacOSX sparc.SunOS
freehep.nar.linker msvc g++ g++ g++ CC
freehep.nar.java.home ${java.home}
freehep.nar.java.include.os prefixed with freehep.nar.java.home include/win32 include/linux include/linux include/solaris
freehep.nar.java.vm prefixed with freehep.nar.java.home lib jre/lib/i386/client jre/lib/amd64/server IGNORED, uses "-framework JavaVM" jre/lib/sparc/server
freehep.nar.multithreaded true
freehep.nar.cpp.compiler msvc g++ g++ g++ CC
freehep.nar.c.compiler msvc gcc gcc gcc suncc
freehep.nar.fortran.compiler df g77 g77 g77 sunf77
freehep.nar.compiler.arg.start -DWIN32 -DLinux -DLinux -DDarwin -lpthread -DSOLARIS2
freehep.nar.linker.arg.start -lpthread
freehep.nar.arch.includes lib/**/*.lib lib/**/*.dll lib/**/*.a lib/**/*.so lib/**/*.a lib/**/*.so lib/**/*.a lib/**/*.so lib/**/*.dylib lib/**/*.jnilib lib/**/*.a lib/**/*.so
freehep.nar.lib.prefix lib lib lib lib
freehep.nar.static.extension .lib .a .a .a .a
freehep.nar.shared.extension .dll .so .so .dylib .so
freehep.nar.plugin.extension .dll .so .so .bundle .so
freehep.nar.executable.extension .exe

Default values for Architecture, Operating System and Linker specific properties

Below are the defaults for the architecture, os and linker specific properties. Each of the property names is prefixed with the arch.os.linker name as given in the different columns.

Property x86.win32.g++ i386.Linux.icc i386.Linux.ecc
freehep.nar.cpp.compiler g++ icpc ecpc
freehep.nar.c.compiler gcc icc ecc
freehep.nar.fortran.compiler g77 ifort ifort (should this be efc?)