|
|
|
%YAML 1.2
|
|
|
|
--- |
|
|
|
|
// $Id$
|
|
|
|
// vim:ft=javascript
|
|
|
|
|
|
|
|
ARG_WITH("grpc", "grpc support", "no");
|
|
|
|
|
|
|
|
if (PHP_GRPC != "no") {
|
|
|
|
<%
|
|
|
|
srcs = []
|
|
|
|
srcs.extend(php_config_m4.src)
|
|
|
|
php_deps = php_config_m4.get('deps', [])
|
|
|
|
lib_maps = {lib.name: lib for lib in libs}
|
|
|
|
for dep in php_deps[:]:
|
|
|
|
php_deps.extend(lib_maps[dep].transitive_deps)
|
|
|
|
for dep in php_deps:
|
|
|
|
srcs.extend(lib_maps[dep].src)
|
|
|
|
srcs = sorted(set(srcs))
|
|
|
|
%>
|
|
|
|
EXTENSION("grpc",
|
|
|
|
% for src in srcs:
|
|
|
|
"${src.replace('/','\\\\')} " +
|
|
|
|
% endfor
|
|
|
|
""
|
|
|
|
, null,
|
|
|
|
"/DOPENSSL_NO_ASM /D_GNU_SOURCE /DWIN32_LEAN_AND_MEAN "+
|
|
|
|
"/D_HAS_EXCEPTIONS=0 /DNOMINMAX /DGRPC_ARES=0 /D_WIN32_WINNT=0x600 "+
|
|
|
|
"/I"+configure_module_dirname+" "+
|
|
|
|
"/I"+configure_module_dirname+"\\include "+
|
|
|
|
"/I"+configure_module_dirname+"\\src\\core\\ext\\upb-generated "+
|
|
|
|
"/I"+configure_module_dirname+"\\src\\php\\ext\\grpc "+
|
|
|
|
"/I"+configure_module_dirname+"\\third_party\\address_sorting\\include "+
|
|
|
|
"/I"+configure_module_dirname+"\\third_party\\boringssl\\include "+
|
|
|
|
"/I"+configure_module_dirname+"\\third_party\\upb "+
|
|
|
|
"/I"+configure_module_dirname+"\\third_party\\zlib ");
|
|
|
|
<%
|
|
|
|
dirset = set()
|
|
|
|
for src in srcs:
|
|
|
|
dirset.add(src[:src.rfind('/')])
|
|
|
|
for dir in list(dirset):
|
|
|
|
frags = dir.split('/')
|
|
|
|
for i in range(1, len(frags)):
|
|
|
|
dirset.add('/'.join(frags[:i]))
|
|
|
|
dirs = [d.replace('/', '\\\\') for d in sorted(list(dirset))]
|
|
|
|
%>
|
|
|
|
base_dir = get_define('BUILD_DIR');
|
|
|
|
FSO.CreateFolder(base_dir+"\\ext");
|
|
|
|
FSO.CreateFolder(base_dir+"\\ext\\grpc");
|
|
|
|
% for dir in dirs:
|
|
|
|
FSO.CreateFolder(base_dir+"\\ext\\grpc\\${dir}");
|
|
|
|
% endfor
|
|
|
|
_build_dirs = new Array();
|
|
|
|
for (i = 0; i < build_dirs.length; i++) {
|
|
|
|
if (build_dirs[i].indexOf('grpc') == -1) {
|
|
|
|
_build_dirs[_build_dirs.length] = build_dirs[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
build_dirs = _build_dirs;
|
|
|
|
}
|