forked from gkralik/php7-sapnwrfc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.w32
50 lines (41 loc) · 1.91 KB
/
config.w32
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
49
50
// vim:ft=javascript
//
// Copyright (c) 2016 - 2021 Gregor Kralik <g.kralik (at) gmail.com>
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//
// Authors: Martin Keckeis <martin.keckeis1 (at) gmail.com>
// Gregor Kralik <g.kralik (at) gmail.com>
ARG_WITH("sapnwrfc", "SAP NW RFC support", "no");
if (PHP_SAPNWRFC != "no") {
var sdk_include_search_paths = [
"C:\\nwrfcsdk\\include",
"C:\\nwrfcsdk_750\\include",
PHP_SAPNWRFC
];
var sdk_lib_search_paths = [
"C:\\nwrfcsdk",
"C:\\nwrfcsdk_750",
PHP_SAPNWRFC
];
if (
CHECK_HEADER_ADD_INCLUDE("sapnwrfc.h", "CFLAGS_SAPNWRFC", sdk_include_search_paths.join(";")) &&
CHECK_LIB("libsapucum.lib", "sapnwrfc", sdk_lib_search_paths.join(";")) &&
CHECK_LIB("sapnwrfc.lib", "sapnwrfc", sdk_lib_search_paths.join(";"))
) {
// all source files from the extension
EXTENSION("sapnwrfc", "exceptions.c rfc_parameters.c sapnwrfc.c string_helper.c", PHP_SAPNWRFC_SHARED);
// all header files from the extension
PHP_INSTALL_HEADERS("ext/sapnwrfc", "exceptions.h php_sapnwrfc.h rfc_parameters.h string_helper.h");
// set up CFLAGS
var CFLAGS_SAPNWRFC = "-DSAPonNT -D_CRT_NON_CONFORMING_SWPRINTFS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_AFXDLL -DWIN32"
+ " -D_WIN32_WINNT=0x0502 -DWIN64 -D_AMD64_ -DNDEBUG -DSAPwithUNICODE -DUNICODE -D_UNICODE -DSAPwithTHREADS"
+ " -EHs -Gy -J -MD -nologo -W3 -Z7 -D_ATL_ALLOW_CHAR_UNSIGNED -GL -O2 -Oy- /we4552 /we4700 /we4789";
ADD_FLAG("CFLAGS_SAPNWRFC", CFLAGS_SAPNWRFC)
// skip -MACHINE:amd64
var LDFLAGS_SAPNWRFC = "-NXCOMPAT -STACK:0x2000000 -SWAPRUN:NET -DEBUG -OPT:REF"
+ " -DEBUGTYPE:CV,FIXUP -nologo -LTCG";
ADD_FLAG("LDFLAGS_SAPNWRFC", LDFLAGS_SAPNWRFC);
}
}