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