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