2011-11-21 18:31:10 +04:00
|
|
|
#MOSES BUILD OPTIONS
|
|
|
|
#
|
|
|
|
#Language models
|
|
|
|
#--with-irstlm=/path/to/irstlm
|
|
|
|
#--with-srilm=/path/to/srilm
|
|
|
|
#--with-randlm=/path/to/randlm
|
|
|
|
#KenLM is always compiled.
|
|
|
|
#
|
2011-11-21 21:19:24 +04:00
|
|
|
#--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)
|
|
|
|
#
|
2011-11-23 15:29:42 +04:00
|
|
|
# By default, the build is multi-threaded, optimized, and statically linked.
|
|
|
|
# Pass these to change the build:
|
2011-11-21 18:31:10 +04:00
|
|
|
#
|
2011-11-23 15:29:42 +04:00
|
|
|
# threading=single|multi controls threading (default multi)
|
2011-11-21 18:31:10 +04:00
|
|
|
#
|
2011-11-23 15:29:42 +04:00
|
|
|
# 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:
|
2011-11-21 21:19:24 +04:00
|
|
|
#-a to build from scratch
|
2011-11-21 18:31:10 +04:00
|
|
|
#-j$NCPUS to compile in parallel
|
2011-11-23 15:29:42 +04:00
|
|
|
#--clean to clean
|
2011-11-21 18:31:10 +04:00
|
|
|
|
2011-11-22 03:07:30 +04:00
|
|
|
#Other compilers might work, but this stops bjam from whining.
|
|
|
|
using gcc ;
|
|
|
|
|
2011-11-21 15:42:46 +04:00
|
|
|
path-constant TOP : . ;
|
|
|
|
|
|
|
|
import option ;
|
2011-11-21 21:41:14 +04:00
|
|
|
import boost ;
|
|
|
|
boost.use-project ;
|
2011-11-21 15:42:46 +04:00
|
|
|
#If boost static libraries are not installed, use dynamic linking.
|
2011-11-21 19:09:38 +04:00
|
|
|
if [ SHELL $(TOP)"/jam-files/test.sh -static -lboost_program_options" ] != 0 {
|
2011-11-21 15:42:46 +04:00
|
|
|
force-boost-link = "<link>shared" ;
|
|
|
|
}
|
2011-11-21 18:31:10 +04:00
|
|
|
#Convenience rule for boost libraries. Defines library boost_$(name).
|
2011-11-21 21:41:14 +04:00
|
|
|
rule boost_lib ( name ) {
|
|
|
|
alias boost_$(name) : /boost//$(name) : $(force-boost-link) ;
|
2011-11-21 18:31:10 +04:00
|
|
|
}
|
2011-11-21 21:41:14 +04:00
|
|
|
boost_lib thread ;
|
|
|
|
boost_lib program_options ;
|
|
|
|
boost_lib unit_test_framework ;
|
2011-11-21 15:42:46 +04:00
|
|
|
|
2011-11-21 21:19:24 +04:00
|
|
|
#Dynamic libz if we have to.
|
2011-11-21 19:09:38 +04:00
|
|
|
if [ SHELL $(TOP)"/jam-files/test.sh -static -lz" ] != 0 {
|
|
|
|
lib z : : <link>shared ;
|
|
|
|
} else {
|
|
|
|
lib z ;
|
|
|
|
}
|
|
|
|
|
2011-11-22 22:13:44 +04:00
|
|
|
trace = [ option.get "notrace" : <define>TRACE_ENABLE=1 ] ;
|
2011-11-21 15:42:46 +04:00
|
|
|
|
2011-11-18 18:37:01 +04:00
|
|
|
project : default-build
|
|
|
|
<threading>multi
|
|
|
|
<warnings>on
|
2011-11-22 22:17:31 +04:00
|
|
|
<debug-symbols>on
|
2011-11-18 18:37:01 +04:00
|
|
|
<variant>release
|
|
|
|
<link>static
|
|
|
|
;
|
|
|
|
|
|
|
|
project : requirements
|
|
|
|
<threading>multi:<define>WITH_THREADS
|
|
|
|
<threading>multi:<library>boost_thread
|
2011-11-22 20:06:34 +04:00
|
|
|
<define>_FILE_OFFSET_BITS=64 <define>_LARGE_FILES
|
2011-11-18 20:25:45 +04:00
|
|
|
$(trace)
|
2011-11-18 18:37:01 +04:00
|
|
|
;
|
|
|
|
|
2011-11-21 18:31:10 +04:00
|
|
|
#Add directories here if you want their incidental targets too (i.e. tests).
|
2011-11-18 18:37:01 +04:00
|
|
|
build-project lm ;
|
|
|
|
build-project util ;
|
2011-11-21 22:20:52 +04:00
|
|
|
#Trigger instllation into legacy paths.
|
|
|
|
build-project moses-cmd/src ;
|
|
|
|
build-project moses-chart-cmd/src ;
|
2011-11-18 18:37:01 +04:00
|
|
|
|
2011-11-21 15:42:46 +04:00
|
|
|
install-location = [ option.get "install" : $(TOP)/dist ] ;
|
2011-11-18 18:37:01 +04:00
|
|
|
install dist :
|
|
|
|
lm//query
|
|
|
|
lm//build_binary
|
|
|
|
moses-chart-cmd/src//moses_chart
|
|
|
|
moses-cmd/src//programs
|
|
|
|
CreateOnDisk/src//CreateOnDisk
|
2011-11-18 20:25:45 +04:00
|
|
|
mert//programs
|
2011-11-21 21:19:24 +04:00
|
|
|
server//mosesserver
|
2011-11-21 15:42:46 +04:00
|
|
|
: <location>$(install-location) <install-type>EXE <install-dependencies>on <link>shared:<dll-path>$(install-location) <link>shared:<install-type>LIB ;
|