提交 378b0ad3 编写于 作者: W wangguibao

Fix dir

Change-Id: I7b499ad55f1673d4efb1f24262f2144fdd490e54
上级 4e044e34
#edit-mode: -*- python -*-
#coding:utf-8
WORKROOT('../../../')
#gcc version, default 'gcc'
COMPILER('gcc482')
CONFIGS('third-64/protobuf@protobuf_3-2-0-6274_PD_BL')
CONFIGS('baidu/third-party/mklml@v20180406@git_branch')
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')
CONFIGS('baidu/third-party/opencv@master@git_branch')
PROTOC('third-64/protobuf/output/bin/protoc')
CONFIGS('baidu/paddlepaddle/paddle@v1.3.0_pb32@git_branch')
NEED_OUTPUT('baidu/third-party/mklml')
#sub directory
Directory('pdcodegen')
Directory('configure')
Directory('predictor')
Directory('inferencer-fluid-cpu')
Directory('serving')
Directory('sdk-cpp')
#edit-mode: -*- python -*-
#coding:utf-8
WORKROOT('../../../../')
ImportConfigsFrom('..')
#
#Preprocessor flags.
CPPFLAGS(r'-D_GNU_SOURCE -D__STDC_LIMIT_MACROS')
#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')
INCPATHS('$INC')
INCPATHS('$OUT_ROOT/third-64/protobuf/output/include')
HEADERS('include/configure_parser.h', '$INC/configure/include')
HEADERS(GLOB_GEN_SRCS('proto/*.pb.h'), '$INC/configure/')
configure_sources = GLOB('proto/*.proto src/*.cpp')
#.a
StaticLibrary('pdconfigure', Sources(configure_sources))
#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/predictor')
INCPATHS('../')
INCPATHS('../predictor/')
INCPATHS('$OUT_ROOT/third-64/protobuf/output/include')
INCPATHS('$OUT_ROOT/baidu/third-party/gflags/output/include')
INCPATHS('$OUT_ROOT/baidu/third-party/glog/output/include')
INCPATHS('$INC/predictor/proto')
LIBS('$OUT/lib/libpdserving.a')
LIBS('$OUT/lib/libpdconfigure.a')
LIBS('$OUT_ROOT/baidu/third-party/mklml/output/so/libmklml_intel.so')
LIBS('$OUT_ROOT/baidu/third-party/mklml/output/so/libmklml_gnu.so')
LIBS('$OUT_ROOT/baidu/third-party/mklml/output/so/libiomp5.so')
cpp_source_dirs = []
cpp_source_dirs.append('op/*.cpp')
cpp_source_dirs.append('proto/*.proto')
DELETE_AUTO_LIBS('$OUT_ROOT/baidu/third-party/protobuf/output/lib/libprotobuf.a')
DELETE_AUTO_LIBS('$OUT_ROOT/baidu/third-party/protobuf/output/lib/libprotobuf-lite.a')
# 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')
DELETE_AUTO_LIBS('$OUT_ROOT/baidu/paddlepaddle/paddle/output/lib/libpaddle_fluid_noavx_openblas.a')
PROTOFLAGS(
'--plugin=protoc-gen-pdcodegen=../pdcodegen/plugin/pdcodegen',
'--pdcodegen_out proto --proto_path=.',
'--proto_path=../predictor/proto')
HEADERS(GLOB_GEN_SRCS('../configure/proto/server_configure.pb.h'), '$INC/serving')
HEADERS(GLOB_GEN_SRCS('proto/*.pb.h'), '$INC/serving')
# Application
Application('serving', Sources(GLOB(' '.join(cpp_source_dirs))), WholeArchives('$OUT/lib/libinferencer-fluid-cpu.a'))
OUTPUT('conf', '$OUT/demo/serving/')
OUTPUT('data', '$OUT/demo/serving')
#edit-mode: -*- python -*-
#coding:utf-8
WORKROOT('../../../../')
#Preprocessor flags.
CPPFLAGS(r'-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__const__= -Dtypeof=__typeof__ -DUSE_PTHREAD -DPYBIND_AVX_MKLML')
#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')
ImportConfigsFrom('..')
INCPATHS('$INC')
INCPATHS('../')
INCPATHS('$OUT_ROOT/third-64/protobuf/output/include')
HEADERS('include/fluid_cpu_engine.h', '$INC/inferencer-fluid-cpu/include')
inferencer_fluid_cpu_sources = 'src/fluid_cpu_engine.cpp'
#.a
StaticLibrary('inferencer-fluid-cpu',
Sources(inferencer_fluid_cpu_sources))
#edit-mode: -*- python -*-
#coding:utf-8
WORKROOT('../../../../')
COMPILER('gcc482')
#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.
#CFLAGS('-g -pipe -W -Wall -fPIC')
#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')
ImportConfigsFrom('..')
INCPATHS('$INC')
INCPATHS('../')
INCPATHS('$OUT_ROOT/third-64/protobuf/output/include')
HEADERS(GLOB_GEN_SRCS('../predictor/proto/pds_option.pb.h'), '$INC/pdcodegen')
pdcodegen_sources = GLOB('plugin/*.cc')
pdcodegen_sources += ' ../predictor/proto/pds_option.proto'
pdcodegen_sources += ' src/pdcodegen.cpp'
DELETE_AUTO_LIBS('$OUT_ROOT/baidu/third-party/protobuf/output/lib/libprotobuf.a')
DELETE_AUTO_LIBS('$OUT_ROOT/baidu/third-party/protobuf/output/lib/libprotobuf-lite.a')
Application('pdcodegen', Sources(pdcodegen_sources))
#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')
ImportConfigsFrom('..')
INCPATHS('$INC')
INCPATHS('../')
INCPATHS('$OUT_ROOT/third-64/protobuf/output/include')
cpp_source_dirs = []
cpp_source_dirs.append('common/*.cpp')
cpp_source_dirs.append('op/*.cpp')
cpp_source_dirs.append('framework/*.cpp')
cpp_source_dirs.append('mempool/*.cpp')
cpp_source_dirs.append('proto/*.proto')
HEADERS(GLOB_GEN_SRCS('proto/*.pb.h'), '$INC/predictor/')
HEADERS('common/*.h', '$INC/predictor/common')
HEADERS('framework/*.h', '$INC/predictor/framework')
HEADERS('mempool/*.h', '$INC/predictor/mempool')
HEADERS('op/*.h', '$INC/predictor/op')
#.a
StaticLibrary('pdserving', Sources(GLOB(' '.join(cpp_source_dirs)), 'src/pdserving.cpp'))
#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')
CONFIGS('baidu/third-party/opencv@master@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')
user_sources=GLOB("src/*.cpp proto/*.proto")
user_sources += ' ../predictor/proto/builtin_format.proto ../predictor/proto/pds_option.proto'
# .a
StaticLibrary('pdsdk-cpp', Sources(user_sources))
# Application
#bin
Application('ximage', Sources('demo/ximage.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('echo', Sources('demo/echo.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('dense_format', Sources('demo/dense_format.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('sparse_format', Sources('demo/sparse_format.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('int64tensor_format', Sources('demo/int64tensor_format.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('text_classification', Sources('demo/text_classification.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
Application('text_classification_press', Sources('demo/text_classification_press.cpp'), WholeArchives('$OUT/lib/libpdsdk-cpp.a'))
OUTPUT('conf', '$OUT/demo/client')
OUTPUT('data', '$OUT/demo/client')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册