| 1 | # |
| 2 | # Makefile to build perl on Windows using DMAKE. |
| 3 | # Supported compilers: |
| 4 | # Microsoft Visual C++ 6.0 or later |
| 5 | # MinGW with gcc-3.4.5 or later |
| 6 | # Windows SDK 64-bit compiler and tools |
| 7 | # |
| 8 | # This is set up to build a perl.exe that runs off a shared library |
| 9 | # (perl523.dll). Also makes individual DLLs for the XS extensions. |
| 10 | # |
| 11 | |
| 12 | ## |
| 13 | ## Make sure you read README.win32 *before* you mess with anything here! |
| 14 | ## |
| 15 | |
| 16 | # |
| 17 | # Import everything from the environment like NMAKE does. |
| 18 | # |
| 19 | .IMPORT : .EVERYTHING |
| 20 | |
| 21 | ## |
| 22 | ## Build configuration. Edit the values below to suit your needs. |
| 23 | ## |
| 24 | |
| 25 | # |
| 26 | # Set these to wherever you want "dmake install" to put your |
| 27 | # newly built perl. |
| 28 | # |
| 29 | INST_DRV *= c: |
| 30 | INST_TOP *= $(INST_DRV)\perl |
| 31 | |
| 32 | # |
| 33 | # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler |
| 34 | # on a 64-bit version of Windows. |
| 35 | # |
| 36 | #WIN64 *= undef |
| 37 | |
| 38 | # |
| 39 | # Comment this out if you DON'T want your perl installation to be versioned. |
| 40 | # This means that the new installation will overwrite any files from the |
| 41 | # old installation at the same INST_TOP location. Leaving it enabled is |
| 42 | # the safest route, as perl adds the extra version directory to all the |
| 43 | # locations it installs files to. If you disable it, an alternative |
| 44 | # versioned installation can be obtained by setting INST_TOP above to a |
| 45 | # path that includes an arbitrary version string. |
| 46 | # |
| 47 | #INST_VER *= \5.23.5 |
| 48 | |
| 49 | # |
| 50 | # Comment this out if you DON'T want your perl installation to have |
| 51 | # architecture specific components. This means that architecture- |
| 52 | # specific files will be installed along with the architecture-neutral |
| 53 | # files. Leaving it enabled is safer and more flexible, in case you |
| 54 | # want to build multiple flavors of perl and install them together in |
| 55 | # the same location. Commenting it out gives you a simpler |
| 56 | # installation that is easier to understand for beginners. |
| 57 | # |
| 58 | #INST_ARCH *= \$(ARCHNAME) |
| 59 | |
| 60 | # |
| 61 | # Uncomment this if you want perl to run |
| 62 | # $Config{sitelibexp}\sitecustomize.pl |
| 63 | # before anything else. This script can then be set up, for example, |
| 64 | # to add additional entries to @INC. |
| 65 | # |
| 66 | #USE_SITECUST *= define |
| 67 | |
| 68 | # |
| 69 | # uncomment to enable multiple interpreters. This is needed for fork() |
| 70 | # emulation and for thread support, and is auto-enabled by USE_IMP_SYS |
| 71 | # and USE_ITHREADS below. |
| 72 | # |
| 73 | USE_MULTI *= define |
| 74 | |
| 75 | # |
| 76 | # Interpreter cloning/threads; now reasonably complete. |
| 77 | # This should be enabled to get the fork() emulation. This needs (and |
| 78 | # will auto-enable) USE_MULTI above. |
| 79 | # |
| 80 | USE_ITHREADS *= define |
| 81 | |
| 82 | # |
| 83 | # uncomment to enable the implicit "host" layer for all system calls |
| 84 | # made by perl. This is also needed to get fork(). This needs (and |
| 85 | # will auto-enable) USE_MULTI above. |
| 86 | # |
| 87 | USE_IMP_SYS *= define |
| 88 | |
| 89 | # |
| 90 | # Comment this out if you don't want to enable large file support for |
| 91 | # some reason. Should normally only be changed to maintain compatibility |
| 92 | # with an older release of perl. |
| 93 | # |
| 94 | USE_LARGE_FILES *= define |
| 95 | |
| 96 | # |
| 97 | # Uncomment this if you're building a 32-bit perl and want 64-bit integers. |
| 98 | # (If you're building a 64-bit perl then you will have 64-bit integers whether |
| 99 | # or not this is uncommented.) |
| 100 | # Note: This option is not supported in 32-bit MSVC60 builds. |
| 101 | # |
| 102 | #USE_64_BIT_INT *= define |
| 103 | |
| 104 | # |
| 105 | # Uncomment this if you want to support the use of long doubles in GCC builds. |
| 106 | # This option is not supported for MSVC builds. |
| 107 | # |
| 108 | #USE_LONG_DOUBLE *=define |
| 109 | |
| 110 | # |
| 111 | # Uncomment this if you want to disable looking up values from |
| 112 | # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in |
| 113 | # the Registry. |
| 114 | # |
| 115 | #USE_NO_REGISTRY *=define |
| 116 | |
| 117 | # |
| 118 | # uncomment exactly one of the following |
| 119 | # |
| 120 | # Visual C++ 6.0 (aka Visual C++ 98) |
| 121 | #CCTYPE *= MSVC60 |
| 122 | # Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version) |
| 123 | #CCTYPE *= MSVC70 |
| 124 | # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools) |
| 125 | #CCTYPE *= MSVC70FREE |
| 126 | # Windows Server 2003 SP1 Platform SDK (April 2005) |
| 127 | #CCTYPE = SDK2003SP1 |
| 128 | # Visual C++ 2005 (aka Visual C++ 8.0) (full version) |
| 129 | #CCTYPE *= MSVC80 |
| 130 | # Visual C++ 2005 Express Edition (aka Visual C++ 8.0) (free version) |
| 131 | #CCTYPE *= MSVC80FREE |
| 132 | # Visual C++ 2008 (aka Visual C++ 9.0) (full version) |
| 133 | #CCTYPE *= MSVC90 |
| 134 | # Visual C++ 2008 Express Edition (aka Visual C++ 9.0) (free version) |
| 135 | #CCTYPE *= MSVC90FREE |
| 136 | # Visual C++ 2010 (aka Visual C++ 10.0) (full version) |
| 137 | #CCTYPE = MSVC100 |
| 138 | # Visual C++ 2010 Express Edition (aka Visual C++ 10.0) (free version) |
| 139 | #CCTYPE = MSVC100FREE |
| 140 | # Visual C++ 2012 (aka Visual C++ 11.0) (full version) |
| 141 | #CCTYPE = MSVC110 |
| 142 | # Visual C++ 2012 Express Edition (aka Visual C++ 11.0) (free version) |
| 143 | #CCTYPE = MSVC110FREE |
| 144 | # Visual C++ 2013 (aka Visual C++ 12.0) (full version) |
| 145 | #CCTYPE = MSVC120 |
| 146 | # Visual C++ 2013 Express Edition (aka Visual C++ 12.0) (free version) |
| 147 | #CCTYPE = MSVC120FREE |
| 148 | # MinGW or mingw-w64 with gcc-3.4.5 or later |
| 149 | CCTYPE *= GCC |
| 150 | |
| 151 | # |
| 152 | # If you are using GCC, 4.3 or later by default we add the -fwrapv option. |
| 153 | # See https://rt.perl.org/Ticket/Display.html?id=121505 |
| 154 | # |
| 155 | #GCCWRAPV *= define |
| 156 | |
| 157 | # |
| 158 | # If you are using Intel C++ Compiler uncomment this |
| 159 | # |
| 160 | #__ICC *= define |
| 161 | |
| 162 | # |
| 163 | # Uncomment this if you want to build everything in C++ mode |
| 164 | # |
| 165 | #USE_CPLUSPLUS *= define |
| 166 | |
| 167 | # |
| 168 | # uncomment next line if you want debug version of perl (big/slow) |
| 169 | # If not enabled, we automatically try to use maximum optimization |
| 170 | # with all compilers that are known to have a working optimizer. |
| 171 | # |
| 172 | # You can also set CFG = DebugSymbols for a slightly smaller/faster |
| 173 | # debug build without the special debugging code in perl which is |
| 174 | # enabled via -DDEBUGGING; |
| 175 | # |
| 176 | # or you can set CFG = DebugFull for an even fuller (bigger/slower) |
| 177 | # debug build using the debug version of the CRT, and enabling VC++ |
| 178 | # debug features such as extra assertions and invalid parameter warnings |
| 179 | # in perl and CRT code via -D_DEBUG. (Note that the invalid parameter |
| 180 | # handler does get triggered from time to time in this configuration, |
| 181 | # which causes warnings to be printed on STDERR, which in turn causes a |
| 182 | # few tests to fail.) (This configuration is only available for VC++ builds.) |
| 183 | # |
| 184 | #CFG *= Debug |
| 185 | |
| 186 | # |
| 187 | # uncomment to enable linking with setargv.obj under the Visual C |
| 188 | # compiler. Setting this options enables perl to expand wildcards in |
| 189 | # arguments, but it may be harder to use alternate methods like |
| 190 | # File::DosGlob that are more powerful. This option is supported only with |
| 191 | # Visual C. |
| 192 | # |
| 193 | #USE_SETARGV *= define |
| 194 | |
| 195 | # |
| 196 | # set this if you wish to use perl's malloc |
| 197 | # WARNING: Turning this on/off WILL break binary compatibility with extensions |
| 198 | # you may have compiled with/without it. Be prepared to recompile all |
| 199 | # extensions if you change the default. Currently, this cannot be enabled |
| 200 | # if you ask for USE_IMP_SYS above. |
| 201 | # |
| 202 | #PERL_MALLOC *= define |
| 203 | |
| 204 | # |
| 205 | # set this to enable debugging mstats |
| 206 | # This must be enabled to use the Devel::Peek::mstat() function. This cannot |
| 207 | # be enabled without PERL_MALLOC as well. |
| 208 | # |
| 209 | #DEBUG_MSTATS *= define |
| 210 | |
| 211 | # |
| 212 | # set this to additionally provide a statically linked perl-static.exe. |
| 213 | # Note that dynamic loading will not work with this perl, so you must |
| 214 | # include required modules statically using the STATIC_EXT or ALL_STATIC |
| 215 | # variables below. A static library perl523s.lib will also be created. |
| 216 | # Ordinary perl.exe is not affected by this option. |
| 217 | # |
| 218 | #BUILD_STATIC *= define |
| 219 | |
| 220 | # |
| 221 | # in addition to BUILD_STATIC the option ALL_STATIC makes *every* |
| 222 | # extension get statically built |
| 223 | # This will result in a very large perl executable, but the main purpose |
| 224 | # is to have proper linking set so as to be able to create miscellaneous |
| 225 | # executables with different built-in extensions |
| 226 | # |
| 227 | #ALL_STATIC *= define |
| 228 | |
| 229 | # |
| 230 | # set the install locations of the compiler include/libraries |
| 231 | # Running VCVARS32.BAT is *required* when using Visual C. |
| 232 | # Some versions of Visual C don't define MSVCDIR in the environment, |
| 233 | # so you may have to set CCHOME explicitly (spaces in the path name should |
| 234 | # not be quoted) |
| 235 | # |
| 236 | .IF "$(CCTYPE)" == "GCC" |
| 237 | CCHOME *= C:\MinGW |
| 238 | .ELSE |
| 239 | CCHOME *= $(MSVCDIR) |
| 240 | .ENDIF |
| 241 | |
| 242 | # |
| 243 | # uncomment this if you are using x86_64-w64-mingw32 cross-compiler |
| 244 | # ie if your gcc executable is called 'x86_64-w64-mingw32-gcc' |
| 245 | # instead of the usual 'gcc'. |
| 246 | # |
| 247 | #GCCCROSS *= define |
| 248 | |
| 249 | # |
| 250 | # Following sets $Config{incpath} and $Config{libpth} |
| 251 | # |
| 252 | |
| 253 | .IF "$(GCCCROSS)" == "define" |
| 254 | CCINCDIR *= $(CCHOME)\x86_64-w64-mingw32\include |
| 255 | CCLIBDIR *= $(CCHOME)\x86_64-w64-mingw32\lib |
| 256 | CCDLLDIR *= $(CCLIBDIR) |
| 257 | .ELSE |
| 258 | CCINCDIR *= $(CCHOME)\include |
| 259 | CCLIBDIR *= $(CCHOME)\lib |
| 260 | CCDLLDIR *= $(CCHOME)\bin |
| 261 | .ENDIF |
| 262 | |
| 263 | # |
| 264 | # Additional compiler flags can be specified here. |
| 265 | # |
| 266 | BUILDOPT *= $(BUILDOPTEXTRA) |
| 267 | |
| 268 | # |
| 269 | # This should normally be disabled. Enabling it will disable the File::Glob |
| 270 | # implementation of CORE::glob. |
| 271 | # |
| 272 | #BUILDOPT += -DPERL_EXTERNAL_GLOB |
| 273 | |
| 274 | # |
| 275 | # Perl needs to read scripts in text mode so that the DATA filehandle |
| 276 | # works correctly with seek() and tell(), or around auto-flushes of |
| 277 | # all filehandles (e.g. by system(), backticks, fork(), etc). |
| 278 | # |
| 279 | # The current version on the ByteLoader module on CPAN however only |
| 280 | # works if scripts are read in binary mode. But before you disable text |
| 281 | # mode script reading (and break some DATA filehandle functionality) |
| 282 | # please check first if an updated ByteLoader isn't available on CPAN. |
| 283 | # |
| 284 | BUILDOPT += -DPERL_TEXTMODE_SCRIPTS |
| 285 | |
| 286 | # |
| 287 | # specify semicolon-separated list of extra directories that modules will |
| 288 | # look for libraries (spaces in path names need not be quoted) |
| 289 | # |
| 290 | EXTRALIBDIRS *= |
| 291 | |
| 292 | # |
| 293 | # set this to point to cmd.exe (only needed if you use some |
| 294 | # alternate shell that doesn't grok cmd.exe style commands) |
| 295 | # |
| 296 | #SHELL *= g:\winnt\system32\cmd.exe |
| 297 | |
| 298 | # |
| 299 | # set this to your email address (perl will guess a value from |
| 300 | # from your loginname and your hostname, which may not be right) |
| 301 | # |
| 302 | #EMAIL *= |
| 303 | |
| 304 | ## |
| 305 | ## Build configuration ends. |
| 306 | ## |
| 307 | |
| 308 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### |
| 309 | |
| 310 | PERL_MALLOC *= undef |
| 311 | DEBUG_MSTATS *= undef |
| 312 | |
| 313 | USE_SITECUST *= undef |
| 314 | USE_MULTI *= undef |
| 315 | USE_ITHREADS *= undef |
| 316 | USE_IMP_SYS *= undef |
| 317 | USE_LARGE_FILES *= undef |
| 318 | USE_64_BIT_INT *= undef |
| 319 | USE_LONG_DOUBLE *= undef |
| 320 | USE_NO_REGISTRY *= undef |
| 321 | |
| 322 | .IF "$(USE_IMP_SYS)" == "define" |
| 323 | PERL_MALLOC = undef |
| 324 | .ENDIF |
| 325 | |
| 326 | .IF "$(PERL_MALLOC)" == "undef" |
| 327 | DEBUG_MSTATS = undef |
| 328 | .ENDIF |
| 329 | |
| 330 | .IF "$(DEBUG_MSTATS)" == "define" |
| 331 | BUILDOPT += -DPERL_DEBUGGING_MSTATS |
| 332 | .ENDIF |
| 333 | |
| 334 | .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef" |
| 335 | USE_MULTI != define |
| 336 | .ENDIF |
| 337 | |
| 338 | .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef" |
| 339 | USE_MULTI != define |
| 340 | .ENDIF |
| 341 | |
| 342 | .IF "$(USE_SITECUST)" == "define" |
| 343 | BUILDOPT += -DUSE_SITECUSTOMIZE |
| 344 | .ENDIF |
| 345 | |
| 346 | .IF "$(USE_MULTI)" != "undef" |
| 347 | BUILDOPT += -DPERL_IMPLICIT_CONTEXT |
| 348 | .ENDIF |
| 349 | |
| 350 | .IF "$(USE_IMP_SYS)" != "undef" |
| 351 | BUILDOPT += -DPERL_IMPLICIT_SYS |
| 352 | .ENDIF |
| 353 | |
| 354 | .IF "$(USE_NO_REGISTRY)" != "undef" |
| 355 | BUILDOPT += -DWIN32_NO_REGISTRY |
| 356 | .ENDIF |
| 357 | |
| 358 | PROCESSOR_ARCHITECTURE *= x86 |
| 359 | |
| 360 | .IF "$(WIN64)" == "undef" |
| 361 | PROCESSOR_ARCHITECTURE = x86 |
| 362 | .ENDIF |
| 363 | |
| 364 | .IF "$(WIN64)" == "" |
| 365 | # When we are running from a 32bit cmd.exe on AMD64 then |
| 366 | # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432 |
| 367 | # is set to AMD64 |
| 368 | .IF "$(PROCESSOR_ARCHITEW6432)" != "" |
| 369 | PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432) |
| 370 | WIN64 = define |
| 371 | .ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64" |
| 372 | WIN64 = define |
| 373 | .ELSE |
| 374 | WIN64 = undef |
| 375 | .ENDIF |
| 376 | .ENDIF |
| 377 | |
| 378 | .IF "$(WIN64)" == "define" |
| 379 | USE_64_BIT_INT = define |
| 380 | .ENDIF |
| 381 | |
| 382 | # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because |
| 383 | # both link against MSVCRT.dll (which is part of Windows itself) and |
| 384 | # not against a compiler specific versioned runtime. |
| 385 | .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60" |
| 386 | CCTYPE = SDK2003SP1 |
| 387 | .ENDIF |
| 388 | |
| 389 | # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler |
| 390 | # does not support it. |
| 391 | .IF "$(CCTYPE)" == "MSVC60" |
| 392 | USE_64_BIT_INT != undef |
| 393 | .ENDIF |
| 394 | |
| 395 | # Disable the long double option for MSVC builds since that compiler |
| 396 | # does not support it. |
| 397 | .IF "$(CCTYPE)" != "GCC" |
| 398 | USE_LONG_DOUBLE != undef |
| 399 | .ENDIF |
| 400 | |
| 401 | ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) |
| 402 | .IF "$(ARCHITECTURE)" == "AMD64" |
| 403 | ARCHITECTURE = x64 |
| 404 | .ENDIF |
| 405 | .IF "$(ARCHITECTURE)" == "IA64" |
| 406 | ARCHITECTURE = ia64 |
| 407 | .ENDIF |
| 408 | |
| 409 | .IF "$(USE_MULTI)" == "define" |
| 410 | ARCHNAME = MSWin32-$(ARCHITECTURE)-multi |
| 411 | .ELSE |
| 412 | ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio |
| 413 | .ENDIF |
| 414 | |
| 415 | .IF "$(USE_ITHREADS)" == "define" |
| 416 | ARCHNAME !:= $(ARCHNAME)-thread |
| 417 | .ENDIF |
| 418 | |
| 419 | .IF "$(WIN64)" != "define" |
| 420 | .IF "$(USE_64_BIT_INT)" == "define" |
| 421 | ARCHNAME !:= $(ARCHNAME)-64int |
| 422 | .ENDIF |
| 423 | .ENDIF |
| 424 | |
| 425 | .IF "$(USE_LONG_DOUBLE)" == "define" |
| 426 | ARCHNAME !:= $(ARCHNAME)-ld |
| 427 | .ENDIF |
| 428 | |
| 429 | ARCHDIR = ..\lib\$(ARCHNAME) |
| 430 | COREDIR = ..\lib\CORE |
| 431 | AUTODIR = ..\lib\auto |
| 432 | LIBDIR = ..\lib |
| 433 | EXTDIR = ..\ext |
| 434 | DISTDIR = ..\dist |
| 435 | CPANDIR = ..\cpan |
| 436 | PODDIR = ..\pod |
| 437 | HTMLDIR = .\html |
| 438 | |
| 439 | # |
| 440 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin |
| 441 | INST_BIN = $(INST_SCRIPT)$(INST_ARCH) |
| 442 | INST_LIB = $(INST_TOP)$(INST_VER)\lib |
| 443 | INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) |
| 444 | INST_COREDIR = $(INST_ARCHLIB)\CORE |
| 445 | INST_HTML = $(INST_TOP)$(INST_VER)\html |
| 446 | |
| 447 | # |
| 448 | # Programs to compile, build .lib files and link |
| 449 | # |
| 450 | |
| 451 | .USESHELL : |
| 452 | |
| 453 | MINIBUILDOPT *= |
| 454 | |
| 455 | .IF "$(CCTYPE)" == "GCC" |
| 456 | |
| 457 | .IF "$(GCCCROSS)" == "define" |
| 458 | ARCHPREFIX = x86_64-w64-mingw32- |
| 459 | .ENDIF |
| 460 | |
| 461 | CC = $(ARCHPREFIX)gcc |
| 462 | LINK32 = $(ARCHPREFIX)g++ |
| 463 | LIB32 = $(ARCHPREFIX)ar rc |
| 464 | IMPLIB = $(ARCHPREFIX)dlltool |
| 465 | RSC = $(ARCHPREFIX)windres |
| 466 | |
| 467 | .IF "$(USE_LONG_DOUBLE)" == "define" |
| 468 | BUILDOPT += -D__USE_MINGW_ANSI_STDIO |
| 469 | MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO |
| 470 | .ENDIF |
| 471 | |
| 472 | GCCWRAPV *= $(shell for /f "delims=. tokens=1,2,3" %i in ('$(CC) -dumpversion') do @if "%i"=="4" (if "%j" geq "3" echo define) else if "%i" geq "5" (echo define)) |
| 473 | |
| 474 | .IF "$(GCCWRAPV)" == "define" |
| 475 | BUILDOPT += -fwrapv |
| 476 | MINIBUILDOPT += -fwrapv |
| 477 | .ENDIF |
| 478 | |
| 479 | i = .i |
| 480 | o = .o |
| 481 | a = .a |
| 482 | |
| 483 | # |
| 484 | # Options |
| 485 | # |
| 486 | |
| 487 | INCLUDES = -I.\include -I. -I.. |
| 488 | DEFINES = -DWIN32 |
| 489 | .IF "$(WIN64)" == "define" |
| 490 | DEFINES += -DWIN64 -DCONSERVATIVE |
| 491 | .ENDIF |
| 492 | LOCDEFS = -DPERLDLL -DPERL_CORE |
| 493 | CXX_FLAG = -xc++ |
| 494 | |
| 495 | # Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link |
| 496 | # correctly if -lmsvcrt is specified explicitly. |
| 497 | LIBC = |
| 498 | #LIBC = -lmsvcrt |
| 499 | |
| 500 | # same libs as MSVC |
| 501 | LIBFILES = $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \ |
| 502 | -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \ |
| 503 | -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 |
| 504 | |
| 505 | .IF "$(CFG)" == "Debug" |
| 506 | OPTIMIZE = -g -O2 -DDEBUGGING |
| 507 | LINK_DBG = -g |
| 508 | .ELIF "$(CFG)" == "DebugSymbols" |
| 509 | OPTIMIZE = -g -O2 |
| 510 | LINK_DBG = -g |
| 511 | .ELSE |
| 512 | OPTIMIZE = -s -O2 |
| 513 | LINK_DBG = -s |
| 514 | .ENDIF |
| 515 | |
| 516 | EXTRACFLAGS = |
| 517 | .IF "$(USE_CPLUSPLUS)" == "define" |
| 518 | EXTRACFLAGS += $(CXX_FLAG) |
| 519 | .ENDIF |
| 520 | CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) |
| 521 | LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" |
| 522 | OBJOUT_FLAG = -o |
| 523 | EXEOUT_FLAG = -o |
| 524 | LIBOUT_FLAG = |
| 525 | PDBOUT = |
| 526 | |
| 527 | BUILDOPT += -fno-strict-aliasing -mms-bitfields |
| 528 | MINIBUILDOPT += -fno-strict-aliasing |
| 529 | |
| 530 | TESTPREPGCC = test-prep-gcc |
| 531 | |
| 532 | .ELSE |
| 533 | |
| 534 | # All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test |
| 535 | # suite run in about 10% less time. |
| 536 | .IF "$(CCTYPE)" != "MSVC70FREE" |
| 537 | # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA |
| 538 | # which is rare to execute |
| 539 | .IF "$(USE_NO_REGISTRY)" != "undef" |
| 540 | DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib |
| 541 | MINIDELAYLOAD = |
| 542 | .ELSE |
| 543 | DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib |
| 544 | #miniperl never does any registry lookups |
| 545 | MINIDELAYLOAD = -DELAYLOAD:advapi32.dll |
| 546 | .ENDIF |
| 547 | .ENDIF |
| 548 | |
| 549 | # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and |
| 550 | # DLLs. These either need copying everywhere with the binaries, or else need |
| 551 | # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For |
| 552 | # simplicity, embed them if they exist (and delete them afterwards so that they |
| 553 | # don't get installed too). |
| 554 | EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \ |
| 555 | if exist $@.manifest del $@.manifest |
| 556 | EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \ |
| 557 | if exist $@.manifest del $@.manifest |
| 558 | |
| 559 | # Most relevant compiler-specific options fall into two groups: |
| 560 | # either pre-MSVC80 or MSVC80 onwards, so define a macro for this. |
| 561 | .IF "$(CCTYPE)" == "MSVC60" || \ |
| 562 | "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE" |
| 563 | PREMSVC80 = define |
| 564 | .ELSE |
| 565 | PREMSVC80 = undef |
| 566 | .ENDIF |
| 567 | |
| 568 | .IF "$(__ICC)" != "define" |
| 569 | CC = cl |
| 570 | LINK32 = link |
| 571 | .ELSE |
| 572 | CC = icl |
| 573 | LINK32 = xilink |
| 574 | .ENDIF |
| 575 | LIB32 = $(LINK32) -lib |
| 576 | RSC = rc |
| 577 | |
| 578 | # |
| 579 | # Options |
| 580 | # |
| 581 | |
| 582 | INCLUDES = -I.\include -I. -I.. |
| 583 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX |
| 584 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT |
| 585 | LOCDEFS = -DPERLDLL -DPERL_CORE |
| 586 | CXX_FLAG = -TP -EHsc |
| 587 | |
| 588 | LIBC = msvcrt.lib |
| 589 | |
| 590 | .IF "$(CFG)" == "Debug" |
| 591 | OPTIMIZE = -Od -MD -Zi -DDEBUGGING |
| 592 | LINK_DBG = -debug |
| 593 | .ELIF "$(CFG)" == "DebugSymbols" |
| 594 | OPTIMIZE = -Od -MD -Zi |
| 595 | LINK_DBG = -debug |
| 596 | .ELIF "$(CFG)" == "DebugFull" |
| 597 | LIBC = msvcrtd.lib |
| 598 | OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING |
| 599 | LINK_DBG = -debug |
| 600 | .ELSE |
| 601 | # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64 |
| 602 | OPTIMIZE = -O1 -MD -Zi -DNDEBUG |
| 603 | # we enable debug symbols in release builds also |
| 604 | LINK_DBG = -debug -opt:ref,icf |
| 605 | # you may want to enable this if you want COFF symbols in the executables |
| 606 | # in addition to the PDB symbols. The default Dr. Watson that ships with |
| 607 | # Windows can use the the former but not latter. The free WinDbg can be |
| 608 | # installed to get better stack traces from just the PDB symbols, so we |
| 609 | # avoid the bloat of COFF symbols by default. |
| 610 | #LINK_DBG = $(LINK_DBG) -debugtype:both |
| 611 | .IF "$(CCTYPE)" != "MSVC60" |
| 612 | # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG) |
| 613 | OPTIMIZE += -GL |
| 614 | LINK_DBG += -ltcg |
| 615 | LIB_FLAGS = -ltcg |
| 616 | .ENDIF |
| 617 | .ENDIF |
| 618 | |
| 619 | .IF "$(WIN64)" == "define" |
| 620 | DEFINES += -DWIN64 -DCONSERVATIVE |
| 621 | OPTIMIZE += -fp:precise |
| 622 | .ENDIF |
| 623 | |
| 624 | # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions |
| 625 | # and POSIX CRT function names being deprecated. |
| 626 | .IF "$(PREMSVC80)" == "undef" |
| 627 | DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE |
| 628 | .ENDIF |
| 629 | |
| 630 | # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to |
| 631 | # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T |
| 632 | # preprocessor option to revert back to the old functionality for |
| 633 | # backward compatibility. We define this symbol here for older 32-bit |
| 634 | # compilers only (which aren't using it at all) for the sole purpose |
| 635 | # of getting it into $Config{ccflags}. That way if someone builds |
| 636 | # Perl itself with e.g. VC6 but later installs an XS module using VC8 |
| 637 | # the time_t types will still be compatible. |
| 638 | .IF "$(WIN64)" == "undef" |
| 639 | .IF "$(PREMSVC80)" == "define" |
| 640 | BUILDOPT += -D_USE_32BIT_TIME_T |
| 641 | .ENDIF |
| 642 | .ENDIF |
| 643 | |
| 644 | LIBBASEFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ |
| 645 | comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ |
| 646 | netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \ |
| 647 | odbc32.lib odbccp32.lib comctl32.lib |
| 648 | |
| 649 | # Avoid __intel_new_proc_init link error for libircmt. |
| 650 | # libmmd is /MD equivelent, other variants exist. |
| 651 | # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99, |
| 652 | # and optimized C89 funcs |
| 653 | .IF "$(__ICC)" == "define" |
| 654 | LIBBASEFILES += libircmt.lib libmmd.lib |
| 655 | .ENDIF |
| 656 | |
| 657 | # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which |
| 658 | # doesn't include the buffer overrun verification code used by the /GS switch. |
| 659 | # Since the code links against libraries that are compiled with /GS, this |
| 660 | # "security cookie verification" code must be included via bufferoverflow.lib. |
| 661 | .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1" |
| 662 | LIBBASEFILES += bufferoverflowU.lib |
| 663 | .ENDIF |
| 664 | |
| 665 | LIBFILES = $(LIBBASEFILES) $(LIBC) |
| 666 | |
| 667 | EXTRACFLAGS = -nologo -GF -W3 |
| 668 | .IF "$(__ICC)" == "define" |
| 669 | EXTRACFLAGS += -Qstd=c99 |
| 670 | .ENDIF |
| 671 | .IF "$(USE_CPLUSPLUS)" == "define" |
| 672 | EXTRACFLAGS += $(CXX_FLAG) |
| 673 | .ENDIF |
| 674 | CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
| 675 | $(PCHFLAGS) $(OPTIMIZE) |
| 676 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ |
| 677 | -libpath:"$(INST_COREDIR)" \ |
| 678 | -machine:$(PROCESSOR_ARCHITECTURE) |
| 679 | LIB_FLAGS += -nologo |
| 680 | OBJOUT_FLAG = -Fo |
| 681 | EXEOUT_FLAG = -Fe |
| 682 | LIBOUT_FLAG = /out: |
| 683 | PDBOUT = -Fd$*.pdb |
| 684 | TESTPREPGCC = |
| 685 | |
| 686 | .ENDIF |
| 687 | |
| 688 | CFLAGS_O = $(CFLAGS) $(BUILDOPT) |
| 689 | |
| 690 | .IF "$(PREMSVC80)" == "undef" |
| 691 | LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" |
| 692 | .ELSE |
| 693 | RSC_FLAGS = -DINCLUDE_MANIFEST |
| 694 | .ENDIF |
| 695 | |
| 696 | |
| 697 | # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm |
| 698 | # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building |
| 699 | # Console vs GUI makes no difference for DLLs, so use default for cleaner |
| 700 | # building cmd lines |
| 701 | .IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC120FREE" \ |
| 702 | || "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC140FREE" |
| 703 | .IF "$(WIN64)" == "define" |
| 704 | LINK_FLAGS += -subsystem:console,"5.02" |
| 705 | .ELSE |
| 706 | LINK_FLAGS += -subsystem:console,"5.01" |
| 707 | .ENDIF |
| 708 | PRIV_LINK_FLAGS = |
| 709 | |
| 710 | .ELIF "$(CCTYPE)" != "GCC" |
| 711 | PRIV_LINK_FLAGS = -subsystem:console |
| 712 | .ENDIF |
| 713 | |
| 714 | BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) |
| 715 | |
| 716 | #################### do not edit below this line ####################### |
| 717 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## |
| 718 | |
| 719 | # Some old dmakes (including Sarathy's one at |
| 720 | # http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip) |
| 721 | # don't support logical OR (||) or logical AND (&&) in conditional |
| 722 | # expressions and hence don't process this makefile correctly. Determine |
| 723 | # whether this is the case so that we can give the user an error message. |
| 724 | .IF 1 == 1 || 1 == 1 |
| 725 | NEWDMAKE = define |
| 726 | .ELSE |
| 727 | NEWDMAKE = undef |
| 728 | .ENDIF |
| 729 | |
| 730 | o *= .obj |
| 731 | a *= .lib |
| 732 | |
| 733 | LKPRE = INPUT ( |
| 734 | LKPOST = ) |
| 735 | |
| 736 | # |
| 737 | # Rules |
| 738 | # |
| 739 | |
| 740 | .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res |
| 741 | |
| 742 | .c$(o): |
| 743 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) $< |
| 744 | |
| 745 | .c.i: |
| 746 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@ |
| 747 | |
| 748 | .y.c: |
| 749 | $(NOOP) |
| 750 | |
| 751 | $(o).dll: |
| 752 | .IF "$(CCTYPE)" == "GCC" |
| 753 | $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES) |
| 754 | $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@ |
| 755 | .ELSE |
| 756 | $(LINK32) -dll -implib:$(*B).lib -def:$(*B).def \ |
| 757 | -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL) |
| 758 | $(EMBED_DLL_MANI) |
| 759 | .ENDIF |
| 760 | |
| 761 | .rc.res: |
| 762 | .IF "$(CCTYPE)" == "GCC" |
| 763 | $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@ |
| 764 | .ELSE |
| 765 | $(RSC) -i.. -DINCLUDE_MANIFEST $< |
| 766 | .ENDIF |
| 767 | |
| 768 | # |
| 769 | # various targets |
| 770 | |
| 771 | #do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL) |
| 772 | #$(MINIPERL) is not a buildable target, use "dmake mp" if you want to just build |
| 773 | #miniperl alone |
| 774 | MINIPERL = ..\miniperl.exe |
| 775 | HAVEMINIPERL = ..\lib\buildcustomize.pl |
| 776 | MINIDIR = .\mini |
| 777 | PERLEXE = ..\perl.exe |
| 778 | WPERLEXE = ..\wperl.exe |
| 779 | PERLEXESTATIC = ..\perl-static.exe |
| 780 | STATICDIR = .\static.tmp |
| 781 | GLOBEXE = ..\perlglob.exe |
| 782 | CONFIGPM = ..\lib\Config.pm |
| 783 | GENUUDMAP = ..\generate_uudmap.exe |
| 784 | .IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define" |
| 785 | PERLSTATIC = static |
| 786 | .ELSE |
| 787 | PERLSTATIC = |
| 788 | .ENDIF |
| 789 | |
| 790 | # Unicode data files generated by mktables |
| 791 | UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \ |
| 792 | ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \ |
| 793 | ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \ |
| 794 | ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst |
| 795 | |
| 796 | # Directories of Unicode data files generated by mktables |
| 797 | UNIDATADIR1 = ..\lib\unicore\To |
| 798 | UNIDATADIR2 = ..\lib\unicore\lib |
| 799 | |
| 800 | PERLEXE_MANIFEST= .\perlexe.manifest |
| 801 | PERLEXE_ICO = .\perlexe.ico |
| 802 | PERLEXE_RES = .\perlexe.res |
| 803 | PERLDLL_RES = |
| 804 | |
| 805 | # Nominate a target which causes extensions to be re-built |
| 806 | # This used to be $(PERLEXE), but at worst it is the .dll that they depend |
| 807 | # on and really only the interface - i.e. the .def file used to export symbols |
| 808 | # from the .dll |
| 809 | PERLDEP = $(PERLIMPLIB) |
| 810 | |
| 811 | |
| 812 | PL2BAT = bin\pl2bat.pl |
| 813 | |
| 814 | UTILS = \ |
| 815 | ..\utils\h2ph \ |
| 816 | ..\utils\splain \ |
| 817 | ..\utils\perlbug \ |
| 818 | ..\utils\pl2pm \ |
| 819 | ..\utils\c2ph \ |
| 820 | ..\utils\pstruct \ |
| 821 | ..\utils\h2xs \ |
| 822 | ..\utils\perldoc \ |
| 823 | ..\utils\perlivp \ |
| 824 | ..\utils\libnetcfg \ |
| 825 | ..\utils\enc2xs \ |
| 826 | ..\utils\encguess \ |
| 827 | ..\utils\piconv \ |
| 828 | ..\utils\corelist \ |
| 829 | ..\utils\cpan \ |
| 830 | ..\utils\xsubpp \ |
| 831 | ..\utils\pod2html \ |
| 832 | ..\utils\prove \ |
| 833 | ..\utils\ptar \ |
| 834 | ..\utils\ptardiff \ |
| 835 | ..\utils\ptargrep \ |
| 836 | ..\utils\zipdetails \ |
| 837 | ..\utils\shasum \ |
| 838 | ..\utils\instmodsh \ |
| 839 | ..\utils\json_pp \ |
| 840 | bin\exetype.pl \ |
| 841 | bin\runperl.pl \ |
| 842 | bin\pl2bat.pl \ |
| 843 | bin\perlglob.pl \ |
| 844 | bin\search.pl |
| 845 | |
| 846 | .IF "$(CCTYPE)" == "GCC" |
| 847 | |
| 848 | CFGSH_TMPL = config.gc |
| 849 | CFGH_TMPL = config_H.gc |
| 850 | PERLIMPLIB = ..\libperl523$(a) |
| 851 | PERLSTATICLIB = ..\libperl523s$(a) |
| 852 | INT64 = long long |
| 853 | |
| 854 | .ELSE |
| 855 | |
| 856 | CFGSH_TMPL = config.vc |
| 857 | CFGH_TMPL = config_H.vc |
| 858 | INT64 = __int64 |
| 859 | |
| 860 | .ENDIF |
| 861 | |
| 862 | # makedef.pl must be updated if this changes, and this should normally |
| 863 | # only change when there is an incompatible revision of the public API. |
| 864 | PERLIMPLIB *= ..\perl523$(a) |
| 865 | PERLEXPLIB *= ..\perl523.exp |
| 866 | PERLSTATICLIB *= ..\perl523s$(a) |
| 867 | PERLDLL = ..\perl523.dll |
| 868 | |
| 869 | #EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel |
| 870 | #$(MAKE) will contain the -P that this makefile was called with, which is bad for |
| 871 | #make_ext.pl since upto jobs*jobs processes will run instead of jobs |
| 872 | #also any recipie containing $(MAKE) is special cased by dmake to execute recipes |
| 873 | #containing $(MAKE) when "dmake -n" is executed, which causes recursive calls |
| 874 | #to dmake, which means "dmake -n" is then broken as a diagnostic tool since |
| 875 | #"dmake -n" will invoke all the make_ext.pl scripts build things instead of |
| 876 | #showing what to build since $(MAKE) is an arg to make_ext.pl, not an invocation |
| 877 | #of the dmake process |
| 878 | PLMAKE = dmake |
| 879 | |
| 880 | XCOPY = xcopy /f /r /i /d /y |
| 881 | RCOPY = xcopy /f /r /i /e /d /y |
| 882 | NOOP = @rem |
| 883 | |
| 884 | #first ones are arrange in compile time order for faster parallel building |
| 885 | #see #123867 for details |
| 886 | MICROCORE_SRC = \ |
| 887 | ..\toke.c \ |
| 888 | ..\regcomp.c \ |
| 889 | ..\regexec.c \ |
| 890 | ..\op.c \ |
| 891 | ..\sv.c \ |
| 892 | ..\pp.c \ |
| 893 | ..\pp_ctl.c \ |
| 894 | ..\pp_sys.c \ |
| 895 | ..\pp_pack.c \ |
| 896 | ..\pp_hot.c \ |
| 897 | ..\gv.c \ |
| 898 | ..\perl.c \ |
| 899 | ..\utf8.c \ |
| 900 | ..\dump.c \ |
| 901 | ..\hv.c \ |
| 902 | ..\av.c \ |
| 903 | ..\caretx.c \ |
| 904 | ..\deb.c \ |
| 905 | ..\doio.c \ |
| 906 | ..\doop.c \ |
| 907 | ..\dquote.c \ |
| 908 | ..\globals.c \ |
| 909 | ..\mro_core.c \ |
| 910 | ..\locale.c \ |
| 911 | ..\keywords.c \ |
| 912 | ..\mathoms.c \ |
| 913 | ..\mg.c \ |
| 914 | ..\numeric.c \ |
| 915 | ..\pad.c \ |
| 916 | ..\perlapi.c \ |
| 917 | ..\perly.c \ |
| 918 | ..\pp_sort.c \ |
| 919 | ..\reentr.c \ |
| 920 | ..\run.c \ |
| 921 | ..\scope.c \ |
| 922 | ..\taint.c \ |
| 923 | ..\time64.c \ |
| 924 | ..\universal.c \ |
| 925 | ..\util.c |
| 926 | |
| 927 | EXTRACORE_SRC += perllib.c |
| 928 | |
| 929 | .IF "$(PERL_MALLOC)" == "define" |
| 930 | EXTRACORE_SRC += ..\malloc.c |
| 931 | .ENDIF |
| 932 | |
| 933 | EXTRACORE_SRC += ..\perlio.c |
| 934 | |
| 935 | WIN32_SRC = \ |
| 936 | .\win32.c \ |
| 937 | .\win32io.c \ |
| 938 | .\win32sck.c \ |
| 939 | .\win32thread.c \ |
| 940 | .\fcrypt.c |
| 941 | |
| 942 | CORE_NOCFG_H = \ |
| 943 | ..\av.h \ |
| 944 | ..\cop.h \ |
| 945 | ..\cv.h \ |
| 946 | ..\dosish.h \ |
| 947 | ..\embed.h \ |
| 948 | ..\form.h \ |
| 949 | ..\gv.h \ |
| 950 | ..\handy.h \ |
| 951 | ..\hv.h \ |
| 952 | ..\hv_func.h \ |
| 953 | ..\iperlsys.h \ |
| 954 | ..\mg.h \ |
| 955 | ..\nostdio.h \ |
| 956 | ..\op.h \ |
| 957 | ..\opcode.h \ |
| 958 | ..\perl.h \ |
| 959 | ..\perlapi.h \ |
| 960 | ..\perlsdio.h \ |
| 961 | ..\perly.h \ |
| 962 | ..\pp.h \ |
| 963 | ..\proto.h \ |
| 964 | ..\regcomp.h \ |
| 965 | ..\regexp.h \ |
| 966 | ..\scope.h \ |
| 967 | ..\sv.h \ |
| 968 | ..\thread.h \ |
| 969 | ..\unixish.h \ |
| 970 | ..\utf8.h \ |
| 971 | ..\util.h \ |
| 972 | ..\warnings.h \ |
| 973 | ..\XSUB.h \ |
| 974 | ..\EXTERN.h \ |
| 975 | ..\perlvars.h \ |
| 976 | ..\intrpvar.h \ |
| 977 | .\include\dirent.h \ |
| 978 | .\include\netdb.h \ |
| 979 | .\include\sys\errno2.h \ |
| 980 | .\include\sys\socket.h \ |
| 981 | .\win32.h |
| 982 | |
| 983 | CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h |
| 984 | |
| 985 | UUDMAP_H = ..\uudmap.h |
| 986 | BITCOUNT_H = ..\bitcount.h |
| 987 | MG_DATA_H = ..\mg_data.h |
| 988 | GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H) |
| 989 | #a stub ppport.h must be generated so building XS modules, .c->.obj wise, will |
| 990 | #work, so this target also represents creating the COREDIR and filling it |
| 991 | HAVE_COREDIR = $(COREDIR)\ppport.h |
| 992 | |
| 993 | |
| 994 | MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o)) |
| 995 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o)) |
| 996 | WIN32_OBJ = $(WIN32_SRC:db:+$(o)) |
| 997 | MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)} |
| 998 | MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)} |
| 999 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) |
| 1000 | DLL_OBJ = $(DYNALOADER) |
| 1001 | |
| 1002 | PERLDLL_OBJ = $(CORE_OBJ) |
| 1003 | PERLEXE_OBJ = perlmain$(o) |
| 1004 | PERLEXEST_OBJ = perlmainst$(o) |
| 1005 | |
| 1006 | PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ) |
| 1007 | |
| 1008 | .IF "$(USE_SETARGV)" != "" |
| 1009 | SETARGV_OBJ = setargv$(o) |
| 1010 | .ENDIF |
| 1011 | |
| 1012 | .IF "$(ALL_STATIC)" == "define" |
| 1013 | # some exclusions, unfortunately, until fixed: |
| 1014 | # - MakeMaker isn't capable enough for SDBM_File (small bug) |
| 1015 | STATIC_EXT = * !SDBM_File |
| 1016 | .ELSE |
| 1017 | # specify static extensions here, for example: |
| 1018 | # (be sure to include Win32CORE to load Win32 on demand) |
| 1019 | #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib |
| 1020 | STATIC_EXT = Win32CORE |
| 1021 | .ENDIF |
| 1022 | |
| 1023 | DYNALOADER = ..\DynaLoader$(o) |
| 1024 | |
| 1025 | # vars must be separated by "\t+~\t+", since we're using the tempfile |
| 1026 | # version of config_sh.pl (we were overflowing someone's buffer by |
| 1027 | # trying to fit them all on the command line) |
| 1028 | # -- BKS 10-17-1999 |
| 1029 | CFG_VARS = \ |
| 1030 | INST_TOP=$(INST_TOP) ~ \ |
| 1031 | INST_VER=$(INST_VER) ~ \ |
| 1032 | INST_ARCH=$(INST_ARCH) ~ \ |
| 1033 | archname=$(ARCHNAME) ~ \ |
| 1034 | cc=$(CC) ~ \ |
| 1035 | ld=$(LINK32) ~ \ |
| 1036 | ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \ |
| 1037 | usecplusplus=$(USE_CPLUSPLUS) ~ \ |
| 1038 | cf_email=$(EMAIL) ~ \ |
| 1039 | d_mymalloc=$(PERL_MALLOC) ~ \ |
| 1040 | libs=$(LIBFILES:f) ~ \ |
| 1041 | incpath=$(CCINCDIR) ~ \ |
| 1042 | libperl=$(PERLIMPLIB:f) ~ \ |
| 1043 | libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \ |
| 1044 | libc=$(LIBC) ~ \ |
| 1045 | make=$(PLMAKE) ~ \ |
| 1046 | _o=$(o) ~ \ |
| 1047 | obj_ext=$(o) ~ \ |
| 1048 | _a=$(a) ~ \ |
| 1049 | lib_ext=$(a) ~ \ |
| 1050 | static_ext=$(STATIC_EXT) ~ \ |
| 1051 | usethreads=$(USE_ITHREADS) ~ \ |
| 1052 | useithreads=$(USE_ITHREADS) ~ \ |
| 1053 | usemultiplicity=$(USE_MULTI) ~ \ |
| 1054 | use64bitint=$(USE_64_BIT_INT) ~ \ |
| 1055 | uselongdouble=$(USE_LONG_DOUBLE) ~ \ |
| 1056 | uselargefiles=$(USE_LARGE_FILES) ~ \ |
| 1057 | usesitecustomize=$(USE_SITECUST) ~ \ |
| 1058 | LINK_FLAGS=$(LINK_FLAGS) ~ \ |
| 1059 | optimize=$(OPTIMIZE) ~ \ |
| 1060 | ARCHPREFIX=$(ARCHPREFIX) ~ \ |
| 1061 | WIN64=$(WIN64) |
| 1062 | |
| 1063 | # |
| 1064 | # Top targets |
| 1065 | # |
| 1066 | |
| 1067 | all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC) |
| 1068 | |
| 1069 | ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h |
| 1070 | |
| 1071 | ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h |
| 1072 | |
| 1073 | reonly : ..\regnodes.h $(UNIDATAFILES) Extensions_reonly |
| 1074 | |
| 1075 | static: $(PERLEXESTATIC) |
| 1076 | |
| 1077 | #---------------------------------------------------------------- |
| 1078 | |
| 1079 | CHECKDMAKE : |
| 1080 | .IF "$(NEWDMAKE)" == "define" |
| 1081 | $(NOOP) |
| 1082 | .ELSE |
| 1083 | @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions. |
| 1084 | @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/ |
| 1085 | @exit 1 |
| 1086 | .ENDIF |
| 1087 | |
| 1088 | $(GLOBEXE) : perlglob.c |
| 1089 | .IF "$(CCTYPE)" == "GCC" |
| 1090 | $(LINK32) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES) |
| 1091 | .ELSE |
| 1092 | $(CC) $(OPTIMIZE) -Fe$@ perlglob.c -link $(BLINK_FLAGS) setargv$(o) \ |
| 1093 | $(LIBFILES) && $(EMBED_EXE_MANI) |
| 1094 | .ENDIF |
| 1095 | |
| 1096 | |
| 1097 | ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl |
| 1098 | cd .. && miniperl -Ilib make_patchnum.pl |
| 1099 | |
| 1100 | # make sure that we recompile perl.c if the git version changes |
| 1101 | ..\perl$(o) : ..\git_version.h |
| 1102 | |
| 1103 | ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL) |
| 1104 | $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \ |
| 1105 | $(mktmp $(CFG_VARS)) $(CFGSH_TMPL) > ..\config.sh |
| 1106 | |
| 1107 | # This target is for when changes to the main config.sh happen. |
| 1108 | # Edit config.gc, then make perl using GCC in a minimal configuration (i.e. |
| 1109 | # with MULTI, ITHREADS, IMP_SYS and LARGE_FILES off), then make |
| 1110 | # this target to regenerate config_H.gc. |
| 1111 | regen_config_h: |
| 1112 | $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \ |
| 1113 | $(CFGSH_TMPL) > ..\config.sh |
| 1114 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
| 1115 | -del /f $(CFGH_TMPL) |
| 1116 | -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" |
| 1117 | rename config.h $(CFGH_TMPL) |
| 1118 | |
| 1119 | $(CONFIGPM): ..\config.sh config_h.PL |
| 1120 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
| 1121 | $(XCOPY) config.h $(COREDIR)\*.* |
| 1122 | -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" |
| 1123 | |
| 1124 | .\config.h : $(CONFIGPM) |
| 1125 | |
| 1126 | # See the comment in Makefile.SH explaining this seemingly cranky ordering |
| 1127 | ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl |
| 1128 | .IF "$(CCTYPE)" == "GCC" |
| 1129 | $(LINK32) -v -mconsole -o $(MINIPERL) $(BLINK_FLAGS) \ |
| 1130 | $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST)) |
| 1131 | .ELSE |
| 1132 | $(LINK32) -out:$(MINIPERL) $(BLINK_FLAGS) \ |
| 1133 | @$(mktmp $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)) |
| 1134 | $(EMBED_EXE_MANI:s/$@/$(MINIPERL)/) |
| 1135 | .ENDIF |
| 1136 | $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl .. |
| 1137 | |
| 1138 | #convinence target, get a working miniperl |
| 1139 | mp : $(CONFIGPM) |
| 1140 | |
| 1141 | $(MINIDIR)\.exists : $(CFGH_TMPL) |
| 1142 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" |
| 1143 | # |
| 1144 | # Copy the template config.h and set configurables at the end of it |
| 1145 | # as per the options chosen and compiler used. |
| 1146 | # Note: This config.h is only used to build miniperl.exe anyway, but |
| 1147 | # it's as well to have its options correct to be sure that it builds |
| 1148 | # and so that it's "-V" options are correct for use by makedef.pl. The |
| 1149 | # real config.h used to build perl.exe is generated from the top-level |
| 1150 | # config_h.SH by config_h.PL (run by miniperl.exe). |
| 1151 | # |
| 1152 | # MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd |
| 1153 | # config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ). |
| 1154 | -if exist config.h del /f config.h |
| 1155 | copy $(CFGH_TMPL) config.h |
| 1156 | @(echo.&& \ |
| 1157 | echo #ifndef _config_h_footer_&& \ |
| 1158 | echo #define _config_h_footer_&& \ |
| 1159 | echo #undef Off_t&& \ |
| 1160 | echo #undef LSEEKSIZE&& \ |
| 1161 | echo #undef Off_t_size&& \ |
| 1162 | echo #undef PTRSIZE&& \ |
| 1163 | echo #undef SSize_t&& \ |
| 1164 | echo #undef HAS_ATOLL&& \ |
| 1165 | echo #undef HAS_STRTOLL&& \ |
| 1166 | echo #undef HAS_STRTOULL&& \ |
| 1167 | echo #undef Size_t_size&& \ |
| 1168 | echo #undef IVTYPE&& \ |
| 1169 | echo #undef UVTYPE&& \ |
| 1170 | echo #undef IVSIZE&& \ |
| 1171 | echo #undef UVSIZE&& \ |
| 1172 | echo #undef NV_PRESERVES_UV&& \ |
| 1173 | echo #undef NV_PRESERVES_UV_BITS&& \ |
| 1174 | echo #undef IVdf&& \ |
| 1175 | echo #undef UVuf&& \ |
| 1176 | echo #undef UVof&& \ |
| 1177 | echo #undef UVxf&& \ |
| 1178 | echo #undef UVXf&& \ |
| 1179 | echo #undef USE_64_BIT_INT&& \ |
| 1180 | echo #undef Gconvert&& \ |
| 1181 | echo #undef HAS_FREXPL&& \ |
| 1182 | echo #undef HAS_ISNANL&& \ |
| 1183 | echo #undef HAS_MODFL&& \ |
| 1184 | echo #undef HAS_MODFL_PROTO&& \ |
| 1185 | echo #undef HAS_SQRTL&& \ |
| 1186 | echo #undef HAS_STRTOLD&& \ |
| 1187 | echo #undef PERL_PRIfldbl&& \ |
| 1188 | echo #undef PERL_PRIgldbl&& \ |
| 1189 | echo #undef PERL_PRIeldbl&& \ |
| 1190 | echo #undef PERL_SCNfldbl&& \ |
| 1191 | echo #undef NVTYPE&& \ |
| 1192 | echo #undef NVSIZE&& \ |
| 1193 | echo #undef LONG_DOUBLESIZE&& \ |
| 1194 | echo #undef NV_OVERFLOWS_INTEGERS_AT&& \ |
| 1195 | echo #undef NVef&& \ |
| 1196 | echo #undef NVff&& \ |
| 1197 | echo #undef NVgf&& \ |
| 1198 | echo #undef USE_LONG_DOUBLE&& \ |
| 1199 | echo #undef USE_CPLUSPLUS)>> config.h |
| 1200 | .IF "$(USE_LARGE_FILES)"=="define" |
| 1201 | @(echo #define Off_t $(INT64)&& \ |
| 1202 | echo #define LSEEKSIZE ^8&& \ |
| 1203 | echo #define Off_t_size ^8)>> config.h |
| 1204 | .ELSE |
| 1205 | @(echo #define Off_t long&& \ |
| 1206 | echo #define LSEEKSIZE ^4&& \ |
| 1207 | echo #define Off_t_size ^4)>> config.h |
| 1208 | .ENDIF |
| 1209 | .IF "$(WIN64)"=="define" |
| 1210 | @(echo #define PTRSIZE ^8&& \ |
| 1211 | echo #define SSize_t $(INT64)&& \ |
| 1212 | echo #define HAS_ATOLL&& \ |
| 1213 | echo #define HAS_STRTOLL&& \ |
| 1214 | echo #define HAS_STRTOULL&& \ |
| 1215 | echo #define Size_t_size ^8)>> config.h |
| 1216 | .ELSE |
| 1217 | @(echo #define PTRSIZE ^4&& \ |
| 1218 | echo #define SSize_t int&& \ |
| 1219 | echo #undef HAS_ATOLL&& \ |
| 1220 | echo #undef HAS_STRTOLL&& \ |
| 1221 | echo #undef HAS_STRTOULL&& \ |
| 1222 | echo #define Size_t_size ^4)>> config.h |
| 1223 | .ENDIF |
| 1224 | .IF "$(USE_64_BIT_INT)"=="define" |
| 1225 | @(echo #define IVTYPE $(INT64)&& \ |
| 1226 | echo #define UVTYPE unsigned $(INT64)&& \ |
| 1227 | echo #define IVSIZE ^8&& \ |
| 1228 | echo #define UVSIZE ^8)>> config.h |
| 1229 | .IF "$(USE_LONG_DOUBLE)"=="define" |
| 1230 | @(echo #define NV_PRESERVES_UV&& \ |
| 1231 | echo #define NV_PRESERVES_UV_BITS 64)>> config.h |
| 1232 | .ELSE |
| 1233 | @(echo #undef NV_PRESERVES_UV&& \ |
| 1234 | echo #define NV_PRESERVES_UV_BITS 53)>> config.h |
| 1235 | .ENDIF |
| 1236 | @(echo #define IVdf "I64d"&& \ |
| 1237 | echo #define UVuf "I64u"&& \ |
| 1238 | echo #define UVof "I64o"&& \ |
| 1239 | echo #define UVxf "I64x"&& \ |
| 1240 | echo #define UVXf "I64X"&& \ |
| 1241 | echo #define USE_64_BIT_INT)>> config.h |
| 1242 | .ELSE |
| 1243 | @(echo #define IVTYPE long&& \ |
| 1244 | echo #define UVTYPE unsigned long&& \ |
| 1245 | echo #define IVSIZE ^4&& \ |
| 1246 | echo #define UVSIZE ^4&& \ |
| 1247 | echo #define NV_PRESERVES_UV&& \ |
| 1248 | echo #define NV_PRESERVES_UV_BITS 32&& \ |
| 1249 | echo #define IVdf "ld"&& \ |
| 1250 | echo #define UVuf "lu"&& \ |
| 1251 | echo #define UVof "lo"&& \ |
| 1252 | echo #define UVxf "lx"&& \ |
| 1253 | echo #define UVXf "lX"&& \ |
| 1254 | echo #undef USE_64_BIT_INT)>> config.h |
| 1255 | .ENDIF |
| 1256 | .IF "$(USE_LONG_DOUBLE)"=="define" |
| 1257 | @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%.*""Lg",^(n^),^(x^)^)&& \ |
| 1258 | echo #define HAS_FREXPL&& \ |
| 1259 | echo #define HAS_ISNANL&& \ |
| 1260 | echo #define HAS_MODFL&& \ |
| 1261 | echo #define HAS_MODFL_PROTO&& \ |
| 1262 | echo #define HAS_SQRTL&& \ |
| 1263 | echo #define HAS_STRTOLD&& \ |
| 1264 | echo #define PERL_PRIfldbl "Lf"&& \ |
| 1265 | echo #define PERL_PRIgldbl "Lg"&& \ |
| 1266 | echo #define PERL_PRIeldbl "Le"&& \ |
| 1267 | echo #define PERL_SCNfldbl "Lf"&& \ |
| 1268 | echo #define NVTYPE long double)>> config.h |
| 1269 | .IF "$(WIN64)"=="define" |
| 1270 | @(echo #define NVSIZE ^16&& \ |
| 1271 | echo #define LONG_DOUBLESIZE ^16)>> config.h |
| 1272 | .ELSE |
| 1273 | @(echo #define NVSIZE ^12&& \ |
| 1274 | echo #define LONG_DOUBLESIZE ^12)>> config.h |
| 1275 | .ENDIF |
| 1276 | @(echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0&& \ |
| 1277 | echo #define NVef "Le"&& \ |
| 1278 | echo #define NVff "Lf"&& \ |
| 1279 | echo #define NVgf "Lg"&& \ |
| 1280 | echo #define USE_LONG_DOUBLE)>> config.h |
| 1281 | .ELSE |
| 1282 | @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%.*g",^(n^),^(x^)^)&& \ |
| 1283 | echo #undef HAS_FREXPL&& \ |
| 1284 | echo #undef HAS_ISNANL&& \ |
| 1285 | echo #undef HAS_MODFL&& \ |
| 1286 | echo #undef HAS_MODFL_PROTO&& \ |
| 1287 | echo #undef HAS_SQRTL&& \ |
| 1288 | echo #undef HAS_STRTOLD&& \ |
| 1289 | echo #undef PERL_PRIfldbl&& \ |
| 1290 | echo #undef PERL_PRIgldbl&& \ |
| 1291 | echo #undef PERL_PRIeldbl&& \ |
| 1292 | echo #undef PERL_SCNfldbl&& \ |
| 1293 | echo #define NVTYPE double&& \ |
| 1294 | echo #define NVSIZE ^8&& \ |
| 1295 | echo #define LONG_DOUBLESIZE ^8&& \ |
| 1296 | echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0&& \ |
| 1297 | echo #define NVef "e"&& \ |
| 1298 | echo #define NVff "f"&& \ |
| 1299 | echo #define NVgf "g"&& \ |
| 1300 | echo #undef USE_LONG_DOUBLE)>> config.h |
| 1301 | .ENDIF |
| 1302 | .IF "$(USE_CPLUSPLUS)"=="define" |
| 1303 | @(echo #define USE_CPLUSPLUS&& \ |
| 1304 | echo #endif)>> config.h |
| 1305 | .ELSE |
| 1306 | @(echo #undef USE_CPLUSPLUS&& \ |
| 1307 | echo #endif)>> config.h |
| 1308 | .ENDIF |
| 1309 | #separate line since this is sentinal that this target is done |
| 1310 | rem. > $(MINIDIR)\.exists |
| 1311 | |
| 1312 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) |
| 1313 | $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*B).c |
| 1314 | |
| 1315 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) |
| 1316 | $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*B).c |
| 1317 | |
| 1318 | # -DPERL_IMPLICIT_SYS needs C++ for perllib.c |
| 1319 | # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless |
| 1320 | # unless the .IF is true), so instead we use a .ELSE with the default. |
| 1321 | # This is the only file that depends on perlhost.h, vmem.h, and vdir.h |
| 1322 | |
| 1323 | perllib$(o) : perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h |
| 1324 | .IF "$(USE_IMP_SYS)" == "define" |
| 1325 | $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c |
| 1326 | .ELSE |
| 1327 | $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c |
| 1328 | .ENDIF |
| 1329 | |
| 1330 | # 1. we don't want to rebuild miniperl.exe when config.h changes |
| 1331 | # 2. we don't want to rebuild miniperl.exe with non-default config.h |
| 1332 | # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it |
| 1333 | $(MINI_OBJ) : $(MINIDIR)\.exists $(CORE_NOCFG_H) |
| 1334 | |
| 1335 | $(WIN32_OBJ) : $(CORE_H) |
| 1336 | |
| 1337 | $(CORE_OBJ) : $(CORE_H) |
| 1338 | |
| 1339 | $(DLL_OBJ) : $(CORE_H) |
| 1340 | |
| 1341 | |
| 1342 | perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl |
| 1343 | $(MINIPERL) -I..\lib create_perllibst_h.pl |
| 1344 | |
| 1345 | perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl |
| 1346 | $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \ |
| 1347 | $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def |
| 1348 | |
| 1349 | $(PERLIMPLIB) : perldll.def |
| 1350 | .IF "$(CCTYPE)" == "GCC" |
| 1351 | $(IMPLIB) -k -d perldll.def -l $(PERLIMPLIB) |
| 1352 | .ELSE #VC family |
| 1353 | lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB) |
| 1354 | .ENDIF |
| 1355 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) |
| 1356 | |
| 1357 | #PERLEXPLIB is built in PERLIMPLIB |
| 1358 | $(PERLEXPLIB): $(PERLIMPLIB) |
| 1359 | |
| 1360 | $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static |
| 1361 | .IF "$(CCTYPE)" == "GCC" |
| 1362 | $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \ |
| 1363 | $(mktmp $(LKPRE) $(PERLDLL_OBJ) \ |
| 1364 | $(shell @type Extensions_static) \ |
| 1365 | $(LIBFILES) $(LKPOST)) |
| 1366 | $(IMPLIB) --output-lib $(PERLIMPLIB) \ |
| 1367 | --dllname $(PERLDLL:b).dll \ |
| 1368 | --def perldll.def \ |
| 1369 | --base-file perl.base \ |
| 1370 | --output-exp perl.exp |
| 1371 | $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \ |
| 1372 | $(mktmp $(LKPRE) $(PERLDLL_OBJ) \ |
| 1373 | $(shell @type Extensions_static) \ |
| 1374 | $(LIBFILES) perl.exp $(LKPOST)) |
| 1375 | .ELSE |
| 1376 | $(LINK32) -dll -out:$@ $(BLINK_FLAGS) \ |
| 1377 | @Extensions_static \ |
| 1378 | @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \ |
| 1379 | $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB)) |
| 1380 | $(EMBED_DLL_MANI) |
| 1381 | .ENDIF |
| 1382 | |
| 1383 | $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static |
| 1384 | .IF "$(CCTYPE)" == "GCC" |
| 1385 | $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ) |
| 1386 | if exist $(STATICDIR) rmdir /s /q $(STATICDIR) |
| 1387 | for %i in ($(shell @type Extensions_static)) do \ |
| 1388 | @mkdir $(STATICDIR) && cd $(STATICDIR) && \ |
| 1389 | $(ARCHPREFIX)ar x ..\%i && \ |
| 1390 | $(ARCHPREFIX)ar q ..\$@ *$(o) && \ |
| 1391 | cd .. && rmdir /s /q $(STATICDIR) |
| 1392 | .ELSE |
| 1393 | $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \ |
| 1394 | @$(mktmp $(PERLDLL_OBJ)) |
| 1395 | .ENDIF |
| 1396 | $(XCOPY) $(PERLSTATICLIB) $(COREDIR)\$(NULL) |
| 1397 | |
| 1398 | $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO) |
| 1399 | |
| 1400 | $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS) |
| 1401 | |
| 1402 | $(GENUUDMAP) $(GENERATED_HEADERS) .UPDATEALL : ..\mg_raw.h |
| 1403 | .IF "$(CCTYPE)" == "GCC" |
| 1404 | $(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \ |
| 1405 | $(BLINK_FLAGS) -x $(mktmp $(LKPRE) $(LIBFILES) $(LKPOST)) |
| 1406 | .ELSE |
| 1407 | $(CC) $(CFLAGS_O) -Fe..\generate_uudmap.exe ..\generate_uudmap.c @$(mktmp -link $(LIBFILES)) -link $(BLINK_FLAGS) |
| 1408 | $(EMBED_EXE_MANI:s/$@/..\generate_uudmap.exe/) |
| 1409 | .ENDIF |
| 1410 | $(GENUUDMAP) $(GENERATED_HEADERS) |
| 1411 | |
| 1412 | #This generates a stub ppport.h & creates & fills /lib/CORE to allow for XS |
| 1413 | #building .c->.obj wise (linking is a different thing). This taget is AKA |
| 1414 | #$(HAVE_COREDIR). |
| 1415 | $(COREDIR)\ppport.h : $(CORE_H) |
| 1416 | $(XCOPY) *.h $(COREDIR)\*.* && $(RCOPY) include $(COREDIR)\*.* && $(XCOPY) ..\*.h $(COREDIR)\*.* |
| 1417 | rem. > $@ |
| 1418 | |
| 1419 | perlmain.c : runperl.c |
| 1420 | copy runperl.c perlmain.c |
| 1421 | |
| 1422 | perlmain$(o) : $(CONFIGPM) perlmain.c |
| 1423 | $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ $(PDBOUT) -c perlmain.c |
| 1424 | |
| 1425 | perlmainst.c : runperl.c |
| 1426 | copy runperl.c perlmainst.c |
| 1427 | |
| 1428 | perlmainst$(o) : $(CONFIGPM) perlmainst.c |
| 1429 | $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c perlmainst.c |
| 1430 | |
| 1431 | $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) |
| 1432 | .IF "$(CCTYPE)" == "GCC" |
| 1433 | $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ |
| 1434 | $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) |
| 1435 | .ELSE |
| 1436 | $(LINK32) -out:$@ $(BLINK_FLAGS) \ |
| 1437 | $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ) |
| 1438 | $(EMBED_EXE_MANI) |
| 1439 | .ENDIF |
| 1440 | copy $(PERLEXE) $(WPERLEXE) |
| 1441 | $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS |
| 1442 | |
| 1443 | $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) |
| 1444 | .IF "$(CCTYPE)" == "GCC" |
| 1445 | $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ |
| 1446 | $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) |
| 1447 | .ELSE |
| 1448 | $(LINK32) -out:$@ $(BLINK_FLAGS) \ |
| 1449 | $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ) |
| 1450 | $(EMBED_EXE_MANI) |
| 1451 | .ENDIF |
| 1452 | |
| 1453 | #------------------------------------------------------------------------------- |
| 1454 | # There's no direct way to mark a dependency on |
| 1455 | # DynaLoader.pm, so this will have to do |
| 1456 | |
| 1457 | #most of deps of this target are in DYNALOADER and therefore omitted here |
| 1458 | Extensions : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) |
| 1459 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize |
| 1460 | |
| 1461 | Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES) |
| 1462 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize |
| 1463 | |
| 1464 | Extensions_reonly : $(PERLDEP) $(DYNALOADER) |
| 1465 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re |
| 1466 | |
| 1467 | Extensions_static : ..\make_ext.pl list_static_libs.pl $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) |
| 1468 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static |
| 1469 | $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static |
| 1470 | |
| 1471 | Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE) |
| 1472 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs |
| 1473 | |
| 1474 | #lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building |
| 1475 | $(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR) |
| 1476 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader lib |
| 1477 | |
| 1478 | Extensions_clean : |
| 1479 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean |
| 1480 | |
| 1481 | Extensions_realclean : |
| 1482 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean |
| 1483 | |
| 1484 | # all PE files need to be built by the time this target runs, PP files can still |
| 1485 | # be running in parallel like UNIDATAFILES, this target a placeholder for the |
| 1486 | # future |
| 1487 | .IF "$(BUILD_STATIC)"=="define" |
| 1488 | rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(GLOBEXE) $(PERLEXESTATIC) |
| 1489 | .ELSE |
| 1490 | rebasePE : Extensions $(PERLDLL) Extensions_normalize $(PERLEXE) $(GLOBEXE) |
| 1491 | .ENDIF |
| 1492 | $(NOOP) |
| 1493 | |
| 1494 | #------------------------------------------------------------------------------- |
| 1495 | |
| 1496 | |
| 1497 | doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod |
| 1498 | $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \ |
| 1499 | --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\ |
| 1500 | --recurse |
| 1501 | |
| 1502 | ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL |
| 1503 | $(MINIPERL) -I..\lib ..\utils\Makefile.PL .. |
| 1504 | |
| 1505 | # Note that this next section is parsed (and regenerated) by pod/buildtoc |
| 1506 | # so please check that script before making structural changes here |
| 1507 | utils: $(HAVEMINIPERL) ..\utils\Makefile |
| 1508 | cd ..\utils && $(PLMAKE) PERL=$(MINIPERL) |
| 1509 | copy ..\README.aix ..\pod\perlaix.pod |
| 1510 | copy ..\README.amiga ..\pod\perlamiga.pod |
| 1511 | copy ..\README.android ..\pod\perlandroid.pod |
| 1512 | copy ..\README.bs2000 ..\pod\perlbs2000.pod |
| 1513 | copy ..\README.ce ..\pod\perlce.pod |
| 1514 | copy ..\README.cn ..\pod\perlcn.pod |
| 1515 | copy ..\README.cygwin ..\pod\perlcygwin.pod |
| 1516 | copy ..\README.dos ..\pod\perldos.pod |
| 1517 | copy ..\README.freebsd ..\pod\perlfreebsd.pod |
| 1518 | copy ..\README.haiku ..\pod\perlhaiku.pod |
| 1519 | copy ..\README.hpux ..\pod\perlhpux.pod |
| 1520 | copy ..\README.hurd ..\pod\perlhurd.pod |
| 1521 | copy ..\README.irix ..\pod\perlirix.pod |
| 1522 | copy ..\README.jp ..\pod\perljp.pod |
| 1523 | copy ..\README.ko ..\pod\perlko.pod |
| 1524 | copy ..\README.linux ..\pod\perllinux.pod |
| 1525 | copy ..\README.macos ..\pod\perlmacos.pod |
| 1526 | copy ..\README.macosx ..\pod\perlmacosx.pod |
| 1527 | copy ..\README.netware ..\pod\perlnetware.pod |
| 1528 | copy ..\README.openbsd ..\pod\perlopenbsd.pod |
| 1529 | copy ..\README.os2 ..\pod\perlos2.pod |
| 1530 | copy ..\README.os390 ..\pod\perlos390.pod |
| 1531 | copy ..\README.os400 ..\pod\perlos400.pod |
| 1532 | copy ..\README.plan9 ..\pod\perlplan9.pod |
| 1533 | copy ..\README.qnx ..\pod\perlqnx.pod |
| 1534 | copy ..\README.riscos ..\pod\perlriscos.pod |
| 1535 | copy ..\README.solaris ..\pod\perlsolaris.pod |
| 1536 | copy ..\README.symbian ..\pod\perlsymbian.pod |
| 1537 | copy ..\README.synology ..\pod\perlsynology.pod |
| 1538 | copy ..\README.tru64 ..\pod\perltru64.pod |
| 1539 | copy ..\README.tw ..\pod\perltw.pod |
| 1540 | copy ..\README.vos ..\pod\perlvos.pod |
| 1541 | copy ..\README.win32 ..\pod\perlwin32.pod |
| 1542 | copy ..\pod\perldelta.pod ..\pod\perl5235delta.pod |
| 1543 | $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS) |
| 1544 | $(MINIPERL) -I..\lib ..\autodoc.pl .. |
| 1545 | $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q .. |
| 1546 | |
| 1547 | ..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs ..\pod\perluniprops.pod utils |
| 1548 | $(PERLEXE) -f ..\pod\buildtoc -q |
| 1549 | |
| 1550 | # Note that the pod cleanup in this next section is parsed (and regenerated |
| 1551 | # by pod/buildtoc so please check that script before making changes here |
| 1552 | |
| 1553 | distclean: realclean |
| 1554 | -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ |
| 1555 | $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB) |
| 1556 | -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm |
| 1557 | -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm |
| 1558 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm |
| 1559 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm |
| 1560 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm |
| 1561 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm |
| 1562 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm |
| 1563 | -del /f $(LIBDIR)\File\Glob.pm |
| 1564 | -del /f $(LIBDIR)\Storable.pm |
| 1565 | -del /f $(LIBDIR)\Sys\Hostname.pm |
| 1566 | -del /f $(LIBDIR)\Time\HiRes.pm |
| 1567 | -del /f $(LIBDIR)\Unicode\Normalize.pm |
| 1568 | -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm |
| 1569 | -del /f $(LIBDIR)\Win32.pm |
| 1570 | -del /f $(LIBDIR)\Win32CORE.pm |
| 1571 | -del /f $(LIBDIR)\Win32API\File.pm |
| 1572 | -del /f $(LIBDIR)\Win32API\File\cFile.pc |
| 1573 | -del /f $(LIBDIR)\buildcustomize.pl |
| 1574 | -del /f $(DISTDIR)\XSLoader\XSLoader.pm |
| 1575 | -del /f *.def *.map |
| 1576 | -if exist $(LIBDIR)\Amiga rmdir /s /q $(LIBDIR)\Amiga |
| 1577 | -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App |
| 1578 | -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive |
| 1579 | -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute |
| 1580 | -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie |
| 1581 | -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp |
| 1582 | -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress |
| 1583 | -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl |
| 1584 | -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN |
| 1585 | -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data |
| 1586 | -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel |
| 1587 | -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest |
| 1588 | -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode |
| 1589 | -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding |
| 1590 | -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter |
| 1591 | -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder |
| 1592 | -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command |
| 1593 | -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant |
| 1594 | -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist |
| 1595 | -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker |
| 1596 | -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS |
| 1597 | -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps |
| 1598 | -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec |
| 1599 | -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter |
| 1600 | -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash |
| 1601 | -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP |
| 1602 | -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N |
| 1603 | -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO |
| 1604 | -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC |
| 1605 | -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON |
| 1606 | -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List |
| 1607 | -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale |
| 1608 | -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math |
| 1609 | -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize |
| 1610 | -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME |
| 1611 | -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module |
| 1612 | -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP |
| 1613 | -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params |
| 1614 | -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse |
| 1615 | -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl |
| 1616 | -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO |
| 1617 | -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc |
| 1618 | -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple |
| 1619 | -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text |
| 1620 | -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar |
| 1621 | -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search |
| 1622 | -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub |
| 1623 | -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys |
| 1624 | -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP |
| 1625 | -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term |
| 1626 | -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test |
| 1627 | -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text |
| 1628 | -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread |
| 1629 | -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads |
| 1630 | -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash |
| 1631 | -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate |
| 1632 | -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale |
| 1633 | -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version |
| 1634 | -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS |
| 1635 | -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API |
| 1636 | -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS |
| 1637 | -cd $(PODDIR) && del /f *.html *.bat roffitall \ |
| 1638 | perl5235delta.pod perlaix.pod perlamiga.pod perlandroid.pod \ |
| 1639 | perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \ |
| 1640 | perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \ |
| 1641 | perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \ |
| 1642 | perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \ |
| 1643 | perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \ |
| 1644 | perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \ |
| 1645 | perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \ |
| 1646 | perltru64.pod perltw.pod perluniprops.pod perlvos.pod \ |
| 1647 | perlwin32.pod |
| 1648 | -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \ |
| 1649 | perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \ |
| 1650 | xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails |
| 1651 | -del /f ..\config.sh perlmain.c dlutils.c config.h.new \ |
| 1652 | perlmainst.c |
| 1653 | -del /f $(CONFIGPM) |
| 1654 | -del /f ..\lib\Config_git.pl |
| 1655 | -del /f bin\*.bat |
| 1656 | -del /f perllibst.h |
| 1657 | -del /f $(PERLEXE_RES) perl.base |
| 1658 | -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h |
| 1659 | -cd $(EXTDIR) && del /s *.def Makefile Makefile.old |
| 1660 | -cd $(DISTDIR) && del /s *.def Makefile Makefile.old |
| 1661 | -cd $(CPANDIR) && del /s *.def Makefile Makefile.old |
| 1662 | -del /s ..\utils\Makefile |
| 1663 | -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) |
| 1664 | -if exist $(COREDIR) rmdir /s /q $(COREDIR) |
| 1665 | -if exist pod2htmd.tmp del pod2htmd.tmp |
| 1666 | -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR) |
| 1667 | -del /f ..\t\test_state |
| 1668 | |
| 1669 | install : all installbare installhtml |
| 1670 | |
| 1671 | installbare : utils ..\pod\perltoc.pod |
| 1672 | $(PERLEXE) ..\installperl |
| 1673 | attrib -r $(INST_COREDIR)\ppport.h && del $(INST_COREDIR)\ppport.h |
| 1674 | if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* |
| 1675 | if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.* |
| 1676 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
| 1677 | if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.* |
| 1678 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* |
| 1679 | |
| 1680 | installhtml : doc |
| 1681 | $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.* |
| 1682 | |
| 1683 | inst_lib : $(CONFIGPM) |
| 1684 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
| 1685 | |
| 1686 | $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(CONFIGPM) ..\lib\unicore\mktables |
| 1687 | cd ..\lib\unicore && \ |
| 1688 | ..\$(MINIPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p |
| 1689 | |
| 1690 | minitest : .\config.h $(HAVEMINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) $(TESTPREPGCC) |
| 1691 | $(XCOPY) $(MINIPERL) ..\t\$(NULL) |
| 1692 | if exist ..\t\perl.exe del /f ..\t\perl.exe |
| 1693 | rename ..\t\miniperl.exe perl.exe |
| 1694 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
| 1695 | # Note this perl.exe is miniperl |
| 1696 | cd ..\t && perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t |
| 1697 | |
| 1698 | test-prep : all utils ..\pod\perltoc.pod $(TESTPREPGCC) |
| 1699 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) && $(XCOPY) $(PERLDLL) ..\t\$(NULL) \ |
| 1700 | && $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
| 1701 | |
| 1702 | # If building with gcc versions 4.x.x or greater, then |
| 1703 | # the GCC helper DLL will also need copied to the test directory. |
| 1704 | # The name of the dll can change, depending upon which vendor has supplied |
| 1705 | # your compiler, and upon the values of "x". |
| 1706 | # libstdc++-6.dll is copied if it exists as it, too, may then be needed. |
| 1707 | # Without this copying, the op/taint.t test script will fail. |
| 1708 | |
| 1709 | .IF "$(CCTYPE)" == "GCC" |
| 1710 | |
| 1711 | test-prep-gcc : |
| 1712 | if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL) |
| 1713 | if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL) |
| 1714 | if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL) |
| 1715 | if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL) |
| 1716 | if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL) |
| 1717 | |
| 1718 | .ENDIF |
| 1719 | |
| 1720 | test : test-prep |
| 1721 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
| 1722 | cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
| 1723 | |
| 1724 | test_porting : test-prep |
| 1725 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
| 1726 | cd ..\t && perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t |
| 1727 | |
| 1728 | test-reonly : reonly utils |
| 1729 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
| 1730 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) |
| 1731 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
| 1732 | cd ..\t && perl.exe harness $(OPT) -re \bpat\\/ $(EXTRA) |
| 1733 | |
| 1734 | regen : |
| 1735 | cd .. && regen.pl |
| 1736 | |
| 1737 | test-notty : test-prep |
| 1738 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
| 1739 | set PERL_SKIP_TTY_TEST=1 && \ |
| 1740 | cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
| 1741 | |
| 1742 | _test : |
| 1743 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
| 1744 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) |
| 1745 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
| 1746 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
| 1747 | cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES) |
| 1748 | |
| 1749 | _clean : |
| 1750 | -@erase miniperlmain$(o) |
| 1751 | -@erase $(MINIPERL) |
| 1752 | -@erase perlglob$(o) |
| 1753 | -@erase perlmain$(o) |
| 1754 | -@erase perlmainst$(o) |
| 1755 | -@erase /f config.h |
| 1756 | -@erase /f ..\git_version.h |
| 1757 | -@erase $(GLOBEXE) |
| 1758 | -@erase $(PERLEXE) |
| 1759 | -@erase $(WPERLEXE) |
| 1760 | -@erase $(PERLEXESTATIC) |
| 1761 | -@erase $(PERLSTATICLIB) |
| 1762 | -@erase $(PERLDLL) |
| 1763 | -@erase $(CORE_OBJ) |
| 1764 | -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS) |
| 1765 | -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) |
| 1766 | -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1) |
| 1767 | -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2) |
| 1768 | -@erase $(UNIDATAFILES) |
| 1769 | -@erase $(WIN32_OBJ) |
| 1770 | -@erase $(DLL_OBJ) |
| 1771 | -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res |
| 1772 | -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat |
| 1773 | -@erase *.ilk |
| 1774 | -@erase *.pdb ..\*.pdb |
| 1775 | -@erase Extensions_static |
| 1776 | |
| 1777 | |
| 1778 | |
| 1779 | clean : Extensions_clean _clean |
| 1780 | |
| 1781 | realclean : Extensions_realclean _clean |
| 1782 | |
| 1783 | # Handy way to run perlbug -ok without having to install and run the |
| 1784 | # installed perlbug. We don't re-run the tests here - we trust the user. |
| 1785 | # Please *don't* use this unless all tests pass. |
| 1786 | # If you want to report test failures, use "dmake nok" instead. |
| 1787 | ok: utils |
| 1788 | $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" |
| 1789 | |
| 1790 | okfile: utils |
| 1791 | $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok |
| 1792 | |
| 1793 | nok: utils |
| 1794 | $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" |
| 1795 | |
| 1796 | nokfile: utils |
| 1797 | $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok |