# -*-Python-*-

target =  'SearchServer'
       
sources	 =  [
    'SearchServiceImpl.cc',
    'main.cc',
    ]

LIBS = [
    'CV',
    'pthread',
    'RCFProto',
    ]

env = Environment()
proto = env.Command(target = 'Search.pb.cc', 
                    source = [ 'Search.proto' ],
                    action = 'protoc Search.proto --cpp_out=. --python_out=.')
env.AlwaysBuild(proto)

env = Environment(CPPPATH = ['../RCFProto-src-0.9.0.6/cpp/src/',
                             '../RCFProto-src-0.9.0.6/cpp/src/RCF/include/',
                             '../'])

env.Append(CXXFLAGS='-std=c++0x -Wall -O2 -g',
           LIBPATH=['../cv'],
           LIBS=LIBS)
env.ParseConfig('pkg-config --cflags --libs opencv')
env.Program(target = target,
            source = [ sources, proto ])
