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