|
|
| version 1.1, 2012/02/21 23:48:06 | version 1.1.1.4, 2014/06/15 20:04:03 |
|---|---|
| Line 46 VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)'; | Line 46 VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)'; |
| VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)'; | VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)'; |
| VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)'; | VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)'; |
| VC_VERSIONS[1600] = 'MSVC10 (Visual C++ 2010)'; | VC_VERSIONS[1600] = 'MSVC10 (Visual C++ 2010)'; |
| VC_VERSIONS[1700] = 'MSVC11 (Visual C++ 2012)'; | |
| VC_VERSIONS[1800] = 'MSVC12 (Visual C++ 2013)'; | |
| var VC_VERSIONS_SHORT = new Array(); | var VC_VERSIONS_SHORT = new Array(); |
| VC_VERSIONS_SHORT[1200] = 'VC6'; | VC_VERSIONS_SHORT[1200] = 'VC6'; |
| Line 54 VC_VERSIONS_SHORT[1310] = 'VC7.1'; | Line 56 VC_VERSIONS_SHORT[1310] = 'VC7.1'; |
| VC_VERSIONS_SHORT[1400] = 'VC8'; | VC_VERSIONS_SHORT[1400] = 'VC8'; |
| VC_VERSIONS_SHORT[1500] = 'VC9'; | VC_VERSIONS_SHORT[1500] = 'VC9'; |
| VC_VERSIONS_SHORT[1600] = 'VC10'; | VC_VERSIONS_SHORT[1600] = 'VC10'; |
| VC_VERSIONS_SHORT[1700] = 'VC11'; | |
| VC_VERSIONS_SHORT[1800] = 'VC12'; | |
| if (PROGRAM_FILES == null) { | if (PROGRAM_FILES == null) { |
| PROGRAM_FILES = "C:\\Program Files"; | PROGRAM_FILES = "C:\\Program Files"; |
| Line 65 if (MODE_PHPIZE) { | Line 69 if (MODE_PHPIZE) { |
| WScript.Quit(10); | WScript.Quit(10); |
| } | } |
| } else { | } else { |
| if (!FSO.FileExists("README.SVN-RULES")) { | if (!FSO.FileExists("README.GIT-RULES")) { |
| STDERR.WriteLine("Must be run from the root of the php source"); | STDERR.WriteLine("Must be run from the root of the php source"); |
| WScript.Quit(10); | WScript.Quit(10); |
| } | } |
| Line 74 if (MODE_PHPIZE) { | Line 78 if (MODE_PHPIZE) { |
| var CWD = WshShell.CurrentDirectory; | var CWD = WshShell.CurrentDirectory; |
| if (typeof(CWD) == "undefined") { | if (typeof(CWD) == "undefined") { |
| CWD = FSO.GetParentFolderName(FSO.GetAbsolutePathName("README.SVN-RULES")); | CWD = FSO.GetParentFolderName(FSO.GetAbsolutePathName("README.GIT-RULES")); |
| } | } |
| /* defaults; we pick up the precise versions from configure.in */ | /* defaults; we pick up the precise versions from configure.in */ |
| Line 414 can be built that way. \ | Line 418 can be built that way. \ |
| 'php-build', 'snapshot-template', 'ereg', | 'php-build', 'snapshot-template', 'ereg', |
| 'pcre-regex', 'fastcgi', 'force-cgi-redirect', | 'pcre-regex', 'fastcgi', 'force-cgi-redirect', |
| 'path-info-check', 'zts', 'ipv6', 'memory-limit', | 'path-info-check', 'zts', 'ipv6', 'memory-limit', |
| 'zend-multibyte', 'fd-setsize', 'memory-manager', 't1lib' | 'zend-multibyte', 'fd-setsize', 'memory-manager', |
| 't1lib', 'pgi', 'pgo' | |
| ); | ); |
| var force; | var force; |
| Line 1010 function generate_version_info_resource(makefiletarget | Line 1015 function generate_version_info_resource(makefiletarget |
| return resname; | return resname; |
| } | } |
| /* Check if PGO is enabled for given module. To disable PGO for a particular module, | |
| define a global variable by the following name scheme before SAPI() or EXTENSION() call | |
| var PHP_MYMODULE_PGO = false; */ | |
| function is_pgo_desired(mod) | |
| { | |
| var varname = "PHP_" + mod.toUpperCase() + "_PGO"; | |
| /* don't disable if there's no mention of the varname */ | |
| if (eval("typeof " + varname + " == 'undefined'")) { | |
| return true; | |
| } | |
| return eval("!!" + varname); | |
| } | |
| function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir) | function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir) |
| { | { |
| var SAPI = sapiname.toUpperCase(); | var SAPI = sapiname.toUpperCase(); |
| Line 1060 function SAPI(sapiname, file_list, makefiletarget, cfl | Line 1080 function SAPI(sapiname, file_list, makefiletarget, cfl |
| ldflags = "$(LDFLAGS)"; | ldflags = "$(LDFLAGS)"; |
| manifest = "-@$(_VC_MANIFEST_EMBED_EXE)"; | manifest = "-@$(_VC_MANIFEST_EMBED_EXE)"; |
| } | } |
| if(is_pgo_desired(sapiname) && (PHP_PGI == "yes" || PHP_PGO != "no")) { | |
| // Add compiler and link flags if PGO options are selected | |
| if (PHP_DEBUG != "yes" && PHP_PGI == "yes") { | |
| ADD_FLAG('CFLAGS_' + SAPI, "/GL /O2"); | |
| ADD_FLAG('LDFLAGS_' + SAPI, "/LTCG:PGINSTRUMENT"); | |
| } | |
| else if (PHP_DEBUG != "yes" && PHP_PGO != "no") { | |
| ADD_FLAG('CFLAGS_' + SAPI, "/GL /O2"); | |
| ADD_FLAG('LDFLAGS_' + SAPI, "/LTCG:PGUPDATE"); | |
| } | |
| ldflags += " /PGD:$(PGOPGD_DIR)\\" + makefiletarget.substring(0, makefiletarget.indexOf(".")) + ".pgd"; | |
| } | |
| if (MODE_PHPIZE) { | if (MODE_PHPIZE) { |
| if (ld) { | if (ld) { |
| MFO.WriteLine("\t" + ld + " /nologo /out:$(BUILD_DIR)\\" + makefiletarget + " " + ldflags + " $(" + SAPI + "_GLOBAL_OBJS) $(PHPLIB) $(LDFLAGS_" + SAPI + ") $(LIBS_" + SAPI + ") $(BUILD_DIR)\\" + resname); | MFO.WriteLine("\t" + ld + " /nologo /out:$(BUILD_DIR)\\" + makefiletarget + " " + ldflags + " $(" + SAPI + "_GLOBAL_OBJS) $(PHPLIB) $(LDFLAGS_" + SAPI + ") $(LIBS_" + SAPI + ") $(BUILD_DIR)\\" + resname); |
| Line 1199 function EXTENSION(extname, file_list, shared, cflags, | Line 1233 function EXTENSION(extname, file_list, shared, cflags, |
| var objs = null; | var objs = null; |
| var EXT = extname.toUpperCase(); | var EXT = extname.toUpperCase(); |
| var extname_for_printing; | var extname_for_printing; |
| var ldflags; | |
| if (shared == null) { | if (shared == null) { |
| eval("shared = PHP_" + EXT + "_SHARED;"); | eval("shared = PHP_" + EXT + "_SHARED;"); |
| Line 1228 function EXTENSION(extname, file_list, shared, cflags, | Line 1263 function EXTENSION(extname, file_list, shared, cflags, |
| MFO.WriteLine("# objects for EXT " + extname); | MFO.WriteLine("# objects for EXT " + extname); |
| MFO.WriteBlankLines(1); | MFO.WriteBlankLines(1); |
| ADD_SOURCES(configure_module_dirname, file_list, extname, obj_dir); | ADD_SOURCES(configure_module_dirname, file_list, extname, obj_dir); |
| MFO.WriteBlankLines(1); | MFO.WriteBlankLines(1); |
| Line 1242 function EXTENSION(extname, file_list, shared, cflags, | Line 1276 function EXTENSION(extname, file_list, shared, cflags, |
| var resname = generate_version_info_resource(dllname, extname, configure_module_dirname, false); | var resname = generate_version_info_resource(dllname, extname, configure_module_dirname, false); |
| var ld = "@$(CC)"; | var ld = "@$(CC)"; |
| ldflags = ""; | |
| if (is_pgo_desired(extname) && (PHP_PGI == "yes" || PHP_PGO != "no")) { | |
| // Add compiler and link flags if PGO options are selected | |
| if (PHP_DEBUG != "yes" && PHP_PGI == "yes") { | |
| ADD_FLAG('LDFLAGS_' + EXT, "/LTCG:PGINSTRUMENT"); | |
| } | |
| else if (PHP_DEBUG != "yes" && PHP_PGO != "no") { | |
| ADD_FLAG('LDFLAGS_' + EXT, "/LTCG:PGUPDATE"); | |
| } | |
| ADD_FLAG('CFLAGS_' + EXT, "/GL /O2"); | |
| ldflags = " /PGD:$(PGOPGD_DIR)\\" + dllname.substring(0, dllname.indexOf(".")) + ".pgd"; | |
| } | |
| MFO.WriteLine("$(BUILD_DIR)\\" + libname + ": $(BUILD_DIR)\\" + dllname); | MFO.WriteLine("$(BUILD_DIR)\\" + libname + ": $(BUILD_DIR)\\" + dllname); |
| MFO.WriteBlankLines(1); | MFO.WriteBlankLines(1); |
| if (MODE_PHPIZE) { | if (MODE_PHPIZE) { |
| Line 1249 function EXTENSION(extname, file_list, shared, cflags, | Line 1298 function EXTENSION(extname, file_list, shared, cflags, |
| MFO.WriteLine("\t" + ld + " $(" + EXT + "_GLOBAL_OBJS) $(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname + " /link /out:$(BUILD_DIR)\\" + dllname + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ")"); | MFO.WriteLine("\t" + ld + " $(" + EXT + "_GLOBAL_OBJS) $(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname + " /link /out:$(BUILD_DIR)\\" + dllname + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ")"); |
| } else { | } else { |
| MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname); | MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname); |
| MFO.WriteLine("\t" + ld + " $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname + " /link /out:$(BUILD_DIR)\\" + dllname + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ")"); | MFO.WriteLine("\t" + ld + " $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname + " /link /out:$(BUILD_DIR)\\" + dllname + ldflags + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ")"); |
| } | } |
| MFO.WriteLine("\t-@$(_VC_MANIFEST_EMBED_DLL)"); | MFO.WriteLine("\t-@$(_VC_MANIFEST_EMBED_DLL)"); |
| MFO.WriteBlankLines(1); | MFO.WriteBlankLines(1); |