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