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