mosesdecoder/Jamroot
2011-11-23 11:29:42 +00:00

97 lines
2.7 KiB
Plaintext

#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 = "<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 : : <link>shared ;
} else {
lib z ;
}
trace = [ option.get "notrace" : <define>TRACE_ENABLE=1 ] ;
project : default-build
<threading>multi
<warnings>on
<debug-symbols>on
<variant>release
<link>static
;
project : requirements
<threading>multi:<define>WITH_THREADS
<threading>multi:<library>boost_thread
<define>_FILE_OFFSET_BITS=64 <define>_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
: <location>$(install-location) <install-type>EXE <install-dependencies>on <link>shared:<dll-path>$(install-location) <link>shared:<install-type>LIB ;