From 4d1587807682769465027358050418323765c9b8 Mon Sep 17 00:00:00 2001 From: Jonathan Clark Date: Thu, 10 Mar 2011 11:26:30 -0500 Subject: use non-terrible build system --- SConstruct | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 SConstruct (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct new file mode 100644 index 00000000..dc5497ae --- /dev/null +++ b/SConstruct @@ -0,0 +1,51 @@ +AddOption('--prefix', + dest='prefix', + type='string', + nargs=1, + action='store', + metavar='DIR', + help='installation prefix') + +AddOption('--with-boost', + dest='boost', + type='string', + nargs=1, + action='store', + metavar='DIR', + help='boost installation directory (if in a non-standard location)') + +platform = ARGUMENTS.get('OS', Platform()) + +srcs = [] +for pattern in ['decoder/*.cc', 'decoder/*.c', 'klm/*/*.cc', 'utils/*.cc', 'mteval/*.cc']: + srcs.extend([ file for file in Glob(pattern) + if not 'test' in str(file) + and 'build_binary.cc' not in str(file) + and 'ngram_query.cc' not in str(file) + and 'mbr_kbest.cc' not in str(file) + and 'sri.cc' not in str(file) + and 'fast_score.cc' not in str(file) + ]) + +include = Split('decoder utils klm mteval .') +libPaths = [] + +boost = GetOption('boost') +if boost: + include.append(boost+'/include') + libPaths.append(boost+'/lib') + +glcDir = None +glcDir = '../GlobalLexicalCoherence' +if glcDir: + include.append(glcDir) + +env = Environment(PREFIX=GetOption('prefix'), + PLATFORM = platform, +# BINDIR = bin, + INCDIR = include, +# LIBDIR = lib, + CPPPATH = [include, '.'], + LIBPATH = libPaths, + LIBS = Split('boost_program_options boost_serialization boost_thread z')) +env.Program(target='decoder/cdec', source=srcs) -- cgit v1.2.3 From 81d3b064bac2a060d515a4175f122551da2aeb77 Mon Sep 17 00:00:00 2001 From: Jonathan Clark Date: Thu, 24 Mar 2011 09:59:58 -0400 Subject: Add some new files to the GLC build --- SConstruct | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index c21d85d5..41c60178 100644 --- a/SConstruct +++ b/SConstruct @@ -29,7 +29,8 @@ env = Environment(PREFIX=GetOption('prefix'), boost = GetOption('boost') if boost: print 'Using Boost at {0}'.format(boost) - env.Append(CPPPATH=boost+'/include', + env.Append(CCFLAGS='-DHAVE_BOOST', + CPPPATH=boost+'/include', LIBPATH=boost+'/lib') if GetOption('efence'): @@ -45,6 +46,8 @@ if glc: env.Append(CCFLAGS='-DHAVE_GLC', CPPPATH=[glc, glc+'/cdec']) srcs.append(glc+'/string_util.cc') + srcs.append(glc+'/sys_util.cc') + srcs.append(glc+'/debug.cc') srcs.append(glc+'/feature-factory.cc') srcs.append(glc+'/cdec/ff_glc.cc') -- cgit v1.2.3