This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Silence warning during VC++/nmake build
[perl5.git] / win32 / Makefile
CommitLineData
9e42cd94 1#
b6c85593 2# Makefile to build perl on Windows using Microsoft NMAKE.
9e42cd94 3# Supported compilers:
b6c85593 4# Microsoft Visual C++ 6.0 or later
02e200fc 5# Windows SDK 64-bit compiler and tools
9e42cd94
GS
6#
7# This is set up to build a perl.exe that runs off a shared library
46f5adf9 8# (perl521.dll). Also makes individual DLLs for the XS extensions.
9e42cd94
GS
9#
10
11##
12## Make sure you read README.win32 *before* you mess with anything here!
13##
14
15##
16## Build configuration. Edit the values below to suit your needs.
17##
18
19#
20# Set these to wherever you want "nmake install" to put your
21# newly built perl.
22#
23INST_DRV = c:
24INST_TOP = $(INST_DRV)\perl
25
26#
b86e806e
JD
27# Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
28# on a 64-bit version of Windows.
890b5089 29#
b86e806e
JD
30#WIN64 = undef
31
32#
9e42cd94
GS
33# Comment this out if you DON'T want your perl installation to be versioned.
34# This means that the new installation will overwrite any files from the
35# old installation at the same INST_TOP location. Leaving it enabled is
36# the safest route, as perl adds the extra version directory to all the
37# locations it installs files to. If you disable it, an alternative
38# versioned installation can be obtained by setting INST_TOP above to a
39# path that includes an arbitrary version string.
40#
e31034da 41#INST_VER = \5.21.8
9e42cd94
GS
42
43#
44# Comment this out if you DON'T want your perl installation to have
45# architecture specific components. This means that architecture-
46# specific files will be installed along with the architecture-neutral
47# files. Leaving it enabled is safer and more flexible, in case you
48# want to build multiple flavors of perl and install them together in
49# the same location. Commenting it out gives you a simpler
50# installation that is easier to understand for beginners.
51#
bdb4cb88 52#INST_ARCH = \$(ARCHNAME)
9e42cd94
GS
53
54#
7ada00a0
SH
55# Uncomment this if you want perl to run
56# $Config{sitelibexp}\sitecustomize.pl
57# before anything else. This script can then be set up, for example,
58# to add additional entries to @INC.
59#
60#USE_SITECUST = define
61
62#
4fef8ef3
SH
63# uncomment to enable multiple interpreters. This is needed for fork()
64# emulation and for thread support, and is auto-enabled by USE_IMP_SYS
65# and USE_ITHREADS below.
9e42cd94 66#
bdb4cb88 67USE_MULTI = define
9e42cd94
GS
68
69#
4fef8ef3
SH
70# Interpreter cloning/threads; now reasonably complete.
71# This should be enabled to get the fork() emulation. This needs (and
72# will auto-enable) USE_MULTI above.
9e42cd94 73#
bdb4cb88 74USE_ITHREADS = define
9e42cd94
GS
75
76#
77# uncomment to enable the implicit "host" layer for all system calls
4fef8ef3
SH
78# made by perl. This is also needed to get fork(). This needs (and
79# will auto-enable) USE_MULTI above.
9e42cd94 80#
bdb4cb88 81USE_IMP_SYS = define
9e42cd94
GS
82
83#
4a9d6100
GS
84# Comment this out if you don't want to enable large file support for
85# some reason. Should normally only be changed to maintain compatibility
86# with an older release of perl.
890b5089 87#
bdb4cb88 88USE_LARGE_FILES = define
4a9d6100
GS
89
90#
1f64ae15
SH
91# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
92# (If you're building a 64-bit perl then you will have 64-bit integers whether
93# or not this is uncommented.)
38aa66aa 94# Note: This option is not supported in 32-bit MSVC60 builds.
890b5089 95#
1f64ae15
SH
96#USE_64_BIT_INT = define
97
98#
da2c7419 99# uncomment exactly one of the following
9e42cd94 100#
1c847d4b 101# Visual C++ 6.x (aka Visual C++ 98)
4a9d6100 102CCTYPE = MSVC60
5398666e
SH
103# Visual C++ .NET 2002/2003 (aka Visual C++ 7.x) (full version)
104#CCTYPE = MSVC70
1c847d4b 105# Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools)
da2c7419 106#CCTYPE = MSVC70FREE
02e200fc
JD
107# Windows Server 2003 SP1 Platform SDK (April 2005)
108#CCTYPE = SDK2003SP1
1c847d4b 109# Visual C++ 2005 (aka Visual C++ 8.x) (full version)
73c9ebc7 110#CCTYPE = MSVC80
5398666e
SH
111# Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version)
112#CCTYPE = MSVC80FREE
4a3cf07b
SH
113# Visual C++ 2008 (aka Visual C++ 9.x) (full version)
114#CCTYPE = MSVC90
5398666e
SH
115# Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version)
116#CCTYPE = MSVC90FREE
2a46176f
SH
117# Visual C++ 2010 (aka Visual C++ 10.x) (full version)
118#CCTYPE = MSVC100
5398666e
SH
119# Visual C++ 2010 Express Edition (aka Visual C++ 10.x) (free version)
120#CCTYPE = MSVC100FREE
121# Visual C++ 2012 (aka Visual C++ 11.x) (full version)
122#CCTYPE = MSVC110
123# Visual C++ 2012 Express Edition (aka Visual C++ 11.x) (free version)
124#CCTYPE = MSVC110FREE
3e7c2d43
SH
125# Visual C++ 2013 (aka Visual C++ 12.x) (full version)
126#CCTYPE = MSVC120
127# Visual C++ 2013 Express Edition (aka Visual C++ 12.x) (free version)
128#CCTYPE = MSVC120FREE
9e42cd94
GS
129
130#
a48cc4c4
DD
131# If you are using Intel C++ Compiler uncomment this
132#
133#__ICC = define
134
135#
9e42cd94 136# uncomment next line if you want debug version of perl (big,slow)
f7d585d3
GS
137# If not enabled, we automatically try to use maximum optimization
138# with all compilers that are known to have a working optimizer.
9e42cd94
GS
139#
140#CFG = Debug
141
142#
9e42cd94
GS
143# uncomment to enable linking with setargv.obj under the Visual C
144# compiler. Setting this options enables perl to expand wildcards in
145# arguments, but it may be harder to use alternate methods like
146# File::DosGlob that are more powerful. This option is supported only with
147# Visual C.
148#
149#USE_SETARGV = define
150
151#
9e42cd94
GS
152# set this if you wish to use perl's malloc
153# WARNING: Turning this on/off WILL break binary compatibility with extensions
154# you may have compiled with/without it. Be prepared to recompile all
155# extensions if you change the default. Currently, this cannot be enabled
156# if you ask for USE_IMP_SYS above.
157#
158#PERL_MALLOC = define
159
160#
06c896bb
SH
161# set this to enable debugging mstats
162# This must be enabled to use the Devel::Peek::mstat() function. This cannot
163# be enabled without PERL_MALLOC as well.
164#
bdb4cb88 165#DEBUG_MSTATS = define
06c896bb
SH
166
167#
4e036e4b
VK
168# set this to additionally provide a statically linked perl-static.exe.
169# Note that dynamic loading will not work with this perl, so you must
a1f2e719 170# include required modules statically using the STATIC_EXT or ALL_STATIC
46f5adf9 171# variables below. A static library perl521s.lib will also be created.
4e036e4b
VK
172# Ordinary perl.exe is not affected by this option.
173#
174#BUILD_STATIC = define
175
176#
a1f2e719
VK
177# in addition to BUILD_STATIC the option ALL_STATIC makes *every*
178# extension get statically built
179# This will result in a very large perl executable, but the main purpose
180# is to have proper linking set so as to be able to create miscellaneous
181# executables with different built-in extensions
182#
183#ALL_STATIC = define
184
185#
06c896bb 186#
9e42cd94
GS
187# set the install locations of the compiler include/libraries
188# Running VCVARS32.BAT is *required* when using Visual C.
189# Some versions of Visual C don't define MSVCDIR in the environment,
190# so you may have to set CCHOME explicitly (spaces in the path name should
191# not be quoted)
192#
9e42cd94
GS
193CCHOME = $(MSVCDIR)
194CCINCDIR = $(CCHOME)\include
195CCLIBDIR = $(CCHOME)\lib
196
197#
198# Additional compiler flags can be specified here.
199#
2e30e1e1 200BUILDOPT = $(BUILDOPTEXTRA)
9e42cd94 201
7ada00a0 202#
9e42cd94
GS
203# This should normally be disabled. Enabling it will disable the File::Glob
204# implementation of CORE::glob.
205#
206#BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
207
208#
270ca148
JD
209# Perl needs to read scripts in text mode so that the DATA filehandle
210# works correctly with seek() and tell(), or around auto-flushes of
211# all filehandles (e.g. by system(), backticks, fork(), etc).
bdb4cb88 212#
270ca148
JD
213# The current version on the ByteLoader module on CPAN however only
214# works if scripts are read in binary mode. But before you disable text
215# mode script reading (and break some DATA filehandle functionality)
216# please check first if an updated ByteLoader isn't available on CPAN.
217#
218BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
9e42cd94
GS
219
220#
221# specify semicolon-separated list of extra directories that modules will
222# look for libraries (spaces in path names need not be quoted)
223#
224EXTRALIBDIRS =
225
226#
227# set this to your email address (perl will guess a value from
228# from your loginname and your hostname, which may not be right)
229#
230#EMAIL =
231
232##
233## Build configuration ends.
234##
235
236##################### CHANGE THESE ONLY IF YOU MUST #####################
237
646e33b6
SH
238!IF "$(USE_IMP_SYS)" == "define"
239PERL_MALLOC = undef
240DEBUG_MSTATS = undef
241!ENDIF
242
9e42cd94
GS
243!IF "$(PERL_MALLOC)" == ""
244PERL_MALLOC = undef
646e33b6 245DEBUG_MSTATS = undef
06c896bb
SH
246!ENDIF
247
248!IF "$(DEBUG_MSTATS)" == ""
646e33b6 249DEBUG_MSTATS = undef
06c896bb
SH
250!ENDIF
251
252!IF "$(DEBUG_MSTATS)" == "define"
646e33b6 253BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS
9e42cd94
GS
254!ENDIF
255
7ada00a0
SH
256!IF "$(USE_SITECUST)" == ""
257USE_SITECUST = undef
258!ENDIF
259
9e42cd94
GS
260!IF "$(USE_MULTI)" == ""
261USE_MULTI = undef
262!ENDIF
263
264!IF "$(USE_ITHREADS)" == ""
265USE_ITHREADS = undef
266!ENDIF
267
268!IF "$(USE_IMP_SYS)" == ""
269USE_IMP_SYS = undef
270!ENDIF
271
4a9d6100
GS
272!IF "$(USE_LARGE_FILES)" == ""
273USE_LARGE_FILES = undef
274!ENDIF
275
1f64ae15
SH
276!IF "$(USE_64_BIT_INT)" == ""
277USE_64_BIT_INT = undef
278!ENDIF
279
3db8f154 280!IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
9e42cd94
GS
281USE_MULTI = define
282!ENDIF
283
284!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
285USE_MULTI = define
9e42cd94
GS
286!ENDIF
287
7ada00a0
SH
288!IF "$(USE_SITECUST)" == "define"
289BUILDOPT = $(BUILDOPT) -DUSE_SITECUSTOMIZE
290!ENDIF
291
3db8f154 292!IF "$(USE_MULTI)" != "undef"
9e42cd94
GS
293BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
294!ENDIF
295
296!IF "$(USE_IMP_SYS)" != "undef"
297BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
298!ENDIF
299
300!IF "$(PROCESSOR_ARCHITECTURE)" == ""
301PROCESSOR_ARCHITECTURE = x86
302!ENDIF
303
c623ac67 304!IF "$(WIN64)" == ""
bf2a35e5
JD
305# When we are running from a 32bit cmd.exe on AMD64 then
306# PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
307# is set to AMD64
c623ac67
GS
308!IF "$(PROCESSOR_ARCHITEW6432)" != ""
309PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
310WIN64 = define
311!ELSE
bf2a35e5 312!IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
c623ac67
GS
313WIN64 = define
314!ELSE
315WIN64 = undef
316!ENDIF
317!ENDIF
318!ENDIF
319
1f64ae15
SH
320!IF "$(WIN64)" == "define"
321USE_64_BIT_INT = define
322!ENDIF
323
02e200fc
JD
324# Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
325# both link against MSVCRT.dll (which is part of Windows itself) and
326# not against a compiler specific versioned runtime.
327!IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
328CCTYPE = SDK2003SP1
329!ENDIF
330
38aa66aa
SH
331# Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
332# does not support it.
333!IF "$(CCTYPE)" == "MSVC60"
334!UNDEF USE_64_BIT_INT
335USE_64_BIT_INT = undef
336!ENDIF
337
5398666e
SH
338# Most relevant compiler-specific options fall into two groups:
339# either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
340!IF "$(CCTYPE)" == "MSVC60" || \
341 "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
342PREMSVC80 = define
343!ELSE
344PREMSVC80 = undef
345!ENDIF
346
bf2a35e5
JD
347ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
348!IF "$(ARCHITECTURE)" == "AMD64"
349ARCHITECTURE = x64
9453ddcd 350!ENDIF
bf2a35e5
JD
351!IF "$(ARCHITECTURE)" == "IA64"
352ARCHITECTURE = ia64
9453ddcd
SH
353!ENDIF
354
9e42cd94 355!IF "$(USE_MULTI)" == "define"
bf2a35e5 356ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
9e42cd94 357!ELSE
bf2a35e5 358ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
9e42cd94
GS
359!ENDIF
360
361!IF "$(USE_ITHREADS)" == "define"
362ARCHNAME = $(ARCHNAME)-thread
363!ENDIF
364
1f64ae15
SH
365!IF "$(WIN64)" != "define"
366!IF "$(USE_64_BIT_INT)" == "define"
367ARCHNAME = $(ARCHNAME)-64int
368!ENDIF
369!ENDIF
370
5398666e
SH
371# All but the free version of VC++ 7.x can load DLLs on demand. Makes the test
372# suite run in about 10% less time.
373!IF "$(CCTYPE)" != "MSVC70FREE"
d1a8253e 374DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
9e42cd94
GS
375!ENDIF
376
4a3cf07b
SH
377# Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and
378# DLLs. These either need copying everywhere with the binaries, or else need
3ddd48aa
SH
379# embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
380# simplicity, embed them if they exist (and delete them afterwards so that they
381# don't get installed too).
4adc95e6
SH
382EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
383 if exist $@.manifest del $@.manifest
384EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
385 if exist $@.manifest del $@.manifest
c8e599d3 386
9e42cd94
GS
387ARCHDIR = ..\lib\$(ARCHNAME)
388COREDIR = ..\lib\CORE
389AUTODIR = ..\lib\auto
390LIBDIR = ..\lib
391EXTDIR = ..\ext
a193a2db 392DISTDIR = ..\dist
b212a3c6 393CPANDIR = ..\cpan
9e42cd94 394PODDIR = ..\pod
b4a41557 395HTMLDIR = .\html
9e42cd94
GS
396
397#
398INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
399INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
400INST_LIB = $(INST_TOP)$(INST_VER)\lib
401INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
402INST_COREDIR = $(INST_ARCHLIB)\CORE
9e42cd94
GS
403INST_HTML = $(INST_TOP)$(INST_VER)\html
404
405#
406# Programs to compile, build .lib files and link
407#
408
a48cc4c4 409!IF "$(__ICC)" != "define"
9e42cd94
GS
410CC = cl
411LINK32 = link
a48cc4c4
DD
412!ELSE
413CC = icl
414LINK32 = xilink
415!ENDIF
9e42cd94
GS
416LIB32 = $(LINK32) -lib
417RSC = rc
418
419#
420# Options
421#
422
423INCLUDES = -I$(COREDIR) -I.\include -I. -I..
424#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
9cef8306 425DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
9e42cd94
GS
426LOCDEFS = -DPERLDLL -DPERL_CORE
427SUBSYS = console
a7d225ec 428CXX_FLAG = -TP -EHsc
9e42cd94 429
9e42cd94 430LIBC = msvcrt.lib
9e42cd94 431
9e42cd94 432!IF "$(CFG)" == "Debug"
9e42cd94 433OPTIMIZE = -Od -MD -Zi -DDEBUGGING
c623ac67 434LINK_DBG = -debug
9e42cd94 435!ELSE
00a13560
SH
436# -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
437OPTIMIZE = -O1 -MD -Zi -DNDEBUG
ec25c072
SH
438# we enable debug symbols in release builds also
439LINK_DBG = -debug -opt:ref,icf
440# you may want to enable this if you want COFF symbols in the executables
441# in addition to the PDB symbols. The default Dr. Watson that ships with
442# Windows can use the the former but not latter. The free WinDbg can be
443# installed to get better stack traces from just the PDB symbols, so we
444# avoid the bloat of COFF symbols by default.
445#LINK_DBG = $(LINK_DBG) -debugtype:both
a9e3f359 446! IF "$(CCTYPE)" != "MSVC60"
d921a5fb 447# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
00a13560 448OPTIMIZE = $(OPTIMIZE) -GL
d921a5fb 449LINK_DBG = $(LINK_DBG) -ltcg
a9e3f359 450LIB_FLAGS = -ltcg
d921a5fb 451! ENDIF
9e42cd94
GS
452!ENDIF
453
c623ac67
GS
454!IF "$(WIN64)" == "define"
455DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
f33a21d8 456OPTIMIZE = $(OPTIMIZE) -fp:precise
da2c7419
SH
457!ENDIF
458
5398666e 459# For now, silence warnings from VC++ 8.x onwards about "unsafe" CRT functions
4a3cf07b 460# and POSIX CRT function names being deprecated.
5398666e 461!IF "$(PREMSVC80)" == "undef"
26a6faa8 462DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
c5b31784
SH
463!ENDIF
464
45f6403b
JD
465# In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
466# 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T
467# preprocessor option to revert back to the old functionality for
468# backward compatibility. We define this symbol here for older 32-bit
469# compilers only (which aren't using it at all) for the sole purpose
470# of getting it into $Config{ccflags}. That way if someone builds
471# Perl itself with e.g. VC6 but later installs an XS module using VC8
472# the time_t types will still be compatible.
473!IF "$(WIN64)" == "undef"
5398666e 474! IF "$(PREMSVC80)" == "define"
45f6403b
JD
475BUILDOPT = $(BUILDOPT) -D_USE_32BIT_TIME_T
476! ENDIF
477!ENDIF
478
9cef8306 479LIBBASEFILES = \
9e42cd94
GS
480 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
481 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
036c1c1e 482 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
4ebea3c6 483 version.lib odbc32.lib odbccp32.lib comctl32.lib
c623ac67 484
a48cc4c4
DD
485# Avoid __intel_new_proc_init link error for libircmt.
486# libmmd is /MD equivelent, other variants exist.
487# libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
488# and optimized C89 funcs
489!IF "$(__ICC)" == "define"
490LIBBASEFILES = $(LIBBASEFILES) libircmt.lib libmmd.lib
491!ENDIF
492
02e200fc
JD
493# The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which
494# doesn't include the buffer overrun verification code used by the /GS switch.
9453ddcd 495# Since the code links against libraries that are compiled with /GS, this
02e200fc
JD
496# "security cookie verification" code must be included via bufferoverflow.lib.
497!IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1"
9453ddcd 498LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib
c623ac67 499!ENDIF
9e42cd94 500
9e42cd94
GS
501LIBFILES = $(LIBBASEFILES) $(LIBC)
502
a5ca303d 503#EXTRACFLAGS = -nologo -GF -W4 -wd4127 -wd4706
9453ddcd 504EXTRACFLAGS = -nologo -GF -W3
312159d9
DD
505!IF "$(__ICC)" == "define"
506EXTRACFLAGS = $(EXTRACFLAGS) -Qstd=c99
507!ENDIF
bb275e72 508CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
9e42cd94
GS
509 $(PCHFLAGS) $(OPTIMIZE)
510LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
511 -libpath:"$(INST_COREDIR)" \
512 -machine:$(PROCESSOR_ARCHITECTURE)
a9e3f359 513LIB_FLAGS = $(LIB_FLAGS) -nologo
9e42cd94
GS
514OBJOUT_FLAG = -Fo
515EXEOUT_FLAG = -Fe
516
517CFLAGS_O = $(CFLAGS) $(BUILDOPT)
518
5398666e 519!IF "$(PREMSVC80)" == "undef"
4ebea3c6
JD
520LINK_FLAGS = $(LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
521!ELSE
522RSC_FLAGS = -DINCLUDE_MANIFEST
523!ENDIF
524
525
9e42cd94
GS
526#################### do not edit below this line #######################
527############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
528
529o = .obj
530
531#
532# Rules
533#
534
9c958f05 535#clear the list, we dont support .cxx .bas .cbl .for .pas .f .f90
f4eedc6b
DD
536# .asm .cpp are not currently used but they are included for completeness
537.SUFFIXES :
538.SUFFIXES : .c $(o) .cpp .asm .dll .lib .exe .rc .res
9e42cd94
GS
539
540.c$(o):
541 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
542
61b311ca
DD
543.c.i:
544 $(CC) -c -I$(<D) $(CFLAGS_O) -P $(OBJOUT_FLAG)$@ $<
545
9e42cd94
GS
546.y.c:
547 $(NOOP)
548
549$(o).dll:
550 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
551 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
c8e599d3 552 $(EMBED_DLL_MANI)
9e42cd94
GS
553
554.rc.res:
4ebea3c6 555 $(RSC) -i.. $(RSC_FLAGS) $<
9e42cd94
GS
556
557#
558# various targets
559
560# makedef.pl must be updated if this changes, and this should normally
561# only change when there is an incompatible revision of the public API.
46f5adf9
RS
562PERLIMPLIB = ..\perl521.lib
563PERLSTATICLIB = ..\perl521s.lib
564PERLDLL = ..\perl521.dll
9e42cd94
GS
565
566MINIPERL = ..\miniperl.exe
567MINIDIR = .\mini
568PERLEXE = ..\perl.exe
569WPERLEXE = ..\wperl.exe
4e036e4b 570PERLEXESTATIC = ..\perl-static.exe
9e42cd94 571GLOBEXE = ..\perlglob.exe
04bae4fb 572CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
202d1001 573GENUUDMAP = ..\generate_uudmap.exe
eb4420e6 574!IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define"
4e036e4b
VK
575PERLSTATIC = static
576!ELSE
577PERLSTATIC =
578!ENDIF
5b04aee6 579
ca12659b 580# Unicode data files generated by mktables
36ff7f95
SH
581FIRSTUNIFILE = ..\lib\unicore\Decomposition.pl
582UNIDATAFILES = ..\lib\unicore\Decomposition.pl \
7ebf06b3 583 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
1a234f2b
KW
584 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst \
585 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
3e344d15 586 ..\lib\unicore\TestProp.pl
ca12659b
NC
587
588# Directories of Unicode data files generated by mktables
27a8011f
SH
589UNIDATADIR1 = ..\lib\unicore\To
590UNIDATADIR2 = ..\lib\unicore\lib
ca12659b 591
4ebea3c6 592PERLEXE_MANIFEST= .\perlexe.manifest
3890b58f
RGS
593PERLEXE_ICO = .\perlexe.ico
594PERLEXE_RES = .\perlexe.res
595PERLDLL_RES =
596
9e42cd94
GS
597# Nominate a target which causes extensions to be re-built
598# This used to be $(PERLEXE), but at worst it is the .dll that they depend
599# on and really only the interface - i.e. the .def file used to export symbols
600# from the .dll
601PERLDEP = perldll.def
602
603PL2BAT = bin\pl2bat.pl
604GLOBBAT = bin\perlglob.bat
605
606UTILS = \
607 ..\utils\h2ph \
608 ..\utils\splain \
9e42cd94
GS
609 ..\utils\perlbug \
610 ..\utils\pl2pm \
611 ..\utils\c2ph \
827a599d 612 ..\utils\pstruct \
9e42cd94
GS
613 ..\utils\h2xs \
614 ..\utils\perldoc \
9e42cd94
GS
615 ..\utils\perlivp \
616 ..\utils\libnetcfg \
827a599d
GS
617 ..\utils\enc2xs \
618 ..\utils\piconv \
18a1cebe 619 ..\utils\corelist \
83cd6e83 620 ..\utils\cpan \
ea0e987d 621 ..\utils\xsubpp \
4b618757 622 ..\utils\prove \
291d3373 623 ..\utils\ptar \
b8669316 624 ..\utils\ptardiff \
deabda19 625 ..\utils\ptargrep \
08ad9465 626 ..\utils\zipdetails \
3ddf9550 627 ..\utils\shasum \
ea0e987d 628 ..\utils\instmodsh \
84f04405 629 ..\utils\json_pp \
d658129c 630 ..\utils\pod2html \
9e42cd94
GS
631 bin\exetype.pl \
632 bin\runperl.pl \
633 bin\pl2bat.pl \
634 bin\perlglob.pl \
635 bin\search.pl
636
637MAKE = nmake -nologo
638MAKE_BARE = nmake
639
640CFGSH_TMPL = config.vc
641CFGH_TMPL = config_H.vc
642
b6ed7314
YO
643XCOPY = xcopy /f /r /i /d /y
644RCOPY = xcopy /f /r /i /e /d /y
65980d94 645NOOP = @rem
9e42cd94
GS
646NULL =
647
648DEL = del
649
9e42cd94
GS
650MICROCORE_SRC = \
651 ..\av.c \
0f8f167c 652 ..\caretx.c \
9e42cd94
GS
653 ..\deb.c \
654 ..\doio.c \
655 ..\doop.c \
656 ..\dump.c \
657 ..\globals.c \
658 ..\gv.c \
e1a479c5 659 ..\mro.c \
9e42cd94
GS
660 ..\hv.c \
661 ..\locale.c \
26ea9e12 662 ..\keywords.c \
a0d89a74 663 ..\mathoms.c \
9e42cd94
GS
664 ..\mg.c \
665 ..\numeric.c \
666 ..\op.c \
295f0f84 667 ..\pad.c \
9e42cd94
GS
668 ..\perl.c \
669 ..\perlapi.c \
670 ..\perly.c \
671 ..\pp.c \
672 ..\pp_ctl.c \
673 ..\pp_hot.c \
674 ..\pp_pack.c \
675 ..\pp_sort.c \
676 ..\pp_sys.c \
10bc17b6 677 ..\reentr.c \
9e42cd94
GS
678 ..\regcomp.c \
679 ..\regexec.c \
680 ..\run.c \
681 ..\scope.c \
682 ..\sv.c \
683 ..\taint.c \
684 ..\toke.c \
685 ..\universal.c \
686 ..\utf8.c \
48462a74 687 ..\util.c
9e42cd94
GS
688
689EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
690
691!IF "$(PERL_MALLOC)" == "define"
692EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
693!ENDIF
694
695EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
696
697WIN32_SRC = \
698 .\win32.c \
8c847e66 699 .\win32io.c \
9e42cd94 700 .\win32sck.c \
9cef8306
JD
701 .\win32thread.c \
702 .\fcrypt.c
9e42cd94 703
9e42cd94
GS
704CORE_NOCFG_H = \
705 ..\av.h \
706 ..\cop.h \
707 ..\cv.h \
708 ..\dosish.h \
709 ..\embed.h \
710 ..\form.h \
711 ..\gv.h \
712 ..\handy.h \
713 ..\hv.h \
4d3a042d 714 ..\hv_func.h \
9e42cd94
GS
715 ..\iperlsys.h \
716 ..\mg.h \
717 ..\nostdio.h \
718 ..\op.h \
719 ..\opcode.h \
720 ..\perl.h \
721 ..\perlapi.h \
722 ..\perlsdio.h \
9e42cd94
GS
723 ..\perly.h \
724 ..\pp.h \
725 ..\proto.h \
cdb0f547 726 ..\regcomp.h \
9e42cd94
GS
727 ..\regexp.h \
728 ..\scope.h \
729 ..\sv.h \
730 ..\thread.h \
731 ..\unixish.h \
732 ..\utf8.h \
733 ..\util.h \
734 ..\warnings.h \
735 ..\XSUB.h \
736 ..\EXTERN.h \
737 ..\perlvars.h \
738 ..\intrpvar.h \
9e42cd94
GS
739 .\include\dirent.h \
740 .\include\netdb.h \
c44e86c9 741 .\include\sys\errno2.h \
9e42cd94
GS
742 .\include\sys\socket.h \
743 .\win32.h
744
a148edb6 745CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
9e42cd94 746
202d1001 747UUDMAP_H = ..\uudmap.h
efa50c51 748BITCOUNT_H = ..\bitcount.h
6f83ef0e 749MG_DATA_H = ..\mg_data.h
9387abf8 750GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
202d1001 751
9e42cd94
GS
752MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
753CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
754WIN32_OBJ = $(WIN32_SRC:.c=.obj)
755MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
756 $(MINIDIR)\miniperlmain$(o) \
757 $(MINIDIR)\perlio$(o)
758MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
759MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
281da5ea 760DLL_OBJ = $(DYNALOADER)
202d1001 761GENUUDMAP_OBJ = $(GENUUDMAP:.exe=.obj)
9e42cd94
GS
762
763PERLDLL_OBJ = $(CORE_OBJ)
764PERLEXE_OBJ = perlmain$(o)
4e036e4b 765PERLEXEST_OBJ = perlmainst$(o)
9e42cd94
GS
766
767PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
9e42cd94
GS
768
769!IF "$(USE_SETARGV)" != ""
770SETARGV_OBJ = setargv$(o)
771!ENDIF
772
a1f2e719
VK
773!IF "$(ALL_STATIC)" == "define"
774# some exclusions, unfortunately, until fixed:
903f2d70 775# - MakeMaker isn't capable enough for SDBM_File (small bug)
13cedc2a 776STATIC_EXT = * !SDBM_File
a1f2e719
VK
777!ELSE
778# specify static extensions here, for example:
7a278470
SH
779# (be sure to include Win32CORE to load Win32 on demand)
780#STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
78ff2d7b 781STATIC_EXT = Win32CORE
a1f2e719 782!ENDIF
595589fa 783
281da5ea 784DYNALOADER = ..\DynaLoader$(o)
9e42cd94 785
9e42cd94 786CFG_VARS = \
9e42cd94
GS
787 "INST_TOP=$(INST_TOP)" \
788 "INST_VER=$(INST_VER)" \
789 "INST_ARCH=$(INST_ARCH)" \
790 "archname=$(ARCHNAME)" \
791 "cc=$(CC)" \
792 "ld=$(LINK32)" \
bb275e72 793 "ccflags=$(EXTRACFLAGS) $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
9e42cd94 794 "cf_email=$(EMAIL)" \
9e42cd94
GS
795 "d_mymalloc=$(PERL_MALLOC)" \
796 "libs=$(LIBFILES)" \
797 "incpath=$(CCINCDIR:"=\")" \
798 "libperl=$(PERLIMPLIB:..\=)" \
799 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
800 "libc=$(LIBC)" \
801 "make=$(MAKE_BARE)" \
d2b25974 802 "static_ext=$(STATIC_EXT)" \
7e0017d3 803 "usethreads=$(USE_ITHREADS)" \
9e42cd94 804 "useithreads=$(USE_ITHREADS)" \
9e42cd94 805 "usemultiplicity=$(USE_MULTI)" \
1f64ae15 806 "use64bitint=$(USE_64_BIT_INT)" \
c674478b 807 "uselongdouble=undef" \
4a9d6100 808 "uselargefiles=$(USE_LARGE_FILES)" \
7ada00a0 809 "usesitecustomize=$(USE_SITECUST)" \
9e42cd94 810 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
1f64ae15
SH
811 "optimize=$(OPTIMIZE:"=\")" \
812 "WIN64=$(WIN64)"
9e42cd94
GS
813
814#
815# Top targets
816#
817
7b4d95f7 818all : .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
e5a8a0fb 819 $(UNIDATAFILES) MakePPPort $(PERLEXE) Extensions_nonxs Extensions $(PERLSTATIC)
9e42cd94
GS
820 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
821
c900f745 822regnodes : ..\regnodes.h
5d458dd8 823
5b04aee6 824..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
e64b1bd1
YO
825
826..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
827
7b4d95f7 828reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
e5a8a0fb 829 $(UNIDATAFILES) $(PERLEXE) Extensions_reonly
a24cc0c0
YO
830 @echo Perl and 're' are up to date.
831
4e036e4b
VK
832static: $(PERLEXESTATIC)
833
9e42cd94
GS
834#------------------------------------------------------------
835
836$(GLOBEXE) : perlglob$(o)
837 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
838 perlglob$(o) setargv$(o)
c8e599d3 839 $(EMBED_EXE_MANI)
9e42cd94
GS
840
841perlglob$(o) : perlglob.c
842
843config.w32 : $(CFGSH_TMPL)
844 copy $(CFGSH_TMPL) config.w32
845
1f64ae15
SH
846#
847# Copy the template config.h and set configurables at the end of it
848# as per the options chosen and compiler used.
849# Note: This config.h is only used to build miniperl.exe anyway, but
850# it's as well to have its options correct to be sure that it builds
851# and so that it's "-V" options are correct for use by makedef.pl. The
852# real config.h used to build perl.exe is generated from the top-level
853# config_h.SH by config_h.PL (run by miniperl.exe).
854#
9e42cd94
GS
855.\config.h : $(CFGH_TMPL)
856 -del /f config.h
857 copy $(CFGH_TMPL) config.h
1f64ae15
SH
858 @echo.>>$@
859 @echo #ifndef _config_h_footer_>>$@
860 @echo #define _config_h_footer_>>$@
200b4fd9
SH
861 @echo #undef Off_t>>$@
862 @echo #undef LSEEKSIZE>>$@
863 @echo #undef Off_t_size>>$@
1f64ae15
SH
864 @echo #undef PTRSIZE>>$@
865 @echo #undef SSize_t>>$@
866 @echo #undef HAS_ATOLL>>$@
867 @echo #undef HAS_STRTOLL>>$@
868 @echo #undef HAS_STRTOULL>>$@
869 @echo #undef IVTYPE>>$@
870 @echo #undef UVTYPE>>$@
871 @echo #undef IVSIZE>>$@
872 @echo #undef UVSIZE>>$@
873 @echo #undef NV_PRESERVES_UV>>$@
874 @echo #undef NV_PRESERVES_UV_BITS>>$@
875 @echo #undef IVdf>>$@
876 @echo #undef UVuf>>$@
877 @echo #undef UVof>>$@
878 @echo #undef UVxf>>$@
879 @echo #undef UVXf>>$@
880 @echo #undef USE_64_BIT_INT>>$@
881 @echo #undef Size_t_size>>$@
200b4fd9
SH
882!IF "$(USE_LARGE_FILES)"=="define"
883 @echo #define Off_t __int64>>$@
884 @echo #define LSEEKSIZE ^8>>$@
885 @echo #define Off_t_size ^8>>$@
886!ELSE
887 @echo #define Off_t long>>$@
888 @echo #define LSEEKSIZE ^4>>$@
889 @echo #define Off_t_size ^4>>$@
890!ENDIF
1f64ae15
SH
891!IF "$(WIN64)"=="define"
892 @echo #define PTRSIZE ^8>>$@
893 @echo #define SSize_t __int64>>$@
894 @echo #define HAS_ATOLL>>$@
895 @echo #define HAS_STRTOLL>>$@
896 @echo #define HAS_STRTOULL>>$@
897 @echo #define Size_t_size ^8>>$@
898!ELSE
899 @echo #define PTRSIZE ^4>>$@
900 @echo #define SSize_t int>>$@
901 @echo #undef HAS_ATOLL>>$@
902 @echo #undef HAS_STRTOLL>>$@
903 @echo #undef HAS_STRTOULL>>$@
904 @echo #define Size_t_size ^4>>$@
905!ENDIF
906!IF "$(USE_64_BIT_INT)"=="define"
907 @echo #define IVTYPE __int64>>$@
908 @echo #define UVTYPE unsigned __int64>>$@
909 @echo #define IVSIZE ^8>>$@
910 @echo #define UVSIZE ^8>>$@
911 @echo #undef NV_PRESERVES_UV>>$@
912 @echo #define NV_PRESERVES_UV_BITS 53>>$@
913 @echo #define IVdf "I64d">>$@
914 @echo #define UVuf "I64u">>$@
915 @echo #define UVof "I64o">>$@
916 @echo #define UVxf "I64x">>$@
917 @echo #define UVXf "I64X">>$@
918 @echo #define USE_64_BIT_INT>>$@
919!ELSE
920 @echo #define IVTYPE long>>$@
921 @echo #define UVTYPE unsigned long>>$@
922 @echo #define IVSIZE ^4>>$@
923 @echo #define UVSIZE ^4>>$@
924 @echo #define NV_PRESERVES_UV>>$@
925 @echo #define NV_PRESERVES_UV_BITS 32>>$@
926 @echo #define IVdf "ld">>$@
927 @echo #define UVuf "lu">>$@
928 @echo #define UVof "lo">>$@
929 @echo #define UVxf "lx">>$@
930 @echo #define UVXf "lX">>$@
931 @echo #undef USE_64_BIT_INT>>$@
932!ENDIF
933 @echo #endif>>$@
9e42cd94 934
04bf47ee 935..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
d801a0eb 936 cd .. && miniperl -Ilib make_patchnum.pl && cd win32
a148edb6 937
931482b7
NC
938# make sure that we recompile perl.c if the git version changes
939..\perl$(o) : ..\git_version.h
a148edb6 940
c788c1c2 941..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
9e42cd94
GS
942 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
943
1f64ae15
SH
944# This target is for when changes to the main config.sh happen.
945# Edit config.vc, then make perl in a minimal configuration (i.e. with MULTI,
8c847e66 946# ITHREADS, IMP_SYS and LARGE_FILES off), then make this target
76febb1c 947# to regenerate config_H.vc.
9e42cd94 948regen_config_h:
76febb1c 949 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
4e73d6a4 950 $(MINIPERL) -I..\lib ..\configpm --chdir=..
9e42cd94 951 -del /f $(CFGH_TMPL)
f6b3c354 952 -$(MINIPERL) -I..\lib config_h.PL
9e42cd94
GS
953 rename config.h $(CFGH_TMPL)
954
7b4d95f7 955$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
4e73d6a4 956 $(MINIPERL) -I..\lib ..\configpm --chdir=..
9e42cd94
GS
957 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
958 $(XCOPY) ..\*.h $(COREDIR)\*.*
959 $(XCOPY) *.h $(COREDIR)\*.*
9e42cd94 960 $(RCOPY) include $(COREDIR)\*.*
f6b3c354 961 -$(MINIPERL) -I..\lib config_h.PL
9e42cd94
GS
962 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
963
cb251201
NC
964# See the comment in Makefile.SH explaining this seemingly cranky ordering
965$(MINIPERL) : ..\lib\buildcustomize.pl
5e4c4c91 966
a9e545b9 967..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) ..\write_buildcustomize.pl
cb251201 968 $(LINK32) -subsystem:console -out:$(MINIPERL) @<<
19253ae6 969 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ)
9e42cd94 970<<
02bfb73b 971 $(EMBED_EXE_MANI:..\lib\buildcustomize.pl=..\miniperl.exe)
b78ac715 972 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
9e42cd94
GS
973
974$(MINIDIR) :
975 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
976
977$(MINICORE_OBJ) : $(CORE_NOCFG_H)
8c4561fb 978 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
9e42cd94
GS
979
980$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
a19baa61 981 $(CC) -c $(CFLAGS) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c
9e42cd94
GS
982
983# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
984# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
985!IF "$(USE_IMP_SYS)" == "define"
986perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
987 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
988!ENDIF
989
990# 1. we don't want to rebuild miniperl.exe when config.h changes
991# 2. we don't want to rebuild miniperl.exe with non-default config.h
931482b7 992# 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
9e42cd94
GS
993$(MINI_OBJ) : $(CORE_NOCFG_H)
994
995$(WIN32_OBJ) : $(CORE_H)
996$(CORE_OBJ) : $(CORE_H)
997$(DLL_OBJ) : $(CORE_H)
9e42cd94 998
d500e60d 999perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
c6d234b8 1000 $(MINIPERL) -I..\lib create_perllibst_h.pl
c1effa61 1001 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
080c3729 1002 CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
9e42cd94 1003
595589fa 1004$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
9e7cf449 1005 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @Extensions_static @<<
9e42cd94
GS
1006 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
1007<<
c8e599d3 1008 $(EMBED_DLL_MANI)
9e42cd94
GS
1009 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1010
4e036e4b
VK
1011$(PERLSTATICLIB): Extensions_static
1012 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static @<<
1013 $(PERLDLL_OBJ)
1014<<
1015 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1016
4ebea3c6 1017$(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
e84ac4e2 1018
9387abf8 1019$(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
9444d213 1020
6f83ef0e 1021$(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
6999193b
NC
1022
1023$(BITCOUNT_H) : $(GENUUDMAP)
9387abf8 1024 $(GENUUDMAP) $(GENERATED_HEADERS)
6f83ef0e
NC
1025
1026$(GENUUDMAP_OBJ) : ..\mg_raw.h
9444d213 1027
202d1001 1028$(GENUUDMAP) : $(GENUUDMAP_OBJ)
9444d213 1029 $(LINK32) -subsystem:console -out:$@ @<<
202d1001
SH
1030 $(LINK_FLAGS) $(LIBFILES) $(GENUUDMAP_OBJ)
1031<<
1032 $(EMBED_EXE_MANI)
9444d213 1033
9e42cd94
GS
1034perlmain.c : runperl.c
1035 copy runperl.c perlmain.c
1036
1037perlmain$(o) : perlmain.c
88c9158a 1038 $(CC) $(CFLAGS_O:-DPERLDLL=-UPERLDLL) $(OBJOUT_FLAG)$@ -c perlmain.c
9e42cd94 1039
4e036e4b
VK
1040perlmainst.c : runperl.c
1041 copy runperl.c perlmainst.c
1042
1043perlmainst$(o) : perlmainst.c
88c9158a 1044 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
4e036e4b 1045
931482b7 1046$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
56a86867 1047 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) \
aafd2430 1048 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
c8e599d3 1049 $(EMBED_EXE_MANI)
9e42cd94
GS
1050 copy $(PERLEXE) $(WPERLEXE)
1051 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
9e42cd94 1052
931482b7 1053$(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
56a86867 1054 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) \
aafd2430 1055 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
4e036e4b
VK
1056 $(EMBED_EXE_MANI)
1057
d1a21686 1058MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
f6b3c354 1059 $(MINIPERL) -I..\lib ..\mkppport
42e07562 1060
9dcb9602 1061#-------------------------------------------------------------------------------
281da5ea 1062# There's no direct way to mark a dependency on
6afd19bc 1063# DynaLoader.pm, so this will have to do
5e4c4c91 1064Extensions: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
a5ca303d 1065 $(XCOPY) ..\*.h $(COREDIR)\*.*
a193a2db 1066 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
595589fa 1067
5e4c4c91 1068Extensions_reonly: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
a5ca303d 1069 $(XCOPY) ..\*.h $(COREDIR)\*.*
a193a2db 1070 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
a24cc0c0 1071
183ebedc 1072Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
a5ca303d 1073 $(XCOPY) ..\*.h $(COREDIR)\*.*
a193a2db 1074 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
c6d234b8 1075 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
9e42cd94 1076
291c8c21 1077Extensions_nonxs: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
a34ce875 1078 $(XCOPY) ..\*.h $(COREDIR)\*.*
a193a2db 1079 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
a34ce875 1080
5e4c4c91 1081$(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
281da5ea
NC
1082 $(XCOPY) ..\*.h $(COREDIR)\*.*
1083 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1084
9e42cd94 1085Extensions_clean:
a193a2db 1086 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
9e42cd94 1087
b4dc1df6 1088Extensions_realclean:
a193a2db 1089 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
b4dc1df6 1090
9dcb9602 1091#-------------------------------------------------------------------------------
9e42cd94 1092
0195b144 1093doc: $(PERLEXE) ..\pod\perltoc.pod
a4e8ab8a 1094 $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
f8dbed5a 1095 --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML::=|)" \
9b1d99d7 1096 --recurse
9e42cd94 1097
0827416d
NC
1098..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1099 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1100
b0b6bf2b
AT
1101# Note that this next section is parsed (and regenerated) by pod/buildtoc
1102# so please check that script before making structural changes here
1103
e5a8a0fb 1104utils: $(PERLEXE) ..\utils\Makefile
9e42cd94
GS
1105 cd ..\utils
1106 $(MAKE) PERL=$(MINIPERL)
1107 cd ..\pod
b0b6bf2b
AT
1108 copy ..\README.aix ..\pod\perlaix.pod
1109 copy ..\README.amiga ..\pod\perlamiga.pod
6001596e 1110 copy ..\README.android ..\pod\perlandroid.pod
b0b6bf2b
AT
1111 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1112 copy ..\README.ce ..\pod\perlce.pod
1113 copy ..\README.cn ..\pod\perlcn.pod
1114 copy ..\README.cygwin ..\pod\perlcygwin.pod
b0b6bf2b 1115 copy ..\README.dos ..\pod\perldos.pod
b0b6bf2b 1116 copy ..\README.freebsd ..\pod\perlfreebsd.pod
9f968a8d 1117 copy ..\README.haiku ..\pod\perlhaiku.pod
b0b6bf2b
AT
1118 copy ..\README.hpux ..\pod\perlhpux.pod
1119 copy ..\README.hurd ..\pod\perlhurd.pod
1120 copy ..\README.irix ..\pod\perlirix.pod
1121 copy ..\README.jp ..\pod\perljp.pod
1122 copy ..\README.ko ..\pod\perlko.pod
6477b319 1123 copy ..\README.linux ..\pod\perllinux.pod
b0b6bf2b
AT
1124 copy ..\README.macos ..\pod\perlmacos.pod
1125 copy ..\README.macosx ..\pod\perlmacosx.pod
b0b6bf2b 1126 copy ..\README.netware ..\pod\perlnetware.pod
b0846812 1127 copy ..\README.openbsd ..\pod\perlopenbsd.pod
b0b6bf2b
AT
1128 copy ..\README.os2 ..\pod\perlos2.pod
1129 copy ..\README.os390 ..\pod\perlos390.pod
1130 copy ..\README.os400 ..\pod\perlos400.pod
1131 copy ..\README.plan9 ..\pod\perlplan9.pod
1132 copy ..\README.qnx ..\pod\perlqnx.pod
2f08ed66 1133 copy ..\README.riscos ..\pod\perlriscos.pod
b0b6bf2b 1134 copy ..\README.solaris ..\pod\perlsolaris.pod
27da23d5 1135 copy ..\README.symbian ..\pod\perlsymbian.pod
58534900 1136 copy ..\README.synology ..\pod\perlsynology.pod
b0b6bf2b
AT
1137 copy ..\README.tru64 ..\pod\perltru64.pod
1138 copy ..\README.tw ..\pod\perltw.pod
b0b6bf2b
AT
1139 copy ..\README.vos ..\pod\perlvos.pod
1140 copy ..\README.win32 ..\pod\perlwin32.pod
b5d4d3b9 1141 copy ..\pod\perldelta.pod ..\pod\perl5218delta.pod
9e42cd94
GS
1142 cd ..\win32
1143 $(PERLEXE) $(PL2BAT) $(UTILS)
f8d6280f 1144 $(MINIPERL) -I..\lib ..\autodoc.pl ..
f556af6c 1145 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
0195b144
NC
1146
1147..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
b78c1104 1148 $(PERLEXE) -f ..\pod\buildtoc -q
9e42cd94 1149
b0b6bf2b
AT
1150# Note that the pod cleanup in this next section is parsed (and regenerated
1151# by pod/buildtoc so please check that script before making changes here
1152
b4dc1df6 1153distclean: realclean
9e42cd94 1154 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
7b4d95f7 1155 $(PERLIMPLIB) ..\miniperl.lib $(PERLEXESTATIC) $(PERLSTATICLIB)
ca67812f
SH
1156 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1157 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
48462a74 1158 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
9e42cd94
GS
1159 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1160 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1161 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1162 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
9e42cd94
GS
1163 -del /f $(LIBDIR)\File\Glob.pm
1164 -del /f $(LIBDIR)\Storable.pm
ca67812f 1165 -del /f $(LIBDIR)\Sys\Hostname.pm
9e42cd94 1166 -del /f $(LIBDIR)\Time\HiRes.pm
9e42cd94 1167 -del /f $(LIBDIR)\Unicode\Normalize.pm
4e74047c 1168 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
b4ad57f4 1169 -del /f $(LIBDIR)\Win32.pm
37ca3c28 1170 -del /f $(LIBDIR)\Win32CORE.pm
00701878
SH
1171 -del /f $(LIBDIR)\Win32API\File.pm
1172 -del /f $(LIBDIR)\Win32API\File\cFile.pc
5e4c4c91 1173 -del /f $(LIBDIR)\buildcustomize.pl
a85e0e8c 1174 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
5daeb5b0 1175 -del /f *.def *.map
1a6c65ed
SH
1176 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1177 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1178 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1179 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
7afc9753 1180 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
46ffdcf0 1181 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
7afc9753
NC
1182 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1183 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
9e42cd94 1184 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1a6c65ed
SH
1185 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1186 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
ca67812f 1187 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1a6c65ed 1188 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
7afc9753 1189 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1a6c65ed
SH
1190 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1191 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1192 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1193 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1194 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
7afc9753
NC
1195 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1196 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1a6c65ed
SH
1197 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1198 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
96c33d98 1199 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
7afc9753
NC
1200 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1201 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1a6c65ed
SH
1202 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1203 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
7afc9753 1204 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
69f57184 1205 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1a6c65ed 1206 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1a6c65ed
SH
1207 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1208 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
69f57184 1209 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1a6c65ed 1210 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1a6c65ed 1211 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1a6c65ed
SH
1212 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1213 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
7afc9753 1214 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1a6c65ed
SH
1215 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1216 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1217 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1218 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
9e42cd94 1219 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
7afc9753 1220 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
d81c2d6a 1221 -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
6c4b87ea 1222 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1a6c65ed 1223 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
7afc9753 1224 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1a6c65ed 1225 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
7afc9753 1226 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1a6c65ed 1227 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
6c4b87ea 1228 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
8cf6f931 1229 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1a6c65ed 1230 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
7afc9753 1231 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
fb794281 1232 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
7afc9753 1233 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
00701878 1234 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
7afc9753 1235 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
60f0ee9d 1236 -cd $(PODDIR) && del /f *.html *.bat roffitall \
b5d4d3b9 1237 perl5218delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
6001596e
BF
1238 perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1239 perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1240 perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
1241 perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1242 perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1243 perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1244 perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
1245 perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
1246 perlwin32.pod
ca67812f 1247 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
c9dab4e9 1248 perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
2ea3abd4 1249 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
19ec6f53 1250 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
4e036e4b 1251 perlmainst.c
9e42cd94 1252 -del /f $(CONFIGPM)
a148edb6 1253 -del /f ..\lib\Config_git.pl
9e42cd94 1254 -del /f bin\*.bat
322fd642 1255 -del /f perllibst.h
4ebea3c6 1256 -del /f $(PERLEXE_RES) perl.base
85741d00 1257 -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
ca67812f 1258 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
a193a2db 1259 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
b212a3c6 1260 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
0827416d 1261 -del /s ..\utils\Makefile
9e42cd94 1262 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
9e42cd94 1263 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
b4a41557 1264 -if exist pod2htmd.tmp del pod2htmd.tmp
b4a41557 1265 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
0279961e 1266 -del /f ..\t\test_state
9e42cd94
GS
1267
1268install : all installbare installhtml
1269
0195b144 1270installbare : utils ..\pod\perltoc.pod
9e42cd94
GS
1271 $(PERLEXE) ..\installperl
1272 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
5548433c 1273 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
9e42cd94 1274 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
ec25c072 1275 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
9e42cd94
GS
1276 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1277
1278installhtml : doc
b4a41557 1279 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
9e42cd94
GS
1280
1281inst_lib : $(CONFIGPM)
9e42cd94
GS
1282 $(RCOPY) ..\lib $(INST_LIB)\*.*
1283
58fa074c 1284$(UNIDATAFILES) ..\pod\perluniprops.pod : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
27a8011f 1285 cd ..\lib\unicore && \
2a6dc374 1286 ..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p -check $@ $(FIRSTUNIFILE)
ca12659b 1287
735ecbe9 1288minitest : .\config.h $(MINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES)
6c85d12e
SH
1289 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1290 if exist ..\t\perl.exe del /f ..\t\perl.exe
1291 rename ..\t\miniperl.exe perl.exe
9e42cd94
GS
1292 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1293 attrib -r ..\t\*.*
a4e8ab8a 1294# Note this perl.exe is miniperl
49bf91e4 1295 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
9e42cd94 1296
3bef022b 1297test-prep : all utils ../pod/perltoc.pod
9e42cd94
GS
1298 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1299 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1300 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
0b4dcbc1 1301 set PERL_STATIC_EXT=$(STATIC_EXT)
9e42cd94
GS
1302
1303test : test-prep
1304 cd ..\t
a4e8ab8a 1305 perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
9e42cd94
GS
1306 cd ..\win32
1307
247c55c0
CBW
1308test_porting : test-prep
1309 cd ..\t
a4e8ab8a 1310 perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
247c55c0
CBW
1311 cd ..\win32
1312
6ae7e459
YO
1313test-reonly : reonly utils
1314 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1315 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1316 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1317 cd ..\t
a4e8ab8a 1318 perl.exe harness $(OPT) -re \bre\\/ $(EXTRA)
6ae7e459 1319 cd ..\win32
7bcddc65 1320
c900f745 1321regen :
7bcddc65
YO
1322 cd ..
1323 regen.pl
1324 cd win32
1325
9e42cd94
GS
1326test-notty : test-prep
1327 set PERL_SKIP_TTY_TEST=1
1328 cd ..\t
a4e8ab8a 1329 perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
9e42cd94
GS
1330 cd ..\win32
1331
b4a93add
NK
1332_test :
1333 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1334 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1335 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1336 cd ..\t
a4e8ab8a 1337 perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
b4a93add
NK
1338 cd ..\win32
1339
b4dc1df6 1340_clean :
9e42cd94
GS
1341 -@$(DEL) miniperlmain$(o)
1342 -@$(DEL) $(MINIPERL)
1343 -@$(DEL) perlglob$(o)
1344 -@$(DEL) perlmain$(o)
4e036e4b 1345 -@$(DEL) perlmainst$(o)
9e42cd94
GS
1346 -@$(DEL) config.w32
1347 -@$(DEL) config.h
a148edb6 1348 -@$(DEL) ..\git_version.h
9e42cd94
GS
1349 -@$(DEL) $(GLOBEXE)
1350 -@$(DEL) $(PERLEXE)
1351 -@$(DEL) $(WPERLEXE)
4e036e4b
VK
1352 -@$(DEL) $(PERLEXESTATIC)
1353 -@$(DEL) $(PERLSTATICLIB)
9e42cd94
GS
1354 -@$(DEL) $(PERLDLL)
1355 -@$(DEL) $(CORE_OBJ)
9387abf8 1356 -@$(DEL) $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
9e42cd94 1357 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
27a8011f 1358 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
27a8011f 1359 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
ca12659b 1360 -@$(DEL) $(UNIDATAFILES)
27a8011f 1361 -@$(DEL) $(WIN32_OBJ)
9e42cd94 1362 -@$(DEL) $(DLL_OBJ)
9e42cd94
GS
1363 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1364 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
9e42cd94
GS
1365 -@$(DEL) *.ilk
1366 -@$(DEL) *.pdb
9e7cf449 1367 -@$(DEL) Extensions_static
9e42cd94 1368
6e2cec71 1369clean : Extensions_clean _clean
b4dc1df6 1370
85741d00 1371realclean : Extensions_realclean _clean
b4dc1df6 1372
9e42cd94
GS
1373# Handy way to run perlbug -ok without having to install and run the
1374# installed perlbug. We don't re-run the tests here - we trust the user.
1375# Please *don't* use this unless all tests pass.
1376# If you want to report test failures, use "nmake nok" instead.
1377ok: utils
a4e8ab8a 1378 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
9e42cd94
GS
1379
1380okfile: utils
a4e8ab8a 1381 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
9e42cd94
GS
1382
1383nok: utils
a4e8ab8a 1384 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
9e42cd94
GS
1385
1386nokfile: utils
a4e8ab8a 1387 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok