BCLOUD 2.5 KB
Newer Older
W
Fix dir  
wangguibao 已提交
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
#edit-mode: -*- python -*-
#coding:utf-8

WORKROOT('../../../../')

#Preprocessor flags.
CPPFLAGS(r'-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__const__= -Dtypeof=__typeof__ -DUSE_PTHREAD')
#CPPFLAGS(r'-DVERSION=\"%s\"' % SVN_LAST_CHANGED_REV())

#C++ flags.
CXXFLAGS('-g -O2 -pipe -W -Wall -fPIC -fno-omit-frame-pointer -Wno-deprecated -Wno-unused-parameter -Wno-unused-variable -Wno-unused-local-typedefs -Wno-sign-compare -std=c++11')

#link flags
LDFLAGS('-lpthread -lcrypto -lrt -lssl -ldl -lz -std=c++11')

ImportConfigsFrom('..')

INCPATHS('$INC')
INCPATHS('$INC/sdk-cpp')
INCPATHS('$INC/sdk-cpp/include')
INCPATHS('$OUT_ROOT/third-64/protobuf/output/include')

LIBS('$OUT/lib/libpdconfigure.a')

CONFIGS('baidu/base/baidu-rpc@ci-base')
CONFIGS('baidu/third-party/gflags@v2.0.0@git_branch')
CONFIGS('baidu/third-party/glog@v0.3.x@git_branch')

# DELETE_AUTO_LIBS('$OUT_ROOT/third-64/glog/output/lib/libglog.a')
DELETE_AUTO_LIBS('$OUT_ROOT/third-64/gflags/output/lib/libgflags.a')
DELETE_AUTO_LIBS('$OUT_ROOT/third-64/gflags/output/lib/libgflags_nothreads.a')

PROTOFLAGS(
        '--plugin=protoc-gen-pdcodegen=../pdcodegen/plugin/pdcodegen',
        '--pdcodegen_out proto --proto_path=.',
        '--proto_path=../predictor/proto')

HEADERS(GLOB_GEN_SRCS('../configure/proto/sdk_configure.pb.h'), '$INC/sdk-cpp')
HEADERS(GLOB_GEN_SRCS('../predictor/proto/builtin_format.pb.h'), '$INC/sdk-cpp')
HEADERS(GLOB_GEN_SRCS('../predictor/proto/pds_option.pb.h'), '$INC/sdk-cpp')
HEADERS(GLOB_GEN_SRCS('proto/*.pb.h'), '$INC/sdk-cpp')

HEADERS('include/*.h', '$INC/sdk-cpp/include')
HEADERS('include/*.hpp', '$INC/sdk-cpp/include')

# Application
#bin
Application('ximage', Sources('src/ximage.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
W
wangguibao 已提交
49
Application('ximage_press', Sources('src/ximage_press.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
W
Fix dir  
wangguibao 已提交
50 51 52 53 54 55 56 57 58
Application('echo', Sources('src/echo.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('dense_format', Sources('src/dense_format.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('sparse_format', Sources('src/sparse_format.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('int64tensor_format', Sources('src/int64tensor_format.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('text_classification', Sources('src/text_classification.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('text_classification_press', Sources('src/text_classification_press.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))

OUTPUT('conf', '$OUT/demo/client')
OUTPUT('data', '$OUT/demo/client')