forked from easysoft/phpmicro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.w32
78 lines (66 loc) · 2.3 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// vim:ft=javascript
ARG_ENABLE('micro', 'Build micro PHP sfx', 'yes');
ARG_ENABLE('micro-win32', 'Build console-less micro PHP sfx', 'no');
ARG_ENABLE('micro-logo', 'Use custom logo for micro sfx', 'no');
// let us donot affect globals
(function () {
if (PHP_MICRO !== "yes") {
return;
}
SAPI('micro', 'php_micro.c php_micro_fileinfo.c php_micro_helper.c php_micro_hooks.c', 'micro.exe', '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
// add cli_process_title sources
ADD_SOURCES('sapi/cli', 'php_cli_process_title.c ps_title.c', 'micro');
ADD_FLAG('CFLAGS_MICRO_OBJ', '/TC /W3 /we4013 /wd4244 /wd4018');
ADD_FLAG("LIBS_MICRO", "ws2_32.lib");
ADD_FLAG("LIBS_MICRO", "shell32.lib");
ADD_FLAG("DEPS_MICRO", "say_warning error_out");
/*
if (PHP_CRT_DEBUG == "yes") {
ADD_FLAG("CFLAGS_MICRO", "/D PHP_WIN32_DEBUG_HEAP");
}
*/
if (PHP_MICRO_WIN32 == "yes") {
ADD_FLAG("CFLAGS_MICRO", "/D PHP_MICRO_WIN32_NO_CONSOLE");
}
if (PHP_MICRO_LOGO != "no") {
ADD_FLAG("APP_LOGO", PHP_MICRO_LOGO);
} else {
ADD_FLAG("APP_LOGO", 'win32\\build\\php.ico');
}
// for visual style
ADD_FLAG('LDFLAGS_MICRO', "\"/manifestdependency:" +
"type='win32' " +
"name='Microsoft.Windows.Common-Controls' " +
"version='6.0.0.0' " +
"processorArchitecture='*' " +
"publicKeyToken='6595b64144ccf1df' " +
"language='*'\"");
if (PHP_DEBUG != "no") {
ADD_FLAG('LDFLAGS_MICRO', '/defaultlib:libcmtd');
} else {
ADD_FLAG('LDFLAGS_MICRO', '/defaultlib:libcmt');
}
ADD_FLAG("LDFLAGS_MICRO", "/stack:67108864");
ADD_FLAG('LDFLAGS_MICRO', '/nodefaultlib:MSVCRT');
ADD_FLAG('LDFLAGS_MICRO', '/nodefaultlib:MSVCRTD');
//ADD_FLAG('LDFLAGS_MICRO', '/nodefaultlib:LIBCMT');
ADD_FLAG('LDFLAGS_MICRO', '/ignore:4049');
if (PHP_FFI != 'no') {
ADD_FLAG('LDFLAGS_MICRO', '/LTCG');
}
ADD_MAKEFILE_FRAGMENT();
/*
if (CHECK_LIB("edit_a.lib;edit.lib", "cli", PHP_CLI) &&
CHECK_HEADER_ADD_INCLUDE("editline/readline.h", "CFLAGS_CLI")) {
ADD_FLAG("CFLAGS_CLI", "/D HAVE_LIBEDIT");
}
*/
if (PHP_VERSION >= 8) {
if (PHP_MINOR_VERSION > 1) {
// since 8.2, there was ASM_OBJS variable
ADD_FLAG('MICRO_GLOBAL_OBJS', '$(ASM_OBJS)');
} else if (PHP_MINOR_VERSION == 1) {
ADD_FLAG('MICRO_GLOBAL_OBJS', '$(BUILD_DIR)\\Zend\\jump_$(FIBER_ASM_ARCH)_ms_pe_masm.obj $(BUILD_DIR)\\Zend\\make_$(FIBER_ASM_ARCH)_ms_pe_masm.obj');
}
}
})();