summaryrefslogtreecommitdiff
path: root/SConstruct
blob: dc5497ae49f4d33a8073e37881d48b2077927678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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)