This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Run "cd pod ; ../perl -I../lib buildtoc --build-all"
[perl5.git] / win32 / makefile.mk
CommitLineData
1e71036e
JH
1#
2# Makefile to build perl on Windows NT using DMAKE.
3# Supported compilers:
a7d225ec
SH
4# Visual C++ 2.0 or later
5# Borland C++ 5.02 or later
6# MinGW with gcc-2.95.2 or later
c623ac67 7# MS Platform SDK 64-bit compiler and tools **experimental**
1e71036e
JH
8#
9# This is set up to build a perl.exe that runs off a shared library
95bfaf42 10# (perl511.dll). Also makes individual DLLs for the XS extensions.
1e71036e
JH
11#
12
13##
14## Make sure you read README.win32 *before* you mess with anything here!
15##
16
17##
18## Build configuration. Edit the values below to suit your needs.
19##
20
21#
22# Set these to wherever you want "dmake install" to put your
23# newly built perl.
24#
25INST_DRV *= c:
26INST_TOP *= $(INST_DRV)\perl
27
28#
29# Comment this out if you DON'T want your perl installation to be versioned.
30# This means that the new installation will overwrite any files from the
31# old installation at the same INST_TOP location. Leaving it enabled is
32# the safest route, as perl adds the extra version directory to all the
33# locations it installs files to. If you disable it, an alternative
34# versioned installation can be obtained by setting INST_TOP above to a
35# path that includes an arbitrary version string.
36#
4eeeaff6 37#INST_VER *= \5.11.0
1e71036e
JH
38
39#
40# Comment this out if you DON'T want your perl installation to have
41# architecture specific components. This means that architecture-
42# specific files will be installed along with the architecture-neutral
43# files. Leaving it enabled is safer and more flexible, in case you
44# want to build multiple flavors of perl and install them together in
45# the same location. Commenting it out gives you a simpler
46# installation that is easier to understand for beginners.
47#
ec25c072 48#INST_ARCH *= \$(ARCHNAME)
1e71036e
JH
49
50#
7ada00a0
SH
51# Uncomment this if you want perl to run
52# $Config{sitelibexp}\sitecustomize.pl
53# before anything else. This script can then be set up, for example,
54# to add additional entries to @INC.
55#
56#USE_SITECUST *= define
57
58#
1e71036e 59# uncomment to enable multiple interpreters. This is need for fork()
2cbbe5a1 60# emulation and for thread support.
1e71036e
JH
61#
62USE_MULTI *= define
63
64#
2cbbe5a1
NIS
65# Interpreter cloning/threads; now reasonably complete.
66# This should be enabled to get the fork() emulation.
67# This needs USE_MULTI above.
1e71036e
JH
68#
69USE_ITHREADS *= define
70
71#
72# uncomment to enable the implicit "host" layer for all system calls
2cbbe5a1
NIS
73# made by perl. This needs USE_MULTI above.
74# This is also needed to get fork().
1e71036e
JH
75#
76USE_IMP_SYS *= define
77
78#
2cbbe5a1
NIS
79# Comment out next assign to disable perl's I/O subsystem and use compiler's
80# stdio for IO - depending on your compiler vendor and run time library you may
81# then get a number of fails from make test i.e. bugs - complain to them not us ;-).
82# You will also be unable to take full advantage of perl5.8's support for multiple
83# encodings and may see lower IO performance. You have been warned.
4a9d6100
GS
84USE_PERLIO *= define
85
86#
87# Comment this out if you don't want to enable large file support for
88# some reason. Should normally only be changed to maintain compatibility
89# with an older release of perl.
bdb4cb88 90USE_LARGE_FILES *= define
1e71036e
JH
91
92#
1e71036e
JH
93# uncomment exactly one of the following
94#
95# Visual C++ 2.x
96#CCTYPE *= MSVC20
97# Visual C++ > 2.x and < 6.x
98#CCTYPE *= MSVC
1c847d4b 99# Visual C++ 6.x (aka Visual C++ 98)
e2736246 100#CCTYPE *= MSVC60
1c847d4b 101# Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools)
da2c7419 102#CCTYPE *= MSVC70FREE
1c847d4b 103# Visual C++ .NET 2003 (aka Visual C++ 7.x) (full version)
da2c7419 104#CCTYPE *= MSVC70
1c847d4b
SH
105# Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version)
106#CCTYPE *= MSVC80FREE
107# Visual C++ 2005 (aka Visual C++ 8.x) (full version)
108#CCTYPE *= MSVC80
4a3cf07b
SH
109# Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version)
110#CCTYPE *= MSVC90FREE
111# Visual C++ 2008 (aka Visual C++ 9.x) (full version)
112#CCTYPE *= MSVC90
1e71036e
JH
113# Borland 5.02 or later
114#CCTYPE *= BORLAND
e2736246
SH
115# MinGW with gcc-2.95.2 or later
116CCTYPE *= GCC
1e71036e
JH
117
118#
119# uncomment this if your Borland compiler is older than v5.4.
bdb4cb88 120#BCCOLD *= define
1e71036e
JH
121#
122# uncomment this if you want to use Borland's VCL as your CRT
bdb4cb88 123#BCCVCL *= define
1e71036e
JH
124
125#
126# uncomment this if you are compiling under Windows 95/98 and command.com
127# (not needed if you're running under 4DOS/NT 6.01 or later)
128#IS_WIN95 *= define
129
130#
131# uncomment next line if you want debug version of perl (big,slow)
132# If not enabled, we automatically try to use maximum optimization
133# with all compilers that are known to have a working optimizer.
134#
2cbbe5a1 135#CFG *= Debug
1e71036e
JH
136
137#
138# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
139# It has patches that fix known bugs in older versions of MSVCRT.DLL.
140# This currently requires VC 5.0 with Service Pack 3 or later.
468f45d5 141# Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
1e71036e
JH
142# and follow the directions in the package to install.
143#
144# Not recommended if you have VC 6.x and you're not running Windows 9x.
145#
146#USE_PERLCRT *= define
147
148#
149# uncomment to enable linking with setargv.obj under the Visual C
150# compiler. Setting this options enables perl to expand wildcards in
151# arguments, but it may be harder to use alternate methods like
152# File::DosGlob that are more powerful. This option is supported only with
153# Visual C.
154#
155#USE_SETARGV *= define
156
157#
4ace4afb
SH
158# if you want to have the crypt() builtin function implemented, leave this or
159# CRYPT_LIB uncommented. The fcrypt.c file named here contains a suitable
160# version of des_fcrypt().
1e71036e 161#
4ace4afb 162CRYPT_SRC *= fcrypt.c
1e71036e
JH
163
164#
165# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
166# library, uncomment this, and make sure the library exists (see README.win32)
167# Specify the full pathname of the library.
168#
169#CRYPT_LIB *= fcrypt.lib
170
171#
172# set this if you wish to use perl's malloc
173# WARNING: Turning this on/off WILL break binary compatibility with extensions
174# you may have compiled with/without it. Be prepared to recompile all
175# extensions if you change the default. Currently, this cannot be enabled
176# if you ask for USE_IMP_SYS above.
177#
c800dd8b 178#PERL_MALLOC *= define
8bcd5811
VK
179
180#
181# set this to enable debugging mstats
182# This must be enabled to use the Devel::Peek::mstat() function. This cannot
183# be enabled without PERL_MALLOC as well.
184#
646e33b6 185#DEBUG_MSTATS *= define
1e71036e
JH
186
187#
ed2eab3f
SH
188# set this to additionally provide a statically linked perl-static.exe.
189# Note that dynamic loading will not work with this perl, so you must
a1f2e719 190# include required modules statically using the STATIC_EXT or ALL_STATIC
95bfaf42 191# variables below. A static library perl511s.lib will also be created.
ed2eab3f
SH
192# Ordinary perl.exe is not affected by this option.
193#
194#BUILD_STATIC *= define
195
196#
a1f2e719
VK
197# in addition to BUILD_STATIC the option ALL_STATIC makes *every*
198# extension get statically built
199# This will result in a very large perl executable, but the main purpose
200# is to have proper linking set so as to be able to create miscellaneous
201# executables with different built-in extensions
202#
203#ALL_STATIC *= define
204
205#
1e71036e
JH
206# set the install locations of the compiler include/libraries
207# Running VCVARS32.BAT is *required* when using Visual C.
208# Some versions of Visual C don't define MSVCDIR in the environment,
209# so you may have to set CCHOME explicitly (spaces in the path name should
210# not be quoted)
211#
c572eed0 212.IF "$(CCTYPE)" == "BORLAND"
8169a885 213CCHOME *= C:\Borland\BCC55
c572eed0
NIS
214.ELIF "$(CCTYPE)" == "GCC"
215CCHOME *= C:\MinGW
216.ELSE
1e71036e 217CCHOME *= $(MSVCDIR)
c572eed0 218.ENDIF
1e71036e
JH
219CCINCDIR *= $(CCHOME)\include
220CCLIBDIR *= $(CCHOME)\lib
221
222#
223# Additional compiler flags can be specified here.
224#
2e30e1e1 225BUILDOPT *= $(BUILDOPTEXTRA)
1e71036e
JH
226
227#
2eb87578
SH
228# Adding -DPERL_HASH_SEED_EXPLICIT will disable randomization of Perl's
229# internal hash function unless the PERL_HASH_SEED environment variable is set.
230# Alternatively, adding -DNO_HASH_SEED will completely disable the
231# randomization feature.
232# The latter is required to maintain binary compatibility with Perl 5.8.0.
233#
234#BUILDOPT += -DPERL_HASH_SEED_EXPLICIT
235#BUILDOPT += -DNO_HASH_SEED
236
237#
1e71036e
JH
238# This should normally be disabled. Adding -DPERL_POLLUTE enables support
239# for old symbols by default, at the expense of extreme pollution. You most
240# probably just want to build modules that won't compile with
241# perl Makefile.PL POLLUTE=1
242# instead of enabling this. Please report such modules to the respective
243# authors.
244#
245#BUILDOPT += -DPERL_POLLUTE
246
247#
248# This should normally be disabled. Enabling it will disable the File::Glob
249# implementation of CORE::glob.
250#
251#BUILDOPT += -DPERL_EXTERNAL_GLOB
252
253#
254# This should normally be disabled. Enabling it causes perl to read scripts
255# in text mode (which is the 5.005 behavior) and will break ByteLoader.
bdb4cb88 256#
1e71036e
JH
257#BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
258
259#
260# specify semicolon-separated list of extra directories that modules will
261# look for libraries (spaces in path names need not be quoted)
262#
263EXTRALIBDIRS *=
264
265#
266# set this to point to cmd.exe (only needed if you use some
267# alternate shell that doesn't grok cmd.exe style commands)
268#
269#SHELL *= g:\winnt\system32\cmd.exe
270
271#
272# set this to your email address (perl will guess a value from
273# from your loginname and your hostname, which may not be right)
274#
275#EMAIL *=
276
277##
278## Build configuration ends.
279##
280
281##################### CHANGE THESE ONLY IF YOU MUST #####################
282
283.IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
284D_CRYPT = undef
285.ELSE
286D_CRYPT = define
287CRYPT_FLAG = -DHAVE_DES_FCRYPT
288.ENDIF
289
1e71036e 290PERL_MALLOC *= undef
646e33b6 291DEBUG_MSTATS *= undef
1e71036e 292
7ada00a0 293USE_SITECUST *= undef
1e71036e 294USE_MULTI *= undef
1e71036e
JH
295USE_ITHREADS *= undef
296USE_IMP_SYS *= undef
297USE_PERLIO *= undef
4a9d6100 298USE_LARGE_FILES *= undef
1e71036e
JH
299USE_PERLCRT *= undef
300
646e33b6 301.IF "$(USE_IMP_SYS)" == "define"
8bcd5811 302PERL_MALLOC = undef
8bcd5811
VK
303.ENDIF
304
646e33b6
SH
305.IF "$(PERL_MALLOC)" == "undef"
306DEBUG_MSTATS = undef
8bcd5811
VK
307.ENDIF
308
309.IF "$(DEBUG_MSTATS)" == "define"
646e33b6 310BUILDOPT += -DPERL_DEBUGGING_MSTATS
c800dd8b
SH
311.ENDIF
312
66e09d83 313.IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef"
1e71036e
JH
314USE_MULTI != define
315.ENDIF
316
66e09d83 317.IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef"
1e71036e 318USE_MULTI != define
1e71036e
JH
319.ENDIF
320
7ada00a0
SH
321.IF "$(USE_SITECUST)" == "define"
322BUILDOPT += -DUSE_SITECUSTOMIZE
323.ENDIF
324
3db8f154 325.IF "$(USE_MULTI)" != "undef"
1e71036e
JH
326BUILDOPT += -DPERL_IMPLICIT_CONTEXT
327.ENDIF
328
329.IF "$(USE_IMP_SYS)" != "undef"
330BUILDOPT += -DPERL_IMPLICIT_SYS
331.ENDIF
332
9b1007c4 333.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE PROCESSOR_ARCHITEW6432 WIN64
1e71036e
JH
334
335PROCESSOR_ARCHITECTURE *= x86
336
c623ac67 337.IF "$(WIN64)" == ""
bf2a35e5
JD
338# When we are running from a 32bit cmd.exe on AMD64 then
339# PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
340# is set to AMD64
c623ac67 341.IF "$(PROCESSOR_ARCHITEW6432)" != ""
e9948054 342PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
c623ac67 343WIN64 = define
bf2a35e5 344.ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
c623ac67
GS
345WIN64 = define
346.ELSE
347WIN64 = undef
348.ENDIF
349.ENDIF
350
bf2a35e5
JD
351ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
352.IF "$(ARCHITECTURE)" == "AMD64"
353ARCHITECTURE = x64
9453ddcd 354.ENDIF
bf2a35e5
JD
355.IF "$(ARCHITECTURE)" == "IA64"
356ARCHITECTURE = ia64
9453ddcd
SH
357.ENDIF
358
3db8f154 359.IF "$(USE_MULTI)" == "define"
bf2a35e5 360ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
1e71036e
JH
361.ELSE
362.IF "$(USE_PERLIO)" == "define"
bf2a35e5 363ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
1e71036e 364.ELSE
bf2a35e5 365ARCHNAME = MSWin32-$(ARCHITECTURE)
1e71036e 366.ENDIF
1e71036e
JH
367.ENDIF
368
369.IF "$(USE_ITHREADS)" == "define"
370ARCHNAME !:= $(ARCHNAME)-thread
371.ENDIF
372
4a3cf07b
SH
373# Visual C++ 98, .NET 2003, 2005 and 2008 specific.
374# VC++ 6.x, 7.x, 8.x and 9.x can load DLL's on demand. Makes the test suite run
375# in about 10% less time. (The free version of 7.x can't do this, but the free
376# versions of 8.x and 9.x can.)
377.IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70" || \
378 "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" ||
379 "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE"
d1a8253e 380DELAYLOAD *= -DELAYLOAD:ws2_32.dll delayimp.lib
1e71036e
JH
381.ENDIF
382
4a3cf07b
SH
383# Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and
384# DLLs. These either need copying everywhere with the binaries, or else need
3ddd48aa
SH
385# embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
386# simplicity, embed them if they exist (and delete them afterwards so that they
387# don't get installed too).
4adc95e6
SH
388EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
389 if exist $@.manifest del $@.manifest
390EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
391 if exist $@.manifest del $@.manifest
c8e599d3 392
1e71036e
JH
393ARCHDIR = ..\lib\$(ARCHNAME)
394COREDIR = ..\lib\CORE
395AUTODIR = ..\lib\auto
396LIBDIR = ..\lib
397EXTDIR = ..\ext
a193a2db 398DISTDIR = ..\dist
83d5895a 399CPANDIR = ..\cpan
1e71036e
JH
400PODDIR = ..\pod
401EXTUTILSDIR = $(LIBDIR)\ExtUtils
b4a41557 402HTMLDIR = .\html
1e71036e
JH
403
404#
405INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
406INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
407INST_LIB = $(INST_TOP)$(INST_VER)\lib
408INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
409INST_COREDIR = $(INST_ARCHLIB)\CORE
1e71036e
JH
410INST_HTML = $(INST_TOP)$(INST_VER)\html
411
412#
413# Programs to compile, build .lib files and link
414#
415
416.USESHELL :
417
418.IF "$(CCTYPE)" == "BORLAND"
419
420CC = bcc32
421.IF "$(BCCOLD)" != "define"
422LINK32 = ilink32
423.ELSE
424LINK32 = tlink32
425.ENDIF
ed2eab3f 426LIB32 = tlib /a /P128
1e71036e 427IMPLIB = implib -c
e54e7e92 428RSC = brcc32
1e71036e
JH
429
430#
431# Options
432#
433INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
ba14dd9a 434#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
1e71036e
JH
435DEFINES = -DWIN32 $(CRYPT_FLAG)
436LOCDEFS = -DPERLDLL -DPERL_CORE
437SUBSYS = console
438CXX_FLAG = -P
439
440LIBC = cw32mti.lib
8169a885
SH
441
442# same libs as MSVC, except Borland doesn't have oldnames.lib
443LIBFILES = $(CRYPT_LIB) \
444 kernel32.lib user32.lib gdi32.lib winspool.lib \
445 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
446 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
447 version.lib odbc32.lib odbccp32.lib \
448 import32.lib $(LIBC)
1e71036e
JH
449
450.IF "$(CFG)" == "Debug"
451OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
452LINK_DBG = -v
453.ELSE
454OPTIMIZE = -O2 -D_RTLDLL
455LINK_DBG =
456.ENDIF
457
bb275e72 458EXTRACFLAGS =
1e71036e
JH
459CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
460 $(PCHFLAGS) $(OPTIMIZE)
457f4f73 461LINK_FLAGS = $(LINK_DBG) -x -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" \
8169a885 462 -L"$(CCLIBDIR)\PSDK"
1e71036e
JH
463OBJOUT_FLAG = -o
464EXEOUT_FLAG = -e
465LIBOUT_FLAG =
466.IF "$(BCCOLD)" != "define"
467LINK_FLAGS += -Gn
468DEFINES += -D_MT -D__USELOCALES__ -D_WIN32_WINNT=0x0410
469.END
470.IF "$(BCCVCL)" == "define"
471LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib
472LINK_FLAGS += -L"$(CCLIBDIR)\Release"
473.END
474
475
476.ELIF "$(CCTYPE)" == "GCC"
477
478CC = gcc
510ac311 479LINK32 = g++
1e71036e
JH
480LIB32 = ar rc
481IMPLIB = dlltool
986f8adc 482RSC = windres
1e71036e
JH
483
484i = .i
485o = .o
486a = .a
487
488#
489# Options
490#
491
492INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
493DEFINES = -DWIN32 $(CRYPT_FLAG)
494LOCDEFS = -DPERLDLL -DPERL_CORE
495SUBSYS = console
496CXX_FLAG = -xc++
497
679b67fe
JD
498# Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link
499# correctly if -lmsvcrt is specified explicitly.
500LIBC =
501#LIBC = -lmsvcrt
1e71036e
JH
502
503# same libs as MSVC
504LIBFILES = $(CRYPT_LIB) $(LIBC) \
505 -lmoldname -lkernel32 -luser32 -lgdi32 \
506 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
036c1c1e 507 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
8169a885 508 -lwinmm -lversion -lodbc32 -lodbccp32
1e71036e
JH
509
510.IF "$(CFG)" == "Debug"
511OPTIMIZE = -g -O2 -DDEBUGGING
512LINK_DBG = -g
513.ELSE
ec25c072
SH
514OPTIMIZE = -s -O2
515LINK_DBG = -s
1e71036e
JH
516.ENDIF
517
bb275e72 518EXTRACFLAGS =
1e71036e
JH
519CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
520LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
521OBJOUT_FLAG = -o
522EXEOUT_FLAG = -o
523LIBOUT_FLAG =
524
525# NOTE: we assume that GCC uses MSVCRT.DLL
46e77f11 526# See comments about PERL_MSVCRT_READFIX in the "cl" compiler section below.
654eccd5 527BUILDOPT += -fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX
1e71036e
JH
528
529.ELSE
530
531CC = cl
532LINK32 = link
533LIB32 = $(LINK32) -lib
534RSC = rc
535
536#
537# Options
538#
539
540INCLUDES = -I$(COREDIR) -I.\include -I. -I..
541#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
542DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
543LOCDEFS = -DPERLDLL -DPERL_CORE
544SUBSYS = console
a7d225ec 545CXX_FLAG = -TP -EHsc
1e71036e
JH
546
547.IF "$(USE_PERLCRT)" != "define"
548LIBC = msvcrt.lib
549.ELSE
550LIBC = PerlCRT.lib
551.ENDIF
552
1e71036e
JH
553.IF "$(CFG)" == "Debug"
554.IF "$(CCTYPE)" == "MSVC20"
555OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
1e71036e 556.ELSE
c623ac67 557OPTIMIZE = -O1 -MD -Zi -DDEBUGGING
1e71036e 558.ENDIF
c623ac67 559LINK_DBG = -debug
1e71036e 560.ELSE
ec25c072
SH
561OPTIMIZE = -MD -Zi -DNDEBUG
562# we enable debug symbols in release builds also
563LINK_DBG = -debug -opt:ref,icf
564# you may want to enable this if you want COFF symbols in the executables
565# in addition to the PDB symbols. The default Dr. Watson that ships with
566# Windows can use the the former but not latter. The free WinDbg can be
567# installed to get better stack traces from just the PDB symbols, so we
568# avoid the bloat of COFF symbols by default.
569#LINK_DBG = $(LINK_DBG) -debugtype:both
d921a5fb
GS
570.IF "$(WIN64)" == "define"
571# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
572OPTIMIZE += -Ox -GL
573LINK_DBG += -ltcg
1e71036e 574.ELSE
d921a5fb
GS
575# -O1 yields smaller code, which turns out to be faster than -O2 on x86
576OPTIMIZE += -O1
577#OPTIMIZE += -O2
1e71036e 578.ENDIF
1e71036e
JH
579.ENDIF
580
c623ac67
GS
581.IF "$(WIN64)" == "define"
582DEFINES += -DWIN64 -DCONSERVATIVE
9453ddcd 583OPTIMIZE += -Wp64 -fp:precise
da2c7419 584.ENDIF
c5b31784 585
4a3cf07b
SH
586# For now, silence VC++ 8.x's and 9.x's warnings about "unsafe" CRT functions
587# and POSIX CRT function names being deprecated.
588.IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \
589 "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE"
26a6faa8 590DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
c5b31784 591.ENDIF
da2c7419 592
46e77f11
SH
593# Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using
594# VC++ 6.x or earlier. Later versions use MSVCR70.dll, MSVCR71.dll, etc, which
595# do not require the fix.
596.IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC" || "$(CCTYPE)" == "MSVC60"
c623ac67
GS
597.IF "$(USE_PERLCRT)" != "define"
598BUILDOPT += -DPERL_MSVCRT_READFIX
599.ENDIF
46e77f11 600.ENDIF
c623ac67 601
1e71036e
JH
602LIBBASEFILES = $(CRYPT_LIB) \
603 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
604 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
036c1c1e 605 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
9453ddcd 606 version.lib odbc32.lib odbccp32.lib
c623ac67 607
9453ddcd
SH
608# The 64 bit Platform SDK compilers contain a runtime library that doesn't
609# include the buffer overrun verification code used by the /GS switch.
610# Since the code links against libraries that are compiled with /GS, this
611# "security cookie verification" must be included via bufferoverlow.lib.
612.IF "$(WIN64)" == "define"
613LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib
c623ac67 614.ENDIF
1e71036e
JH
615
616# we add LIBC here, since we may be using PerlCRT.dll
617LIBFILES = $(LIBBASEFILES) $(LIBC)
618
9453ddcd 619EXTRACFLAGS = -nologo -GF -W3
bb275e72 620CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
1e71036e
JH
621 $(PCHFLAGS) $(OPTIMIZE)
622LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
623 -libpath:"$(INST_COREDIR)" \
624 -machine:$(PROCESSOR_ARCHITECTURE)
ed2eab3f 625LIB_FLAGS = -nologo
1e71036e
JH
626OBJOUT_FLAG = -Fo
627EXEOUT_FLAG = -Fe
628LIBOUT_FLAG = /out:
629
1e71036e
JH
630.ENDIF
631
1e71036e
JH
632CFLAGS_O = $(CFLAGS) $(BUILDOPT)
633
634# used to allow local linking flags that are not propogated into Config.pm,
635# currently unused
636# -- BKS, 12-12-1999
637PRIV_LINK_FLAGS *=
638BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
639
640#################### do not edit below this line #######################
641############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
642
13631a73
SH
643# Some old dmakes (including Sarathy's one at
644# http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip)
645# don't support logical OR (||) or logical AND (&&) in conditional
646# expressions and hence don't process this makefile correctly. Determine
647# whether this is the case so that we can give the user an error message.
648.IF 1 == 1 || 1 == 1
649NEWDMAKE = define
66e09d83 650.ELSE
13631a73 651NEWDMAKE = undef
e54e7e92
SH
652.ENDIF
653
1e71036e
JH
654o *= .obj
655a *= .lib
656
657LKPRE = INPUT (
658LKPOST = )
659
660#
661# Rules
662#
663
664.SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
665
666.c$(o):
667 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
668
669.c.i:
670 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
671
672.y.c:
673 $(NOOP)
674
675$(o).dll:
676.IF "$(CCTYPE)" == "BORLAND"
677 $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
678 $(IMPLIB) $(*B).lib $@
679.ELIF "$(CCTYPE)" == "GCC"
680 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
681 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
682.ELSE
683 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
684 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
c8e599d3 685 $(EMBED_DLL_MANI)
1e71036e
JH
686.ENDIF
687
688.rc.res:
770c139a 689.IF "$(CCTYPE)" == "GCC"
a4a4db2c 690 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -i $< -o $@
770c139a
GM
691.ELSE
692 $(RSC) -i.. $<
693.ENDIF
1e71036e
JH
694
695#
696# various targets
697MINIPERL = ..\miniperl.exe
698MINIDIR = .\mini
699PERLEXE = ..\perl.exe
700WPERLEXE = ..\wperl.exe
ed2eab3f 701PERLEXESTATIC = ..\perl-static.exe
1e71036e 702GLOBEXE = ..\perlglob.exe
2d9d8159 703CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
1e71036e
JH
704MINIMOD = ..\lib\ExtUtils\Miniperl.pm
705X2P = ..\x2p\a2p.exe
202d1001 706GENUUDMAP = ..\generate_uudmap.exe
ed2eab3f
SH
707.IF "$(BUILD_STATIC)" == "define"
708PERLSTATIC = static
709.ELSE
710PERLSTATIC =
711.ENDIF
1e71036e 712
ca12659b
NC
713# Unicode data files generated by mktables
714UNIDATAFILES = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
715 ..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \
7ebf06b3
NC
716 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
717 ..\lib\unicore\PVA.pl
ca12659b
NC
718
719# Directories of Unicode data files generated by mktables
27a8011f
SH
720UNIDATADIR1 = ..\lib\unicore\To
721UNIDATADIR2 = ..\lib\unicore\lib
ca12659b 722
3890b58f
RGS
723PERLEXE_ICO = .\perlexe.ico
724PERLEXE_RES = .\perlexe.res
725PERLDLL_RES =
726
1e71036e
JH
727# Nominate a target which causes extensions to be re-built
728# This used to be $(PERLEXE), but at worst it is the .dll that they depend
729# on and really only the interface - i.e. the .def file used to export symbols
730# from the .dll
731PERLDEP = perldll.def
732
733
734PL2BAT = bin\pl2bat.pl
735GLOBBAT = bin\perlglob.bat
736
737UTILS = \
738 ..\utils\h2ph \
739 ..\utils\splain \
740 ..\utils\dprofpp \
741 ..\utils\perlbug \
742 ..\utils\pl2pm \
743 ..\utils\c2ph \
827a599d 744 ..\utils\pstruct \
1e71036e
JH
745 ..\utils\h2xs \
746 ..\utils\perldoc \
1e71036e
JH
747 ..\utils\perlivp \
748 ..\utils\libnetcfg \
827a599d
GS
749 ..\utils\enc2xs \
750 ..\utils\piconv \
bb4e9162 751 ..\utils\config_data \
18a1cebe 752 ..\utils\corelist \
83cd6e83 753 ..\utils\cpan \
ea0e987d 754 ..\utils\xsubpp \
4b618757 755 ..\utils\prove \
291d3373 756 ..\utils\ptar \
b8669316 757 ..\utils\ptardiff \
6aaee015
RGS
758 ..\utils\cpanp-run-perl \
759 ..\utils\cpanp \
760 ..\utils\cpan2dist \
3ddf9550 761 ..\utils\shasum \
ea0e987d 762 ..\utils\instmodsh \
1e71036e
JH
763 ..\pod\pod2html \
764 ..\pod\pod2latex \
765 ..\pod\pod2man \
766 ..\pod\pod2text \
767 ..\pod\pod2usage \
768 ..\pod\podchecker \
769 ..\pod\podselect \
770 ..\x2p\find2perl \
827a599d 771 ..\x2p\psed \
1e71036e 772 ..\x2p\s2p \
1e71036e
JH
773 bin\exetype.pl \
774 bin\runperl.pl \
775 bin\pl2bat.pl \
776 bin\perlglob.pl \
777 bin\search.pl
778
779.IF "$(CCTYPE)" == "BORLAND"
780
781CFGSH_TMPL = config.bc
782CFGH_TMPL = config_H.bc
783
784.ELIF "$(CCTYPE)" == "GCC"
785
786CFGSH_TMPL = config.gc
787CFGH_TMPL = config_H.gc
95bfaf42
SP
788PERLIMPLIB = ..\libperl511$(a)
789PERLSTATICLIB = ..\libperl511s$(a)
1e71036e
JH
790
791.ELSE
792
c623ac67
GS
793.IF "$(WIN64)" == "define"
794CFGSH_TMPL = config.vc64
795CFGH_TMPL = config_H.vc64
796.ELSE
1e71036e
JH
797CFGSH_TMPL = config.vc
798CFGH_TMPL = config_H.vc
c623ac67 799.ENDIF
1e71036e
JH
800
801.ENDIF
802
803# makedef.pl must be updated if this changes, and this should normally
804# only change when there is an incompatible revision of the public API.
95bfaf42
SP
805PERLIMPLIB *= ..\perl511$(a)
806PERLSTATICLIB *= ..\perl511s$(a)
807PERLDLL = ..\perl511.dll
1e71036e 808
b6ed7314
YO
809XCOPY = xcopy /f /r /i /d /y
810RCOPY = xcopy /f /r /i /e /d /y
65980d94 811NOOP = @rem
1e71036e 812
1e71036e
JH
813MICROCORE_SRC = \
814 ..\av.c \
815 ..\deb.c \
816 ..\doio.c \
817 ..\doop.c \
818 ..\dump.c \
819 ..\globals.c \
820 ..\gv.c \
e1a479c5 821 ..\mro.c \
1e71036e
JH
822 ..\hv.c \
823 ..\locale.c \
a0d89a74 824 ..\mathoms.c \
1e71036e
JH
825 ..\mg.c \
826 ..\numeric.c \
827 ..\op.c \
ff6de8cd 828 ..\pad.c \
1e71036e
JH
829 ..\perl.c \
830 ..\perlapi.c \
831 ..\perly.c \
832 ..\pp.c \
833 ..\pp_ctl.c \
834 ..\pp_hot.c \
835 ..\pp_pack.c \
84d4ea48 836 ..\pp_sort.c \
1e71036e 837 ..\pp_sys.c \
10bc17b6 838 ..\reentr.c \
1e71036e
JH
839 ..\regcomp.c \
840 ..\regexec.c \
841 ..\run.c \
842 ..\scope.c \
843 ..\sv.c \
844 ..\taint.c \
845 ..\toke.c \
846 ..\universal.c \
847 ..\utf8.c \
48462a74 848 ..\util.c
1e71036e
JH
849
850EXTRACORE_SRC += perllib.c
851
852.IF "$(PERL_MALLOC)" == "define"
853EXTRACORE_SRC += ..\malloc.c
854.ENDIF
855
1e71036e 856EXTRACORE_SRC += ..\perlio.c
1e71036e
JH
857
858WIN32_SRC = \
859 .\win32.c \
1e71036e
JH
860 .\win32sck.c \
861 .\win32thread.c
862
b6d604f4
NIS
863# We need this for miniperl build unless we override canned
864# config.h #define building mini\*
865#.IF "$(USE_PERLIO)" == "define"
6ea0e807 866WIN32_SRC += .\win32io.c
b6d604f4 867#.ENDIF
6ea0e807 868
1e71036e
JH
869.IF "$(CRYPT_SRC)" != ""
870WIN32_SRC += .\$(CRYPT_SRC)
871.ENDIF
872
1e71036e
JH
873X2P_SRC = \
874 ..\x2p\a2p.c \
875 ..\x2p\hash.c \
876 ..\x2p\str.c \
877 ..\x2p\util.c \
878 ..\x2p\walk.c
879
880CORE_NOCFG_H = \
881 ..\av.h \
882 ..\cop.h \
883 ..\cv.h \
884 ..\dosish.h \
885 ..\embed.h \
886 ..\form.h \
887 ..\gv.h \
888 ..\handy.h \
889 ..\hv.h \
890 ..\iperlsys.h \
891 ..\mg.h \
892 ..\nostdio.h \
893 ..\op.h \
894 ..\opcode.h \
895 ..\perl.h \
896 ..\perlapi.h \
897 ..\perlsdio.h \
898 ..\perlsfio.h \
899 ..\perly.h \
900 ..\pp.h \
901 ..\proto.h \
cdb0f547 902 ..\regcomp.h \
1e71036e
JH
903 ..\regexp.h \
904 ..\scope.h \
905 ..\sv.h \
906 ..\thread.h \
907 ..\unixish.h \
908 ..\utf8.h \
909 ..\util.h \
910 ..\warnings.h \
911 ..\XSUB.h \
912 ..\EXTERN.h \
913 ..\perlvars.h \
914 ..\intrpvar.h \
1e71036e
JH
915 .\include\dirent.h \
916 .\include\netdb.h \
917 .\include\sys\socket.h \
918 .\win32.h
919
a148edb6 920CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
1e71036e 921
202d1001 922UUDMAP_H = ..\uudmap.h
efa50c51 923BITCOUNT_H = ..\bitcount.h
202d1001 924
1e71036e
JH
925MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
926CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
927WIN32_OBJ = $(WIN32_SRC:db:+$(o))
928MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
ba14dd9a 929MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
1e71036e 930MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
281da5ea 931DLL_OBJ = $(DYNALOADER)
1e71036e 932X2P_OBJ = $(X2P_SRC:db:+$(o))
202d1001 933GENUUDMAP_OBJ = $(GENUUDMAP:db:+$(o))
1e71036e
JH
934
935PERLDLL_OBJ = $(CORE_OBJ)
936PERLEXE_OBJ = perlmain$(o)
ed2eab3f 937PERLEXEST_OBJ = perlmainst$(o)
1e71036e
JH
938
939PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
940
941.IF "$(USE_SETARGV)" != ""
942SETARGV_OBJ = setargv$(o)
943.ENDIF
944
a1f2e719
VK
945.IF "$(ALL_STATIC)" == "define"
946# some exclusions, unfortunately, until fixed:
947# - Win32 extension contains overlapped symbols with win32.c (BUG!)
948# - MakeMaker isn't capable enough for SDBM_File (smaller bug)
949# - Encode (encoding search algorithm relies on shared library?)
9788a75a 950STATIC_EXT = * !Win32 !SDBM_File !Encode
a1f2e719
VK
951.ELSE
952# specify static extensions here, for example:
47ef3394 953#STATIC_EXT = Cwd Compress/Raw/Zlib
78ff2d7b 954STATIC_EXT = Win32CORE
a1f2e719 955.ENDIF
1e71036e 956
281da5ea 957DYNALOADER = ..\DynaLoader$(o)
1e71036e 958
1e71036e
JH
959# vars must be separated by "\t+~\t+", since we're using the tempfile
960# version of config_sh.pl (we were overflowing someone's buffer by
961# trying to fit them all on the command line)
962# -- BKS 10-17-1999
963CFG_VARS = \
964 INST_DRV=$(INST_DRV) ~ \
13631a73
SH
965 INST_TOP=$(INST_TOP) ~ \
966 INST_VER=$(INST_VER) ~ \
1e71036e
JH
967 INST_ARCH=$(INST_ARCH) ~ \
968 archname=$(ARCHNAME) ~ \
969 cc=$(CC) ~ \
970 ld=$(LINK32) ~ \
bb275e72 971 ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
1e71036e
JH
972 cf_email=$(EMAIL) ~ \
973 d_crypt=$(D_CRYPT) ~ \
974 d_mymalloc=$(PERL_MALLOC) ~ \
975 libs=$(LIBFILES:f) ~ \
13631a73 976 incpath=$(CCINCDIR) ~ \
1e71036e 977 libperl=$(PERLIMPLIB:f) ~ \
13631a73 978 libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
1e71036e
JH
979 libc=$(LIBC) ~ \
980 make=dmake ~ \
84c322f7
MB
981 _o=$(o) ~ \
982 obj_ext=$(o) ~ \
983 _a=$(a) ~ \
984 lib_ext=$(a) ~ \
1e71036e 985 static_ext=$(STATIC_EXT) ~ \
7e0017d3 986 usethreads=$(USE_ITHREADS) ~ \
1e71036e 987 useithreads=$(USE_ITHREADS) ~ \
1e71036e
JH
988 usemultiplicity=$(USE_MULTI) ~ \
989 useperlio=$(USE_PERLIO) ~ \
c7dd62f6 990 uselargefiles=$(USE_LARGE_FILES) ~ \
7ada00a0 991 usesitecustomize=$(USE_SITECUST) ~ \
13631a73 992 LINK_FLAGS=$(LINK_FLAGS) ~ \
1e71036e
JH
993 optimize=$(OPTIMIZE)
994
995#
996# set up targets varying between Win95 and WinNT builds
997#
998
999.IF "$(IS_WIN95)" == "define"
1000MK2 = .\makefile.95
1001RIGHTMAKE = __switch_makefiles
1e71036e
JH
1002.ELSE
1003MK2 = __not_needed
1004RIGHTMAKE =
1005.ENDIF
1006
8169a885
SH
1007.IMPORT .IGNORE : SystemRoot windir
1008
1009# Don't just .IMPORT OS from the environment because dmake sets OS itself.
1010ENV_OS=$(subst,OS=, $(shell @set OS))
1011
1012.IF "$(ENV_OS)" == "Windows_NT"
1013ODBCCP32_DLL = $(SystemRoot)\system32\odbccp32.dll
1014.ELSE
1015ODBCCP32_DLL = $(windir)\system\odbccp32.dll
1016.ENDIF
1017
1487a039 1018ICWD = -I..\cpan\Cwd -I..\cpan\Cwd\lib
403f501d 1019
1e71036e
JH
1020#
1021# Top targets
1022#
1023
a148edb6
SH
1024all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) $(MK2) \
1025 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) MakePPPort \
a34ce875 1026 $(PERLEXE) $(X2P) Extensions Extensions_nonxs $(PERLSTATIC)
1e71036e 1027
9ce5b024 1028..\regcharclass.h : ..\Porting\regcharclass.pl
e094b17e 1029 cd .. && miniperl Porting\regcharclass.pl && cd win32
9ce5b024 1030
c900f745
SH
1031regnodes : ..\regnodes.h
1032
9ce5b024
SH
1033..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
1034
1035..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
1036
a148edb6
SH
1037reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) $(MK2) \
1038 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
250c5aad
SH
1039 $(X2P) Extensions_reonly
1040
ed2eab3f
SH
1041static: $(PERLEXESTATIC)
1042
1e71036e
JH
1043#----------------------------------------------------------------
1044
1045#-------------------- BEGIN Win95 SPECIFIC ----------------------
1046
1047# this target is a jump-off point for Win95
1048# 1. it switches to the Win95-specific makefile if it exists
1049# (__do_switch_makefiles)
1050# 2. it prints a message when the Win95-specific one finishes (__done)
1051# 3. it then kills this makefile by trying to make __no_such_target
1052
1053__switch_makefiles: __do_switch_makefiles __done __no_such_target
1054
1055__do_switch_makefiles:
1056.IF "$(NOTFIRST)" != "true"
1057 if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true
1058.ELSE
1059 $(NOOP)
1060.ENDIF
1061
1062.IF "$(NOTFIRST)" != "true"
1063__done:
1064 @echo Build process complete. Ignore any errors after this message.
1065 @echo Run "dmake test" to test and "dmake install" to install
1066
1067.ELSE
1068# dummy targets for Win95-specific makefile
1069
1070__done:
1071 $(NOOP)
1072
1073__no_such_target:
1074 $(NOOP)
1075
1076.ENDIF
1077
1078# This target is used to generate the new makefile (.\makefile.95) for Win95
1079
1080.\makefile.95: .\makefile.mk
1081 $(MINIPERL) genmk95.pl makefile.mk $(MK2)
1082
1083#--------------------- END Win95 SPECIFIC ---------------------
1084
1085# a blank target for when builds don't need to do certain things
1086# this target added for Win95 port but used to keep the WinNT port able to
1087# use this file
1088__not_needed:
1089 $(NOOP)
1090
13631a73
SH
1091CHECKDMAKE :
1092.IF "$(NEWDMAKE)" == "define"
1093 $(NOOP)
1094.ELSE
1095 @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions.
1096 @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/
1097 @exit 1
1098.ENDIF
1099
1e71036e
JH
1100$(GLOBEXE) : perlglob$(o)
1101.IF "$(CCTYPE)" == "BORLAND"
1102 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
1103 $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \
1104 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
1105.ELIF "$(CCTYPE)" == "GCC"
1106 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
1107.ELSE
1108 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
1109 perlglob$(o) setargv$(o)
c8e599d3 1110 $(EMBED_EXE_MANI)
1e71036e
JH
1111.ENDIF
1112
1113perlglob$(o) : perlglob.c
1114
1115config.w32 : $(CFGSH_TMPL)
1116 copy $(CFGSH_TMPL) config.w32
1117
1118.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
1119 -del /f config.h
1120 copy $(CFGH_TMPL) config.h
1121
fcd65f8d 1122..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
16ad9bfa 1123 cd .. && miniperl -Ilib make_patchnum.pl
a148edb6 1124
931482b7
NC
1125# make sure that we recompile perl.c if the git version changes
1126..\perl$(o) : ..\git_version.h
a148edb6 1127
1e71036e
JH
1128..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
1129 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
1130 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
1131
76febb1c
SH
1132# this target is for when changes to the main config.sh happen.
1133# edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1134# with MULTI, ITHREADS, IMP_SYS, LARGE_FILES, PERLIO and CRYPT off), then make
1135# this target to regenerate config_H.gc.
1136# unfortunately, some further manual editing is also then required to restore all
1137# the special _MSC_VER handling that is otherwise lost.
1138# repeat for config.bc and config_H.bc (using BORLAND), except that there is no
1139# _MSC_VER stuff in that case.
1e71036e 1140regen_config_h:
76febb1c 1141 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
1e71036e 1142 $(CFGSH_TMPL) > ..\config.sh
4e73d6a4 1143 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1e71036e 1144 -del /f $(CFGH_TMPL)
38cd195c 1145 -$(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)"
1e71036e
JH
1146 rename config.h $(CFGH_TMPL)
1147
1148$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
4e73d6a4 1149 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1e71036e
JH
1150 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
1151 $(XCOPY) ..\*.h $(COREDIR)\*.*
1152 $(XCOPY) *.h $(COREDIR)\*.*
1153 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
1154 $(RCOPY) include $(COREDIR)\*.*
38cd195c 1155 $(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)" \
1e71036e
JH
1156 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
1157
1158$(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS)
1159.IF "$(CCTYPE)" == "BORLAND"
8169a885
SH
1160 if not exist $(CCLIBDIR)\PSDK\odbccp32.lib \
1161 cd $(CCLIBDIR)\PSDK && implib odbccp32.lib $(ODBCCP32_DLL)
1e71036e 1162 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
13631a73 1163 @$(mktmp c0x32$(o) $(MINI_OBJ),$@,,$(LIBFILES),)
1e71036e
JH
1164.ELIF "$(CCTYPE)" == "GCC"
1165 $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \
13631a73 1166 $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST))
1e71036e 1167.ELSE
78d58004 1168 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
13631a73 1169 @$(mktmp $(LIBFILES) $(MINI_OBJ))
c8e599d3 1170 $(EMBED_EXE_MANI)
1e71036e
JH
1171.ENDIF
1172
1173$(MINIDIR) :
1174 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1175
1176$(MINICORE_OBJ) : $(CORE_NOCFG_H)
8c4561fb 1177 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*B).c
1e71036e
JH
1178
1179$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1180 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
1181
1182# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1183# rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1184# unless the .IF is true), so instead we use a .ELSE with the default.
1185# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1186
1187perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
acfe0abc 1188.IF "$(USE_IMP_SYS)" == "define"
322fd642 1189 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1e71036e 1190.ELSE
322fd642 1191 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
1e71036e
JH
1192.ENDIF
1193
1194# 1. we don't want to rebuild miniperl.exe when config.h changes
1195# 2. we don't want to rebuild miniperl.exe with non-default config.h
931482b7 1196# 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1e71036e
JH
1197$(MINI_OBJ) : $(CORE_NOCFG_H)
1198
1199$(WIN32_OBJ) : $(CORE_H)
9848074e 1200
1e71036e 1201$(CORE_OBJ) : $(CORE_H)
9848074e 1202
1e71036e 1203$(DLL_OBJ) : $(CORE_H)
9848074e 1204
1e71036e
JH
1205$(X2P_OBJ) : $(CORE_H)
1206
c6d234b8
NC
1207perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl create_perllibst_h.pl
1208 $(MINIPERL) -I..\lib create_perllibst_h.pl
c1effa61 1209 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1e71036e
JH
1210 $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
1211
d2b25974 1212$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1e71036e
JH
1213.IF "$(CCTYPE)" == "BORLAND"
1214 $(LINK32) -Tpd -ap $(BLINK_FLAGS) \
13631a73
SH
1215 @$(mktmp c0d32$(o) $(PERLDLL_OBJ),$@,, \
1216 $(shell @type Extensions_static) $(LIBFILES),perldll.def)
1e71036e
JH
1217 $(IMPLIB) $*.lib $@
1218.ELIF "$(CCTYPE)" == "GCC"
1219 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
13631a73
SH
1220 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1221 $(shell @type Extensions_static) \
1222 $(LIBFILES) $(LKPOST))
1e71036e
JH
1223 dlltool --output-lib $(PERLIMPLIB) \
1224 --dllname $(PERLDLL:b).dll \
1225 --def perldll.def \
1226 --base-file perl.base \
1227 --output-exp perl.exp
1228 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
13631a73
SH
1229 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1230 $(shell @type Extensions_static) \
1231 $(LIBFILES) perl.exp $(LKPOST))
1e71036e 1232.ELSE
78d58004 1233 $(LINK32) -dll -def:perldll.def -out:$@ $(BLINK_FLAGS) \
9e7cf449 1234 @Extensions_static \
78d58004 1235 @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
13631a73 1236 $(PERLDLL_RES) $(PERLDLL_OBJ))
c8e599d3 1237 $(EMBED_DLL_MANI)
1e71036e
JH
1238.ENDIF
1239 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1240
ed2eab3f
SH
1241$(PERLSTATICLIB): Extensions_static
1242.IF "$(CCTYPE)" == "BORLAND"
1243 $(LIB32) $(LIB_FLAGS) $@ \
13631a73
SH
1244 @$(mktmp $(shell @type Extensions_static) \
1245 $(PERLDLL_OBJ))
ed2eab3f 1246.ELIF "$(CCTYPE)" == "GCC"
df06d623
SH
1247# XXX: It would be nice if MinGW's ar accepted a temporary file, but this
1248# doesn't seem to work:
1249# $(LIB32) $(LIB_FLAGS) $@ \
13631a73
SH
1250# $(mktmp $(LKPRE) $(shell @type Extensions_static) \
1251# $(PERLDLL_OBJ) $(LKPOST))
df06d623 1252 $(LIB32) $(LIB_FLAGS) $@ \
13631a73
SH
1253 $(shell @type Extensions_static) \
1254 $(PERLDLL_OBJ)
ed2eab3f
SH
1255.ELSE
1256 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
13631a73 1257 @$(mktmp $(PERLDLL_OBJ))
ed2eab3f
SH
1258.ENDIF
1259 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
d2b25974 1260
4fe8ccd6 1261$(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO)
e84ac4e2 1262
1e71036e
JH
1263$(MINIMOD) : $(MINIPERL) ..\minimod.pl
1264 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
1265
1266..\x2p\a2p$(o) : ..\x2p\a2p.c
1267 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
1268
1269..\x2p\hash$(o) : ..\x2p\hash.c
1270 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
1271
1272..\x2p\str$(o) : ..\x2p\str.c
1273 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
1274
1275..\x2p\util$(o) : ..\x2p\util.c
1276 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1277
1278..\x2p\walk$(o) : ..\x2p\walk.c
1279 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1280
403f501d 1281$(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions
c1effa61
NC
1282 $(MINIPERL) -I..\lib ..\x2p\find2perl.PL
1283 $(MINIPERL) -I..\lib ..\x2p\s2p.PL
1e71036e
JH
1284.IF "$(CCTYPE)" == "BORLAND"
1285 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
13631a73 1286 @$(mktmp c0x32$(o) $(X2P_OBJ),$@,,$(LIBFILES),)
1e71036e
JH
1287.ELIF "$(CCTYPE)" == "GCC"
1288 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
13631a73 1289 $(mktmp $(LKPRE) $(X2P_OBJ) $(LIBFILES) $(LKPOST))
1e71036e 1290.ELSE
78d58004 1291 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
13631a73 1292 @$(mktmp $(LIBFILES) $(X2P_OBJ))
c8e599d3 1293 $(EMBED_EXE_MANI)
1e71036e
JH
1294.ENDIF
1295
efa50c51 1296$(MINIDIR)\globals$(o) : $(UUDMAP_H) $(BITCOUNT_H)
9444d213 1297
efa50c51
NC
1298$(UUDMAP_H) $(BITCOUNT_H) : $(GENUUDMAP)
1299 $(GENUUDMAP) $(UUDMAP_H) $(BITCOUNT_H)
9444d213 1300
202d1001 1301$(GENUUDMAP) : $(GENUUDMAP_OBJ)
9444d213
NC
1302.IF "$(CCTYPE)" == "BORLAND"
1303 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
13631a73 1304 @$(mktmp c0x32$(o) $(GENUUDMAP_OBJ),$@,,$(LIBFILES),)
9444d213
NC
1305.ELIF "$(CCTYPE)" == "GCC"
1306 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
13631a73 1307 $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST))
9444d213
NC
1308.ELSE
1309 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
13631a73 1310 @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ))
202d1001 1311 $(EMBED_EXE_MANI)
9444d213
NC
1312.ENDIF
1313
1e71036e
JH
1314perlmain.c : runperl.c
1315 copy runperl.c perlmain.c
1316
1317perlmain$(o) : perlmain.c
88c9158a 1318 $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ -c perlmain.c
1e71036e 1319
ed2eab3f
SH
1320perlmainst.c : runperl.c
1321 copy runperl.c perlmainst.c
1322
1323perlmainst$(o) : perlmainst.c
88c9158a 1324 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
ed2eab3f 1325
931482b7 1326$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1e71036e
JH
1327.IF "$(CCTYPE)" == "BORLAND"
1328 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
13631a73
SH
1329 @$(mktmp c0x32$(o) $(PERLEXE_OBJ),$@,, \
1330 $(PERLIMPLIB) $(LIBFILES),,$(PERLEXE_RES))
1e71036e
JH
1331.ELIF "$(CCTYPE)" == "GCC"
1332 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
f721bdf3 1333 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1e71036e
JH
1334.ELSE
1335 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1336 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
c8e599d3 1337 $(EMBED_EXE_MANI)
1e71036e
JH
1338.ENDIF
1339 copy $(PERLEXE) $(WPERLEXE)
1340 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1e71036e 1341
931482b7 1342$(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
ed2eab3f
SH
1343.IF "$(CCTYPE)" == "BORLAND"
1344 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
13631a73
SH
1345 @$(mktmp c0x32$(o) $(PERLEXEST_OBJ),$@,, \
1346 $(shell @type Extensions_static) $(PERLSTATICLIB) $(LIBFILES),, \
1347 $(PERLEXE_RES))
ed2eab3f
SH
1348.ELIF "$(CCTYPE)" == "GCC"
1349 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
13631a73
SH
1350 $(mktmp $(LKPRE) $(shell @type Extensions_static) \
1351 $(PERLSTATICLIB) $(LIBFILES) $(PERLEXEST_OBJ) \
1352 $(PERLEXE_RES) $(LKPOST))
ed2eab3f
SH
1353.ELSE
1354 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
a1f2e719 1355 @Extensions_static $(PERLSTATICLIB) /PDB:NONE \
ed2eab3f
SH
1356 $(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES)
1357 $(EMBED_EXE_MANI)
1358.ENDIF
1359
d1a21686 1360MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
403f501d 1361 $(MINIPERL) -I..\lib $(ICWD) ..\mkppport
42e07562 1362
9dcb9602 1363#-------------------------------------------------------------------------------
281da5ea 1364# There's no direct way to mark a dependency on
6afd19bc 1365# DynaLoader.pm, so this will have to do
281da5ea 1366Extensions : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
250c5aad 1367 $(XCOPY) ..\*.h $(COREDIR)\*.*
a193a2db 1368 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
d2b25974 1369
281da5ea 1370Extensions_reonly : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
250c5aad 1371 $(XCOPY) ..\*.h $(COREDIR)\*.*
a193a2db 1372 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
250c5aad 1373
286d62c2 1374Extensions_static : ..\make_ext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
250c5aad 1375 $(XCOPY) ..\*.h $(COREDIR)\*.*
a193a2db 1376 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
c6d234b8 1377 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1e71036e 1378
9ddff148 1379Extensions_nonxs : ..\make_ext.pl $(PERLDEP) $(CONFIGPM)
a34ce875 1380 $(XCOPY) ..\*.h $(COREDIR)\*.*
a193a2db 1381 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
a34ce875 1382
281da5ea
NC
1383$(DYNALOADER) : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1384 $(XCOPY) ..\*.h $(COREDIR)\*.*
1385 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1386
ba14dd9a 1387Extensions_clean :
a193a2db 1388 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1e71036e 1389
b4dc1df6 1390Extensions_realclean :
a193a2db 1391 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
b4dc1df6 1392
9dcb9602 1393#-------------------------------------------------------------------------------
1e71036e
JH
1394
1395
0195b144 1396doc: $(PERLEXE) ..\pod\perltoc.pod
b4a41557 1397 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1e71036e
JH
1398 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1399 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1400
b0b6bf2b
AT
1401# Note that this next section is parsed (and regenerated) by pod/buildtoc
1402# so please check that script before making structural changes here
9ddff148 1403utils: $(PERLEXE) $(X2P)
1e71036e 1404 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
b0b6bf2b
AT
1405 copy ..\README.aix ..\pod\perlaix.pod
1406 copy ..\README.amiga ..\pod\perlamiga.pod
1407 copy ..\README.apollo ..\pod\perlapollo.pod
1408 copy ..\README.beos ..\pod\perlbeos.pod
1409 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1410 copy ..\README.ce ..\pod\perlce.pod
1411 copy ..\README.cn ..\pod\perlcn.pod
1412 copy ..\README.cygwin ..\pod\perlcygwin.pod
1413 copy ..\README.dgux ..\pod\perldgux.pod
1414 copy ..\README.dos ..\pod\perldos.pod
1415 copy ..\README.epoc ..\pod\perlepoc.pod
1416 copy ..\README.freebsd ..\pod\perlfreebsd.pod
9f968a8d 1417 copy ..\README.haiku ..\pod\perlhaiku.pod
b0b6bf2b
AT
1418 copy ..\README.hpux ..\pod\perlhpux.pod
1419 copy ..\README.hurd ..\pod\perlhurd.pod
1420 copy ..\README.irix ..\pod\perlirix.pod
1421 copy ..\README.jp ..\pod\perljp.pod
1422 copy ..\README.ko ..\pod\perlko.pod
6477b319 1423 copy ..\README.linux ..\pod\perllinux.pod
b0b6bf2b
AT
1424 copy ..\README.macos ..\pod\perlmacos.pod
1425 copy ..\README.macosx ..\pod\perlmacosx.pod
b0b6bf2b
AT
1426 copy ..\README.mpeix ..\pod\perlmpeix.pod
1427 copy ..\README.netware ..\pod\perlnetware.pod
b0846812 1428 copy ..\README.openbsd ..\pod\perlopenbsd.pod
b0b6bf2b
AT
1429 copy ..\README.os2 ..\pod\perlos2.pod
1430 copy ..\README.os390 ..\pod\perlos390.pod
1431 copy ..\README.os400 ..\pod\perlos400.pod
1432 copy ..\README.plan9 ..\pod\perlplan9.pod
1433 copy ..\README.qnx ..\pod\perlqnx.pod
2f08ed66 1434 copy ..\README.riscos ..\pod\perlriscos.pod
b0b6bf2b 1435 copy ..\README.solaris ..\pod\perlsolaris.pod
27da23d5 1436 copy ..\README.symbian ..\pod\perlsymbian.pod
b0b6bf2b
AT
1437 copy ..\README.tru64 ..\pod\perltru64.pod
1438 copy ..\README.tw ..\pod\perltw.pod
1439 copy ..\README.uts ..\pod\perluts.pod
1440 copy ..\README.vmesa ..\pod\perlvmesa.pod
b0b6bf2b
AT
1441 copy ..\README.vos ..\pod\perlvos.pod
1442 copy ..\README.win32 ..\pod\perlwin32.pod
11545435 1443 copy ..\pod\perl5111delta.pod ..\pod\perldelta.pod
b0b6bf2b 1444 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1e71036e 1445 $(PERLEXE) $(PL2BAT) $(UTILS)
403f501d
NC
1446 $(PERLEXE) $(ICWD) ..\autodoc.pl ..
1447 $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q
0195b144
NC
1448
1449..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
87e06404 1450 $(PERLEXE) -f ..\pod\buildtoc --build-toc -q
1e71036e 1451
b0b6bf2b
AT
1452# Note that the pod cleanup in this next section is parsed (and regenerated
1453# by pod/buildtoc so please check that script before making changes here
1454
b4dc1df6 1455distclean: realclean
1e71036e 1456 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
ed2eab3f
SH
1457 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD) \
1458 $(PERLEXESTATIC) $(PERLSTATICLIB)
1e71036e 1459 -del /f *.def *.map
ca67812f
SH
1460 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1461 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
48462a74 1462 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1e71036e 1463 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
a9bf183d 1464 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1e71036e
JH
1465 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1466 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1e71036e 1467 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
ca67812f 1468 -del /f $(LIBDIR)\Devel\PPPort.pm
1e71036e
JH
1469 -del /f $(LIBDIR)\File\Glob.pm
1470 -del /f $(LIBDIR)\Storable.pm
1e71036e 1471 -del /f $(LIBDIR)\Digest\MD5.pm
59717686 1472 -del /f $(LIBDIR)\Digest\SHA.pm
ca67812f
SH
1473 -del /f $(LIBDIR)\PerlIO\encoding.pm
1474 -del /f $(LIBDIR)\PerlIO\scalar.pm
1475 -del /f $(LIBDIR)\PerlIO\via.pm
1476 -del /f $(LIBDIR)\Sys\Hostname.pm
ca67812f 1477 -del /f $(LIBDIR)\threads\shared.pm
1e71036e 1478 -del /f $(LIBDIR)\Time\HiRes.pm
ac5ea531 1479 -del /f $(LIBDIR)\Unicode\Normalize.pm
4e74047c 1480 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
b4ad57f4 1481 -del /f $(LIBDIR)\Win32.pm
37ca3c28 1482 -del /f $(LIBDIR)\Win32CORE.pm
00701878
SH
1483 -del /f $(LIBDIR)\Win32API\File.pm
1484 -del /f $(LIBDIR)\Win32API\File\cFile.pc
a85e0e8c 1485 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
522078af 1486 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
46ffdcf0 1487 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
522078af 1488 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
ca67812f 1489 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
522078af 1490 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
96c33d98 1491 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
c146e560
NC
1492 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1493 -if exist $(LIBDIR)\Module\Pluggable rmdir /s /q $(LIBDIR)\Module\Pluggable
1494 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
b2685f0c 1495 -if exist $(LIBDIR)\mro rmdir /s /q $(LIBDIR)\mro
69f57184 1496 -if exist $(LIBDIR)\IO\Compress rmdir /s /q $(LIBDIR)\IO\Compress
69f57184 1497 -if exist $(LIBDIR)\IO\Socket rmdir /s /q $(LIBDIR)\IO\Socket
69f57184 1498 -if exist $(LIBDIR)\IO\Uncompress rmdir /s /q $(LIBDIR)\IO\Uncompress
69f57184 1499 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
69f57184 1500 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
849a608a 1501 -if exist $(LIBDIR)\re rmdir /s /q $(LIBDIR)\re
522078af 1502 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
6c4b87ea 1503 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
6c4b87ea 1504 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
522078af 1505 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
00701878 1506 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
64ab118f 1507 -cd $(PODDIR) && del /f *.html *.bat podchecker \
9e64a656
NC
1508 perlaix.pod perlamiga.pod perlapi.pod perlapollo.pod \
1509 perlbeos.pod perlbs2000.pod perlce.pod perlcn.pod \
1510 perlcygwin.pod perldelta.pod perldgux.pod perldos.pod \
1511 perlepoc.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1512 perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
7cdf958d
DM
1513 perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1514 perlmpeix.pod perlnetware.pod perlopenbsd.pod perlos2.pod \
1515 perlos390.pod perlos400.pod perlplan9.pod perlqnx.pod \
1516 perlriscos.pod perlsolaris.pod perlsymbian.pod perltoc.pod \
1517 perltru64.pod perltw.pod perluts.pod perlvmesa.pod perlvos.pod \
1518 perlwin32.pod \
4cb44f92 1519 pod2html pod2latex pod2man pod2text pod2usage \
94442a1e 1520 podselect
827a599d 1521 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
de125441 1522 perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \
6aaee015 1523 xsubpp instmodsh prove ptar ptardiff cpanp-run-perl cpanp cpan2dist shasum corelist config_data
827a599d 1524 -cd ..\x2p && del /f find2perl s2p psed *.bat
19ec6f53 1525 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
ed2eab3f 1526 perlmainst.c
1e71036e 1527 -del /f $(CONFIGPM)
a148edb6 1528 -del /f ..\lib\Config_git.pl
1e71036e 1529 -del /f bin\*.bat
d2b25974 1530 -del /f perllibst.h
f281036e 1531 -del /f perl.base
85741d00 1532 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.tds *.bs *$(o) .exists pm_to_blib ppport.h
827a599d 1533 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
a193a2db 1534 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
83d5895a 1535 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
522078af 1536 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
522078af 1537 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
b4a41557
SH
1538 -if exist pod2htmd.tmp del pod2htmd.tmp
1539 -if exist pod2htmi.tmp del pod2htmi.tmp
1540 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
0279961e 1541 -del /f ..\t\test_state
1e71036e
JH
1542
1543install : all installbare installhtml
1544
0195b144 1545installbare : $(RIGHTMAKE) utils ..\pod\perltoc.pod
1e71036e
JH
1546 $(PERLEXE) ..\installperl
1547 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
5548433c 1548 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1e71036e 1549 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
ec25c072
SH
1550 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1551 if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
1e71036e
JH
1552 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1553
1554installhtml : doc
b4a41557 1555 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1e71036e
JH
1556
1557inst_lib : $(CONFIGPM)
1e71036e
JH
1558 $(RCOPY) ..\lib $(INST_LIB)\*.*
1559
3dc3a597 1560$(UNIDATAFILES) .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
27a8011f 1561 cd ..\lib\unicore && \
1487a039 1562 ..\$(MINIPERL) -I.. -I..\..\cpan\Cwd\lib mktables
ca12659b
NC
1563
1564minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
6c85d12e
SH
1565 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1566 if exist ..\t\perl.exe del /f ..\t\perl.exe
1567 rename ..\t\miniperl.exe perl.exe
1e71036e
JH
1568.IF "$(CCTYPE)" == "BORLAND"
1569 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1570.ELSE
1571 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1572.ENDIF
1573 attrib -r ..\t\*.*
1e71036e 1574 cd ..\t && \
6c85d12e 1575 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1e71036e 1576
6e2cec71 1577test-prep : all utils
1e71036e
JH
1578 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1579 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1580.IF "$(CCTYPE)" == "BORLAND"
1581 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1582.ELSE
1583 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1584.ENDIF
1585
1586test : $(RIGHTMAKE) test-prep
89087c85 1587 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1e71036e 1588
250c5aad
SH
1589test-reonly : reonly utils
1590 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1591 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1592 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1593 cd ..\t && \
a4499558 1594 $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
250c5aad
SH
1595 cd ..\win32
1596
1597regen :
1598 cd .. && regen.pl && cd win32
1599
1e71036e
JH
1600test-notty : test-prep
1601 set PERL_SKIP_TTY_TEST=1 && \
89087c85 1602 cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1e71036e 1603
b4a93add 1604_test : $(RIGHTMAKE)
a01cf021
JH
1605 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1606 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
b4a93add 1607.IF "$(CCTYPE)" == "BORLAND"
a01cf021 1608 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
b4a93add 1609.ELSE
a01cf021 1610 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
b4a93add 1611.ENDIF
89087c85 1612 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
b4a93add 1613
b4dc1df6 1614_clean :
1e71036e
JH
1615 -@erase miniperlmain$(o)
1616 -@erase $(MINIPERL)
1617 -@erase perlglob$(o)
1618 -@erase perlmain$(o)
ed2eab3f 1619 -@erase perlmainst$(o)
1e71036e
JH
1620 -@erase config.w32
1621 -@erase /f config.h
a148edb6 1622 -@erase /f ..\git_version.h
1e71036e
JH
1623 -@erase $(GLOBEXE)
1624 -@erase $(PERLEXE)
1625 -@erase $(WPERLEXE)
ed2eab3f
SH
1626 -@erase $(PERLEXESTATIC)
1627 -@erase $(PERLSTATICLIB)
1e71036e
JH
1628 -@erase $(PERLDLL)
1629 -@erase $(CORE_OBJ)
efa50c51 1630 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(UUDMAP_H) $(BITCOUNT_H)
522078af 1631 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
27a8011f 1632 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
27a8011f 1633 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
ca12659b 1634 -@erase $(UNIDATAFILES)
1e71036e
JH
1635 -@erase $(WIN32_OBJ)
1636 -@erase $(DLL_OBJ)
1637 -@erase $(X2P_OBJ)
1638 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1639 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1640 -@erase ..\x2p\*.exe ..\x2p\*.bat
1641 -@erase *.ilk
1642 -@erase *.pdb
44ba898b 1643 -@erase *.tds
9e7cf449 1644 -@erase Extensions_static
1e71036e 1645
b4dc1df6 1646
1266ad8f 1647
6e2cec71 1648clean : Extensions_clean _clean
1266ad8f 1649
85741d00 1650realclean : Extensions_realclean _clean
b4dc1df6 1651
1e71036e
JH
1652# Handy way to run perlbug -ok without having to install and run the
1653# installed perlbug. We don't re-run the tests here - we trust the user.
1654# Please *don't* use this unless all tests pass.
1655# If you want to report test failures, use "dmake nok" instead.
1656ok: utils
1657 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1658
1659okfile: utils
1660 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1661
1662nok: utils
1663 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1664
1665nokfile: utils
1666 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok