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