summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Clark <jon.h.clark@gmail.com>2011-03-10 11:26:30 -0500
committerJonathan Clark <jon.h.clark@gmail.com>2011-03-10 11:26:30 -0500
commit70d909f695fdb8207ce251bae9e860c3787d7711 (patch)
tree19b919b419001b8e65be2f04dd0aeb9fa5ef16b6
parent7491d7f72bd50cbc08a28f64cc3939a310d65801 (diff)
use non-terrible build system
-rw-r--r--SConstruct51
1 files changed, 51 insertions, 0 deletions
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)