+++ /dev/null
-Import('env')
-
-protobuf = Builder(
- action = (
- 'protoc --proto_path=${SOURCE.dir} --cpp_out=${TARGET.dir} $SOURCE'
- ),
- single_source = True,
- )
-
-env["BUILDERS"]["Protobuf"] = protobuf
-
-env.ParseConfig("echo -I./protobufrpc")
-env.ParseConfig("echo -I/opt/local/include -L/opt/local/lib")
-
-if not env.has_key('LIBS'):
- env['LIBS'] = []
-
-env['LIBS'] += ['protobuf',
- 'pthread',
- 'boost_thread-mt',
- 'boost_regex-mt',
- 'boost_system-mt',
- 'boost_program_options-mt',
- 'db']
-
-protobufrpc = SConscript(dirs=['./protobufrpc/'], exports='env')
-
-kvstore_proto_files = env.Protobuf(
- target = [ 'kvstore.pb.cc', 'kvstore.pb.h' ],
- source = 'kvstore.proto'
- )
-
-kvservice_files = ['kvservice.cc', 'backend.cc']
-kvclient_files = ['kvclient.cc']
-
-kvservice = env.StaticLibrary('kvservice', kvservice_files)
-kvclient = env.StaticLibrary('kvclient', kvclient_files)
-kvstore_proto = env.StaticLibrary('kvstore', kvstore_proto_files)
-
-env.Program('kvstore', ['kvstore.cc']
- + kvservice
- + kvstore_proto
- + protobufrpc)
-
-env.Program('kvtest',
- ['kvtest.cc']
- + kvservice
- + kvclient
- + kvstore_proto
- + protobufrpc,
- LIBS=env['LIBS']+['gtest'])
-
-env.Program('kvbench',
- ['kvbench.cc']
- + kvclient
- + kvstore_proto
- + protobufrpc)
-
-products = {
- 'kvservice': kvservice,
- 'kvclient': kvclient,
- 'kvstore_proto': kvstore_proto,
- }
-
-Return('products')
+++ /dev/null
-import os
-
-AddOption('--prefix',
- dest='prefix',
- type='string',
- nargs=1,
- action='store',
- metavar='DIR',
- help='installation prefix')
-
-env = Environment(CXXFLAGS='-O3 -fPIC -W -Wall -g',
- PREFIX=GetOption('prefix'),
- LINKFLAGS='',#-pg',
- )
-
-
-for envvar in ('HOME', 'DISTCC_DIR', 'DISTCC_HOSTS', 'CCACHE_DIR',
- 'INTERCEPTOR_SOCKET', 'ENFORGE_DIGEST_CACHE',
- 'ENFORGE_CACHE_HOST', 'ENFORGE_CACHE_PORT',
- 'PATH'):
- if envvar in os.environ:
- env['ENV'][envvar] = os.environ[envvar]
-
-#env['CXX'] = 'distcc g++'
-#env['CXX'] = 'icc'
-
-if env['PREFIX'] is not None:
- bin_dest = env['PREFIX'] + '/usr/bin'
-else:
- bin_dest = '/usr/bin'
-
-#env.ParseConfig("echo -lprofiler -ltcmalloc")
-
-SConscript(dirs=['./'], exports='env')
-
-if 'install' in COMMAND_LINE_TARGETS:
- env.Install(bin_dest, 'kvstore')
-
-env.Alias('install', bin_dest)