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