#MOSES BUILD OPTIONS
#
#Language models
#--with-irstlm=/path/to/irstlm
#--with-srilm=/path/to/srilm
#--with-randlm=/path/to/randlm
#KenLM is always compiled.
#
#--with-xmlrpc-c=/path/to/xmlrpc-c for libxmlrpc-c (used by server)
#Note that, like language models, this is the --prefix where the library was
#installed, not some executable within the library.
#
#--notrace compiles without TRACE macros
#
#--install=/path/to/install sets the install directory (default dist)
#
# By default, the build is multi-threaded, optimized, and statically linked.
# Pass these to change the build:
#
# threading=single|multi controls threading (default multi)
#
# variant=release|debug|profile builds optimized (default), for debug, or for
# profiling
#
# link=static|shared controls linking (default static)
#
# debug-symbols=on|off include (default) or exclude debugging
# information also known as -g
#
#
#Controlling the build process:
#-a to build from scratch
#-j$NCPUS to compile in parallel
#--clean to clean
#Other compilers might work, but this stops bjam from whining.
#using gcc ;
path-constant TOP : . ;
import option ;
import boost ;
boost.use-project ;
#If boost static libraries are not installed, use dynamic linking.
if [ SHELL $(TOP)"/jam-files/test.sh -static -lboost_program_options" ] != 0 {
force-boost-link = "shared" ;
}
#Convenience rule for boost libraries. Defines library boost_$(name).
rule boost_lib ( name ) {
alias boost_$(name) : /boost//$(name) : $(force-boost-link) ;
}
boost_lib thread ;
boost_lib program_options ;
boost_lib unit_test_framework ;
#Dynamic libz if we have to.
if [ SHELL $(TOP)"/jam-files/test.sh -static -lz" ] != 0 {
lib z : : shared ;
} else {
lib z ;
}
trace = [ option.get "notrace" : TRACE_ENABLE=1 ] ;
project : default-build
multi
on
on
release
static
;
project : requirements
multi:WITH_THREADS
multi:boost_thread
_FILE_OFFSET_BITS=64 _LARGE_FILES
$(trace)
;
#Add directories here if you want their incidental targets too (i.e. tests).
build-project lm ;
build-project util ;
#Trigger instllation into legacy paths.
build-project moses-cmd/src ;
build-project moses-chart-cmd/src ;
install-location = [ option.get "install" : $(TOP)/dist ] ;
install dist :
lm//query
lm//build_binary
moses-chart-cmd/src//moses_chart
moses-cmd/src//programs
CreateOnDisk/src//CreateOnDisk
mert//programs
server//mosesserver
misc//programs
: $(install-location) EXE on shared:$(install-location) shared:LIB ;