This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #29937] Entries missing from .packlist
[perl5.git] / win32 / Makefile
CommitLineData
9e42cd94
GS
1#
2# Makefile to build perl on Windows NT using Microsoft NMAKE.
3# Supported compilers:
c623ac67
GS
4# Visual C++ 2.0 through 6.0 (and possibly newer versions)
5# MS Platform SDK 64-bit compiler and tools **experimental**
9e42cd94
GS
6#
7# This is set up to build a perl.exe that runs off a shared library
78a7c709 8# (perl59.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#
27# Comment this out if you DON'T want your perl installation to be versioned.
28# This means that the new installation will overwrite any files from the
29# old installation at the same INST_TOP location. Leaving it enabled is
30# the safest route, as perl adds the extra version directory to all the
31# locations it installs files to. If you disable it, an alternative
32# versioned installation can be obtained by setting INST_TOP above to a
33# path that includes an arbitrary version string.
34#
e01ffb8d 35#INST_VER = \5.9.2
9e42cd94
GS
36
37#
38# Comment this out if you DON'T want your perl installation to have
39# architecture specific components. This means that architecture-
40# specific files will be installed along with the architecture-neutral
41# files. Leaving it enabled is safer and more flexible, in case you
42# want to build multiple flavors of perl and install them together in
43# the same location. Commenting it out gives you a simpler
44# installation that is easier to understand for beginners.
45#
46#INST_ARCH = \$(ARCHNAME)
47
48#
49# uncomment to enable multiple interpreters. This is need for fork()
f7d585d3 50# emulation and for thread support.
9e42cd94
GS
51#
52USE_MULTI = define
53
54#
f7d585d3 55# Beginnings of interpreter cloning/threads; now reasonably complete.
9e42cd94
GS
56# This should be enabled to get the fork() emulation. This needs
57# USE_MULTI as well.
58#
59USE_ITHREADS = define
60
61#
62# uncomment to enable the implicit "host" layer for all system calls
63# made by perl. This needs USE_MULTI above. This is also needed to
64# get fork().
65#
66USE_IMP_SYS = define
67
68#
f7d585d3
GS
69# Comment out next assign to disable perl's I/O subsystem and use compiler's
70# stdio for IO - depending on your compiler vendor and run time library you may
71# then get a number of fails from make test i.e. bugs - complain to them not us ;-).
72# You will also be unable to take full advantage of perl5.8's support for multiple
73# encodings and may see lower IO performance. You have been warned.
9e42cd94
GS
74USE_PERLIO = define
75
76#
4a9d6100
GS
77# Comment this out if you don't want to enable large file support for
78# some reason. Should normally only be changed to maintain compatibility
79# with an older release of perl.
80USE_LARGE_FILES = define
81
82#
9e42cd94
GS
83# uncomment one of the following lines if you are using either
84# Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
85#
86#CCTYPE = MSVC20
4a9d6100 87CCTYPE = MSVC60
9e42cd94
GS
88
89#
90# uncomment next line if you want debug version of perl (big,slow)
f7d585d3
GS
91# If not enabled, we automatically try to use maximum optimization
92# with all compilers that are known to have a working optimizer.
9e42cd94
GS
93#
94#CFG = Debug
95
96#
97# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
98# It has patches that fix known bugs in older versions of MSVCRT.DLL.
99# This currently requires VC 5.0 with Service Pack 3 or later.
100# Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
101# and follow the directions in the package to install.
102#
103# Not recommended if you have VC 6.x and you're not running Windows 9x.
104#
105#USE_PERLCRT = define
106
107#
108# uncomment to enable linking with setargv.obj under the Visual C
109# compiler. Setting this options enables perl to expand wildcards in
110# arguments, but it may be harder to use alternate methods like
111# File::DosGlob that are more powerful. This option is supported only with
112# Visual C.
113#
114#USE_SETARGV = define
115
116#
4ace4afb
SH
117# if you want to have the crypt() builtin function implemented, leave this or
118# CRYPT_LIB uncommented. The fcrypt.c file named here contains a suitable
119# version of des_fcrypt().
9e42cd94 120#
4ace4afb 121CRYPT_SRC = fcrypt.c
9e42cd94
GS
122
123#
124# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
125# library, uncomment this, and make sure the library exists (see README.win32)
126# Specify the full pathname of the library.
127#
128#CRYPT_LIB = fcrypt.lib
129
130#
131# set this if you wish to use perl's malloc
132# WARNING: Turning this on/off WILL break binary compatibility with extensions
133# you may have compiled with/without it. Be prepared to recompile all
134# extensions if you change the default. Currently, this cannot be enabled
135# if you ask for USE_IMP_SYS above.
136#
137#PERL_MALLOC = define
138
139#
06c896bb
SH
140# set this to enable debugging mstats
141# This must be enabled to use the Devel::Peek::mstat() function. This cannot
142# be enabled without PERL_MALLOC as well.
143#
144#DEBUG_MSTATS = define
145
146#
147#
9e42cd94
GS
148# set the install locations of the compiler include/libraries
149# Running VCVARS32.BAT is *required* when using Visual C.
150# Some versions of Visual C don't define MSVCDIR in the environment,
151# so you may have to set CCHOME explicitly (spaces in the path name should
152# not be quoted)
153#
154#CCHOME = f:\msvc20
155CCHOME = $(MSVCDIR)
156CCINCDIR = $(CCHOME)\include
157CCLIBDIR = $(CCHOME)\lib
158
159#
160# Additional compiler flags can be specified here.
161#
162
163#
164# This should normally be disabled. Adding -DPERL_POLLUTE enables support
165# for old symbols by default, at the expense of extreme pollution. You most
166# probably just want to build modules that won't compile with
167# perl Makefile.PL POLLUTE=1
168# instead of enabling this. Please report such modules to the respective
169# authors.
170#
171#BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
172
173#
174# This should normally be disabled. Enabling it will disable the File::Glob
175# implementation of CORE::glob.
176#
177#BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
178
179#
180# This should normally be disabled. Enabling it causes perl to read scripts
181# in text mode (which is the 5.005 behavior) and will break ByteLoader.
182#BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
183
184#
185# specify semicolon-separated list of extra directories that modules will
186# look for libraries (spaces in path names need not be quoted)
187#
188EXTRALIBDIRS =
189
190#
191# set this to your email address (perl will guess a value from
192# from your loginname and your hostname, which may not be right)
193#
194#EMAIL =
195
196##
197## Build configuration ends.
198##
199
200##################### CHANGE THESE ONLY IF YOU MUST #####################
201
202!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
203D_CRYPT = undef
204!ELSE
205D_CRYPT = define
206CRYPT_FLAG = -DHAVE_DES_FCRYPT
207!ENDIF
208
209!IF "$(PERL_MALLOC)" == ""
210PERL_MALLOC = undef
06c896bb
SH
211DEBUG_MSTATS = undef
212!ENDIF
213
214!IF "$(DEBUG_MSTATS)" == ""
215DEBUG_MSTATS = undef
216!ENDIF
217
218!IF "$(DEBUG_MSTATS)" == "define"
219BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS
9e42cd94
GS
220!ENDIF
221
9e42cd94
GS
222!IF "$(USE_IMP_SYS)" == "define"
223PERL_MALLOC = undef
224!ENDIF
225
226!IF "$(USE_MULTI)" == ""
227USE_MULTI = undef
228!ENDIF
229
230!IF "$(USE_ITHREADS)" == ""
231USE_ITHREADS = undef
232!ENDIF
233
234!IF "$(USE_IMP_SYS)" == ""
235USE_IMP_SYS = undef
236!ENDIF
237
238!IF "$(USE_PERLIO)" == ""
239USE_PERLIO = undef
240!ENDIF
241
4a9d6100
GS
242!IF "$(USE_LARGE_FILES)" == ""
243USE_LARGE_FILES = undef
244!ENDIF
245
9e42cd94
GS
246!IF "$(USE_PERLCRT)" == ""
247USE_PERLCRT = undef
248!ENDIF
249
3db8f154 250!IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
9e42cd94
GS
251USE_MULTI = define
252!ENDIF
253
254!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
255USE_MULTI = define
9e42cd94
GS
256!ENDIF
257
3db8f154 258!IF "$(USE_MULTI)" != "undef"
9e42cd94
GS
259BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
260!ENDIF
261
262!IF "$(USE_IMP_SYS)" != "undef"
263BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
264!ENDIF
265
266!IF "$(PROCESSOR_ARCHITECTURE)" == ""
267PROCESSOR_ARCHITECTURE = x86
268!ENDIF
269
c623ac67
GS
270!IF "$(WIN64)" == ""
271!IF "$(PROCESSOR_ARCHITEW6432)" != ""
272PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
273WIN64 = define
274!ELSE
275!IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
276WIN64 = define
277!ELSE
278WIN64 = undef
279!ENDIF
280!ENDIF
281!ENDIF
282
9e42cd94
GS
283!IF "$(USE_MULTI)" == "define"
284ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
285!ELSE
286!IF "$(USE_PERLIO)" == "define"
287ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
288!ELSE
289ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
290!ENDIF
291!ENDIF
9e42cd94
GS
292
293!IF "$(USE_PERLIO)" == "define"
294BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
295!ENDIF
296
297!IF "$(USE_ITHREADS)" == "define"
298ARCHNAME = $(ARCHNAME)-thread
299!ENDIF
300
301# Visual Studio 98 specific
302!IF "$(CCTYPE)" == "MSVC60"
303
304# VC 6.0 can load the socket dll on demand. Makes the test suite
305# run in about 10% less time.
306DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
307!ENDIF
308
309ARCHDIR = ..\lib\$(ARCHNAME)
310COREDIR = ..\lib\CORE
311AUTODIR = ..\lib\auto
312LIBDIR = ..\lib
313EXTDIR = ..\ext
314PODDIR = ..\pod
315EXTUTILSDIR = $(LIBDIR)\ExtUtils
316
317#
318INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
319INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
320INST_LIB = $(INST_TOP)$(INST_VER)\lib
321INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
322INST_COREDIR = $(INST_ARCHLIB)\CORE
323INST_POD = $(INST_LIB)\pod
324INST_HTML = $(INST_TOP)$(INST_VER)\html
325
326#
327# Programs to compile, build .lib files and link
328#
329
330CC = cl
331LINK32 = link
332LIB32 = $(LINK32) -lib
333RSC = rc
334
335#
336# Options
337#
338
339INCLUDES = -I$(COREDIR) -I.\include -I. -I..
340#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
341DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
342LOCDEFS = -DPERLDLL -DPERL_CORE
343SUBSYS = console
344CXX_FLAG = -TP -GX
345
346!IF "$(USE_PERLCRT)" != "define"
347LIBC = msvcrt.lib
348!ELSE
349LIBC = PerlCRT.lib
350!ENDIF
351
9e42cd94
GS
352!IF "$(CFG)" == "Debug"
353! IF "$(CCTYPE)" == "MSVC20"
354OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
355! ELSE
356OPTIMIZE = -Od -MD -Zi -DDEBUGGING
357! ENDIF
c623ac67 358LINK_DBG = -debug
9e42cd94 359!ELSE
ec25c072
SH
360OPTIMIZE = -MD -Zi -DNDEBUG
361# we enable debug symbols in release builds also
362LINK_DBG = -debug -opt:ref,icf
363# you may want to enable this if you want COFF symbols in the executables
364# in addition to the PDB symbols. The default Dr. Watson that ships with
365# Windows can use the the former but not latter. The free WinDbg can be
366# installed to get better stack traces from just the PDB symbols, so we
367# avoid the bloat of COFF symbols by default.
368#LINK_DBG = $(LINK_DBG) -debugtype:both
d921a5fb
GS
369! IF "$(WIN64)" == "define"
370# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
371OPTIMIZE = $(OPTIMIZE) -Ox -GL
372LINK_DBG = $(LINK_DBG) -ltcg
373! ELSE
374# -O1 yields smaller code, which turns out to be faster than -O2 on x86
375OPTIMIZE = $(OPTIMIZE) -O1
376#OPTIMIZE = $(OPTIMIZE) -O2
377! ENDIF
9e42cd94
GS
378!ENDIF
379
c623ac67
GS
380!IF "$(WIN64)" == "define"
381DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
382OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
383!ENDIF
384
9e42cd94
GS
385!IF "$(USE_PERLCRT)" != "define"
386BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
387!ENDIF
388
389LIBBASEFILES = $(CRYPT_LIB) \
390 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
391 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
392 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
c623ac67
GS
393 version.lib
394
395# win64 doesn't have some libs
396!IF "$(WIN64)" != "define"
397LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
398!ENDIF
9e42cd94
GS
399
400# we add LIBC here, since we may be using PerlCRT.dll
401LIBFILES = $(LIBBASEFILES) $(LIBC)
402
403CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
404 $(PCHFLAGS) $(OPTIMIZE)
405LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
406 -libpath:"$(INST_COREDIR)" \
407 -machine:$(PROCESSOR_ARCHITECTURE)
408OBJOUT_FLAG = -Fo
409EXEOUT_FLAG = -Fe
410
411CFLAGS_O = $(CFLAGS) $(BUILDOPT)
412
413#################### do not edit below this line #######################
414############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
415
416o = .obj
417
418#
419# Rules
420#
421
422.SUFFIXES : .c $(o) .dll .lib .exe .rc .res
423
424.c$(o):
425 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
426
427.y.c:
428 $(NOOP)
429
430$(o).dll:
431 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
432 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
433
434.rc.res:
435 $(RSC) -i.. $<
436
437#
438# various targets
439
440# makedef.pl must be updated if this changes, and this should normally
441# only change when there is an incompatible revision of the public API.
78a7c709
HS
442PERLIMPLIB = ..\perl59.lib
443PERLDLL = ..\perl59.dll
9e42cd94
GS
444
445MINIPERL = ..\miniperl.exe
446MINIDIR = .\mini
447PERLEXE = ..\perl.exe
448WPERLEXE = ..\wperl.exe
449GLOBEXE = ..\perlglob.exe
450CONFIGPM = ..\lib\Config.pm
451MINIMOD = ..\lib\ExtUtils\Miniperl.pm
452X2P = ..\x2p\a2p.exe
453
3890b58f
RGS
454PERLEXE_ICO = .\perlexe.ico
455PERLEXE_RES = .\perlexe.res
456PERLDLL_RES =
457
9e42cd94
GS
458# Nominate a target which causes extensions to be re-built
459# This used to be $(PERLEXE), but at worst it is the .dll that they depend
460# on and really only the interface - i.e. the .def file used to export symbols
461# from the .dll
462PERLDEP = perldll.def
463
464PL2BAT = bin\pl2bat.pl
465GLOBBAT = bin\perlglob.bat
466
467UTILS = \
468 ..\utils\h2ph \
469 ..\utils\splain \
470 ..\utils\dprofpp \
471 ..\utils\perlbug \
472 ..\utils\pl2pm \
473 ..\utils\c2ph \
827a599d 474 ..\utils\pstruct \
9e42cd94
GS
475 ..\utils\h2xs \
476 ..\utils\perldoc \
477 ..\utils\perlcc \
478 ..\utils\perlivp \
479 ..\utils\libnetcfg \
827a599d
GS
480 ..\utils\enc2xs \
481 ..\utils\piconv \
83cd6e83 482 ..\utils\cpan \
ea0e987d 483 ..\utils\xsubpp \
4b618757 484 ..\utils\prove \
ea0e987d 485 ..\utils\instmodsh \
9e42cd94
GS
486 ..\pod\checkpods \
487 ..\pod\pod2html \
488 ..\pod\pod2latex \
489 ..\pod\pod2man \
490 ..\pod\pod2text \
491 ..\pod\pod2usage \
492 ..\pod\podchecker \
493 ..\pod\podselect \
494 ..\x2p\find2perl \
827a599d 495 ..\x2p\psed \
9e42cd94 496 ..\x2p\s2p \
9e42cd94
GS
497 bin\exetype.pl \
498 bin\runperl.pl \
499 bin\pl2bat.pl \
500 bin\perlglob.pl \
501 bin\search.pl
502
503MAKE = nmake -nologo
504MAKE_BARE = nmake
505
c623ac67
GS
506!IF "$(WIN64)" == "define"
507CFGSH_TMPL = config.vc64
508CFGH_TMPL = config_H.vc64
509!ELSE
9e42cd94
GS
510CFGSH_TMPL = config.vc
511CFGH_TMPL = config_H.vc
c623ac67 512!ENDIF
9e42cd94
GS
513
514XCOPY = xcopy /f /r /i /d
515RCOPY = xcopy /f /r /i /e /d
516NOOP = @echo
517NULL =
518
519DEL = del
520
521#
522# filenames given to xsubpp must have forward slashes (since it puts
523# full pathnames in #line strings)
524XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
525 -C++ -prototypes
526
527MICROCORE_SRC = \
528 ..\av.c \
529 ..\deb.c \
530 ..\doio.c \
531 ..\doop.c \
532 ..\dump.c \
533 ..\globals.c \
534 ..\gv.c \
535 ..\hv.c \
536 ..\locale.c \
537 ..\mg.c \
538 ..\numeric.c \
539 ..\op.c \
295f0f84 540 ..\pad.c \
9e42cd94
GS
541 ..\perl.c \
542 ..\perlapi.c \
543 ..\perly.c \
544 ..\pp.c \
545 ..\pp_ctl.c \
546 ..\pp_hot.c \
547 ..\pp_pack.c \
548 ..\pp_sort.c \
549 ..\pp_sys.c \
10bc17b6 550 ..\reentr.c \
9e42cd94
GS
551 ..\regcomp.c \
552 ..\regexec.c \
553 ..\run.c \
554 ..\scope.c \
555 ..\sv.c \
556 ..\taint.c \
557 ..\toke.c \
558 ..\universal.c \
559 ..\utf8.c \
560 ..\util.c \
561 ..\xsutils.c
562
563EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
564
565!IF "$(PERL_MALLOC)" == "define"
566EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
567!ENDIF
568
569EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
570
571WIN32_SRC = \
572 .\win32.c \
573 .\win32sck.c \
574 .\win32thread.c
575
f7d585d3
GS
576# We need this for miniperl build unless we override canned
577# config.h #define building mini\*
578#!IF "$(USE_PERLIO)" == "define"
9e42cd94 579WIN32_SRC = $(WIN32_SRC) .\win32io.c
f7d585d3 580#!ENDIF
9e42cd94
GS
581
582!IF "$(CRYPT_SRC)" != ""
583WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
584!ENDIF
585
586DLL_SRC = $(DYNALOADER).c
587
588X2P_SRC = \
589 ..\x2p\a2p.c \
590 ..\x2p\hash.c \
591 ..\x2p\str.c \
592 ..\x2p\util.c \
593 ..\x2p\walk.c
594
595CORE_NOCFG_H = \
596 ..\av.h \
597 ..\cop.h \
598 ..\cv.h \
599 ..\dosish.h \
600 ..\embed.h \
601 ..\form.h \
602 ..\gv.h \
603 ..\handy.h \
604 ..\hv.h \
605 ..\iperlsys.h \
606 ..\mg.h \
607 ..\nostdio.h \
608 ..\op.h \
609 ..\opcode.h \
610 ..\perl.h \
611 ..\perlapi.h \
612 ..\perlsdio.h \
613 ..\perlsfio.h \
614 ..\perly.h \
615 ..\pp.h \
616 ..\proto.h \
617 ..\regexp.h \
618 ..\scope.h \
619 ..\sv.h \
620 ..\thread.h \
621 ..\unixish.h \
622 ..\utf8.h \
623 ..\util.h \
624 ..\warnings.h \
625 ..\XSUB.h \
626 ..\EXTERN.h \
627 ..\perlvars.h \
628 ..\intrpvar.h \
629 ..\thrdvar.h \
630 .\include\dirent.h \
631 .\include\netdb.h \
632 .\include\sys\socket.h \
633 .\win32.h
634
635CORE_H = $(CORE_NOCFG_H) .\config.h
636
637MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
638CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
639WIN32_OBJ = $(WIN32_SRC:.c=.obj)
640MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
641 $(MINIDIR)\miniperlmain$(o) \
642 $(MINIDIR)\perlio$(o)
643MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
644MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
645DLL_OBJ = $(DLL_SRC:.c=.obj)
646X2P_OBJ = $(X2P_SRC:.c=.obj)
647
648PERLDLL_OBJ = $(CORE_OBJ)
649PERLEXE_OBJ = perlmain$(o)
650
651PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
652#PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
653
654!IF "$(USE_SETARGV)" != ""
655SETARGV_OBJ = setargv$(o)
656!ENDIF
657
658DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
659SOCKET = $(EXTDIR)\Socket\Socket
660FCNTL = $(EXTDIR)\Fcntl\Fcntl
661OPCODE = $(EXTDIR)\Opcode\Opcode
662SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
663IO = $(EXTDIR)\IO\IO
664POSIX = $(EXTDIR)\POSIX\POSIX
665ATTRS = $(EXTDIR)\attrs\attrs
666THREAD = $(EXTDIR)\Thread\Thread
667B = $(EXTDIR)\B\B
668RE = $(EXTDIR)\re\re
669DUMPER = $(EXTDIR)\Data\Dumper\Dumper
670ERRNO = $(EXTDIR)\Errno\Errno
671PEEK = $(EXTDIR)\Devel\Peek\Peek
672BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
673DPROF = $(EXTDIR)\Devel\DProf\DProf
674GLOB = $(EXTDIR)\File\Glob\Glob
675HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
676STORABLE = $(EXTDIR)\Storable\Storable
677FILTER = $(EXTDIR)\Filter\Util\Call\Call
678ENCODE = $(EXTDIR)\Encode\Encode
679MD5 = $(EXTDIR)\Digest\MD5\MD5
e934609f 680PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar
9e42cd94
GS
681MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
682TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
683CWD = $(EXTDIR)\Cwd\Cwd
684LISTUTIL = $(EXTDIR)\List\Util\Util
e934609f 685PERLIOVIA = $(EXTDIR)\PerlIO\via\via
83e2e978 686XSAPITEST = $(EXTDIR)\XS\APItest\APItest
9e42cd94
GS
687XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
688UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
b4ad57f4 689WIN32_DIR = ext\Win32
9e42cd94
GS
690
691SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
692FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
693OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
694SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
695IO_DLL = $(AUTODIR)\IO\IO.dll
696POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
697ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
698THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
699B_DLL = $(AUTODIR)\B\B.dll
700DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
701PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
702RE_DLL = $(AUTODIR)\re\re.dll
703BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
704DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
705GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
706HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
707STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
708FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
709ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
710MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
e934609f 711PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll
9e42cd94
GS
712MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
713TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
714CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
715LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
e934609f 716PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll
83e2e978 717XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll
9e42cd94
GS
718XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
719UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
b4ad57f4 720WIN32_DLL = $(AUTODIR)\Win32\Win32.dll
9e42cd94
GS
721
722EXTENSION_C = \
723 $(SOCKET).c \
724 $(FCNTL).c \
725 $(OPCODE).c \
726 $(SDBM_FILE).c \
727 $(IO).c \
728 $(POSIX).c \
729 $(ATTRS).c \
730 $(THREAD).c \
731 $(RE).c \
732 $(DUMPER).c \
733 $(PEEK).c \
734 $(B).c \
735 $(BYTELOADER).c \
736 $(DPROF).c \
737 $(GLOB).c \
738 $(HOSTNAME).c \
739 $(STORABLE).c \
740 $(FILTER).c \
741 $(ENCODE).c \
742 $(MD5).c \
743 $(PERLIOSCALAR).c \
744 $(MIMEBASE64).c \
745 $(TIMEHIRES).c \
746 $(CWD).c \
747 $(LISTUTIL).c \
748 $(PERLIOVIA).c \
83e2e978 749 $(XSAPITEST).c \
9e42cd94 750 $(XSTYPEMAP).c \
b4ad57f4
NC
751 $(UNICODENORMALIZE).c \
752 $(WIN32_DIR).c
9e42cd94
GS
753
754EXTENSION_DLL = \
755 $(SOCKET_DLL) \
756 $(FCNTL_DLL) \
757 $(OPCODE_DLL) \
758 $(SDBM_FILE_DLL)\
759 $(IO_DLL) \
760 $(POSIX_DLL) \
761 $(ATTRS_DLL) \
762 $(DUMPER_DLL) \
763 $(PEEK_DLL) \
764 $(B_DLL) \
765 $(RE_DLL) \
766 $(THREAD_DLL) \
767 $(BYTELOADER_DLL) \
768 $(DPROF_DLL) \
769 $(GLOB_DLL) \
770 $(HOSTNAME_DLL) \
771 $(STORABLE_DLL) \
772 $(FILTER_DLL) \
773 $(ENCODE_DLL) \
774 $(MD5_DLL) \
775 $(PERLIOSCALAR_DLL) \
776 $(MIMEBASE64_DLL) \
777 $(TIMEHIRES_DLL) \
778 $(CWD_DLL) \
779 $(LISTUTIL_DLL) \
780 $(PERLIOVIA_DLL) \
83e2e978 781 $(XSAPITEST_DLL) \
9e42cd94 782 $(XSTYPEMAP_DLL) \
b4ad57f4
NC
783 $(UNICODENORMALIZE_DLL) \
784 $(WIN32_DLL)
9e42cd94
GS
785
786POD2HTML = $(PODDIR)\pod2html
787POD2MAN = $(PODDIR)\pod2man
788POD2LATEX = $(PODDIR)\pod2latex
789POD2TEXT = $(PODDIR)\pod2text
790
791CFG_VARS = \
792 "INST_DRV=$(INST_DRV)" \
793 "INST_TOP=$(INST_TOP)" \
794 "INST_VER=$(INST_VER)" \
795 "INST_ARCH=$(INST_ARCH)" \
796 "archname=$(ARCHNAME)" \
797 "cc=$(CC)" \
798 "ld=$(LINK32)" \
799 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
800 "cf_email=$(EMAIL)" \
801 "d_crypt=$(D_CRYPT)" \
802 "d_mymalloc=$(PERL_MALLOC)" \
803 "libs=$(LIBFILES)" \
804 "incpath=$(CCINCDIR:"=\")" \
805 "libperl=$(PERLIMPLIB:..\=)" \
806 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
807 "libc=$(LIBC)" \
808 "make=$(MAKE_BARE)" \
7e0017d3 809 "usethreads=$(USE_ITHREADS)" \
9e42cd94 810 "useithreads=$(USE_ITHREADS)" \
9e42cd94
GS
811 "usemultiplicity=$(USE_MULTI)" \
812 "useperlio=$(USE_PERLIO)" \
4a9d6100 813 "uselargefiles=$(USE_LARGE_FILES)" \
9e42cd94
GS
814 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
815 "optimize=$(OPTIMIZE:"=\")"
816
817#
818# Top targets
819#
820
821all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
822 $(X2P) Extensions
823 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
824
825$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
826
827#------------------------------------------------------------
828
829$(GLOBEXE) : perlglob$(o)
830 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
831 perlglob$(o) setargv$(o)
832
833perlglob$(o) : perlglob.c
834
835config.w32 : $(CFGSH_TMPL)
836 copy $(CFGSH_TMPL) config.w32
837
838.\config.h : $(CFGH_TMPL)
839 -del /f config.h
840 copy $(CFGH_TMPL) config.h
841
842..\config.sh : config.w32 $(MINIPERL) config_sh.PL
843 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
844
845# this target is for when changes to the main config.sh happen
846# edit config.{b,v,g}c and make this target once for each supported
847# compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
848regen_config_h:
849 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
850 cd ..
8839b9e4 851 -del /f perl.exe perl*.dll
9e42cd94
GS
852 perl configpm
853 cd win32
854 -del /f $(CFGH_TMPL)
855 -mkdir $(COREDIR)
8839b9e4 856 -perl config_h.PL "INST_VER=$(INST_VER)"
9e42cd94
GS
857 rename config.h $(CFGH_TMPL)
858
859$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
860 cd ..
861 miniperl configpm
862 cd win32
863 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
864 $(XCOPY) ..\*.h $(COREDIR)\*.*
865 $(XCOPY) *.h $(COREDIR)\*.*
866 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
867 $(RCOPY) include $(COREDIR)\*.*
868 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
869 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
870
871$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
872 $(LINK32) -subsystem:console -out:$@ @<<
873 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
874<<
875
876$(MINIDIR) :
877 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
878
879$(MINICORE_OBJ) : $(CORE_NOCFG_H)
880 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
881
882$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
883 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
884
885# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
886# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
887!IF "$(USE_IMP_SYS)" == "define"
888perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
889 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
890!ENDIF
891
892# 1. we don't want to rebuild miniperl.exe when config.h changes
893# 2. we don't want to rebuild miniperl.exe with non-default config.h
894$(MINI_OBJ) : $(CORE_NOCFG_H)
895
896$(WIN32_OBJ) : $(CORE_H)
897$(CORE_OBJ) : $(CORE_H)
898$(DLL_OBJ) : $(CORE_H)
899$(X2P_OBJ) : $(CORE_H)
900
901perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
902 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
903 CCTYPE=$(CCTYPE) > perldll.def
904
905$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
906 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
907 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
908<<
909 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
910
e84ac4e2
SH
911$(PERLEXE_ICO): $(MINIPERL) makeico.pl
912 $(MINIPERL) makeico.pl > $@
913
914$(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO)
915
9e42cd94
GS
916$(MINIMOD) : $(MINIPERL) ..\minimod.pl
917 cd ..
918 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
919 cd win32
920
921..\x2p\a2p$(o) : ..\x2p\a2p.c
922 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
923
924..\x2p\hash$(o) : ..\x2p\hash.c
925 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
926
927..\x2p\str$(o) : ..\x2p\str.c
928 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
929
930..\x2p\util$(o) : ..\x2p\util.c
931 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
932
933..\x2p\walk$(o) : ..\x2p\walk.c
934 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
935
936$(X2P) : $(MINIPERL) $(X2P_OBJ)
937 $(MINIPERL) ..\x2p\find2perl.PL
938 $(MINIPERL) ..\x2p\s2p.PL
939 $(LINK32) -subsystem:console -out:$@ @<<
940 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
941<<
942
943perlmain.c : runperl.c
944 copy runperl.c perlmain.c
945
946perlmain$(o) : perlmain.c
947 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
948
949$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
950 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
951 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
952 copy $(PERLEXE) $(WPERLEXE)
953 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
954 copy splittree.pl ..
955 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
956
957$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
958 if not exist $(AUTODIR) mkdir $(AUTODIR)
959 cd $(EXTDIR)\$(*B)
960 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
961 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
962 cd ..\..\win32
963 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
964 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
965 cd $(EXTDIR)\$(*B)
966 $(XSUBPP) dl_win32.xs > $(*B).c
967 cd ..\..\win32
968
969$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
970 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
971
972#----------------------------------------------------------------------------------
973Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
974 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
b4ad57f4 975 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext
9e42cd94 976
6c85d12e
SH
977# Note: The next two targets explicitly remove a "blibdirs.exists" file that
978# currerntly gets left behind, until CPAN RT Ticket #5616 is resolved.
979
9e42cd94
GS
980Extensions_clean:
981 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
b4ad57f4 982 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext clean
6c85d12e 983 -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists
9e42cd94 984
b4dc1df6
SH
985Extensions_realclean:
986 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) realclean
b4ad57f4 987 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext realclean
6c85d12e 988 -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists
b4dc1df6 989
9e42cd94
GS
990#----------------------------------------------------------------------------------
991
992doc: $(PERLEXE)
993 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
994 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
995 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
996
b0b6bf2b
AT
997# Note that this next section is parsed (and regenerated) by pod/buildtoc
998# so please check that script before making structural changes here
999
9e42cd94
GS
1000utils: $(PERLEXE) $(X2P)
1001 cd ..\utils
1002 $(MAKE) PERL=$(MINIPERL)
1003 cd ..\pod
4cb44f92 1004 copy ..\vms\perlvms.pod .\perlvms.pod
b0b6bf2b
AT
1005 copy ..\README.aix ..\pod\perlaix.pod
1006 copy ..\README.amiga ..\pod\perlamiga.pod
1007 copy ..\README.apollo ..\pod\perlapollo.pod
1008 copy ..\README.beos ..\pod\perlbeos.pod
1009 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1010 copy ..\README.ce ..\pod\perlce.pod
1011 copy ..\README.cn ..\pod\perlcn.pod
1012 copy ..\README.cygwin ..\pod\perlcygwin.pod
1013 copy ..\README.dgux ..\pod\perldgux.pod
1014 copy ..\README.dos ..\pod\perldos.pod
1015 copy ..\README.epoc ..\pod\perlepoc.pod
1016 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1017 copy ..\README.hpux ..\pod\perlhpux.pod
1018 copy ..\README.hurd ..\pod\perlhurd.pod
1019 copy ..\README.irix ..\pod\perlirix.pod
1020 copy ..\README.jp ..\pod\perljp.pod
1021 copy ..\README.ko ..\pod\perlko.pod
1022 copy ..\README.machten ..\pod\perlmachten.pod
1023 copy ..\README.macos ..\pod\perlmacos.pod
1024 copy ..\README.macosx ..\pod\perlmacosx.pod
1025 copy ..\README.mint ..\pod\perlmint.pod
1026 copy ..\README.mpeix ..\pod\perlmpeix.pod
1027 copy ..\README.netware ..\pod\perlnetware.pod
1028 copy ..\README.os2 ..\pod\perlos2.pod
1029 copy ..\README.os390 ..\pod\perlos390.pod
1030 copy ..\README.os400 ..\pod\perlos400.pod
1031 copy ..\README.plan9 ..\pod\perlplan9.pod
1032 copy ..\README.qnx ..\pod\perlqnx.pod
1033 copy ..\README.solaris ..\pod\perlsolaris.pod
1034 copy ..\README.tru64 ..\pod\perltru64.pod
1035 copy ..\README.tw ..\pod\perltw.pod
1036 copy ..\README.uts ..\pod\perluts.pod
1037 copy ..\README.vmesa ..\pod\perlvmesa.pod
1038 copy ..\README.vms ..\pod\perlvms.pod
1039 copy ..\README.vos ..\pod\perlvos.pod
1040 copy ..\README.win32 ..\pod\perlwin32.pod
e0eb806d 1041 copy ..\pod\perl592delta.pod ..\pod\perldelta.pod
9e42cd94
GS
1042 $(MAKE) -f ..\win32\pod.mak converters
1043 cd ..\lib
1044 $(PERLEXE) lib_pm.PL
1045 cd ..\win32
1046 $(PERLEXE) $(PL2BAT) $(UTILS)
1047
b0b6bf2b
AT
1048# Note that the pod cleanup in this next section is parsed (and regenerated
1049# by pod/buildtoc so please check that script before making changes here
1050
522078af
GS
1051# the doubled rmdir calls are needed because older cmd shells
1052# don't understand /q
b4dc1df6 1053distclean: realclean
9e42cd94
GS
1054 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1055 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1056 -del /f *.def *.map
1057 -del /f $(EXTENSION_DLL)
1058 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1059 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
ca67812f
SH
1060 -del /f $(EXTDIR)\DynaLoader\DynaLoader.pm
1061 -del /f $(EXTDIR)\DynaLoader\XSLoader.pm
1062 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1063 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
9e42cd94 1064 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
b4dc1df6 1065 -del /f $(LIBDIR)\XSLoader.pm $(LIBDIR)\lib.pm
9e42cd94
GS
1066 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1067 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1068 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1069 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
ca67812f 1070 -del /f $(LIBDIR)\ByteLoader.pm
9e42cd94 1071 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
ca67812f 1072 -del /f $(LIBDIR)\Devel\PPPort.pm
9e42cd94
GS
1073 -del /f $(LIBDIR)\File\Glob.pm
1074 -del /f $(LIBDIR)\Storable.pm
9e42cd94 1075 -del /f $(LIBDIR)\Digest\MD5.pm
ca67812f 1076 -del /f $(LIBDIR)\PerlIO\encoding.pm
e934609f
JH
1077 -del /f $(LIBDIR)\PerlIO\scalar.pm
1078 -del /f $(LIBDIR)\PerlIO\via.pm
ca67812f
SH
1079 -del /f $(LIBDIR)\Sys\Hostname.pm
1080 -del /f $(LIBDIR)\Thread\Signal.pm $(LIBDIR)\Thread\Specific.pm
1081 -del /f $(LIBDIR)\threads\shared.pm
9e42cd94 1082 -del /f $(LIBDIR)\Time\HiRes.pm
9e42cd94 1083 -del /f $(LIBDIR)\Unicode\Normalize.pm
b4ad57f4 1084 -del /f $(LIBDIR)\Win32.pm
9e42cd94 1085 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
522078af 1086 -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
9e42cd94 1087 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
522078af 1088 -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
9e42cd94 1089 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
522078af 1090 -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
ca67812f
SH
1091 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1092 -if exist $(LIBDIR)\Encode rmdir /s $(LIBDIR)\Encode
9e42cd94 1093 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
522078af 1094 -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
9e42cd94 1095 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
522078af 1096 -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
9e42cd94 1097 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
522078af 1098 -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
9e42cd94 1099 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
522078af 1100 -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
9e42cd94 1101 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
522078af 1102 -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
ca67812f 1103 -cd $(PODDIR) && del /f *.html *.bat checkpods \
9e42cd94 1104 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
b0b6bf2b 1105 perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1400179b
NC
1106 perldelta.pod perldgux.pod perldos.pod perlepoc.pod \
1107 perlfreebsd.pod perlhpux.pod perlhurd.pod perlirix.pod \
1108 perljp.pod perlko.pod perlmachten.pod perlmacos.pod \
1109 perlmacosx.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1110 perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
1111 perlqnx.pod perlsolaris.pod perltru64.pod perltw.pod \
e0eb806d
RGS
1112 perluts.pod perlvmesa.pod perlvms.pod perlvms.pod perlvos.pod \
1113 perlwin32.pod \
b0b6bf2b 1114 pod2html pod2latex pod2man pod2text pod2usage \
9e42cd94 1115 podchecker podselect
ca67812f
SH
1116 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1117 perldoc perlivp dprofpp perlcc libnetcfg enc2xs piconv cpan *.bat \
1118 xsubpp instmodsh prove
1119 -cd ..\x2p && del /f find2perl s2p psed *.bat
9e42cd94
GS
1120 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1121 -del /f $(CONFIGPM)
1122 -del /f bin\*.bat
ec25c072 1123 -del /f $(PERLEXE_ICO) perl.base
ca67812f
SH
1124 -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
1125 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
9e42cd94 1126 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
522078af 1127 -if exist $(AUTODIR) rmdir /s $(AUTODIR)
9e42cd94 1128 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
522078af 1129 -if exist $(COREDIR) rmdir /s $(COREDIR)
9e42cd94
GS
1130
1131install : all installbare installhtml
1132
1133installbare : utils
1134 $(PERLEXE) ..\installperl
1135 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1136 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
ec25c072
SH
1137 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1138 if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
9e42cd94
GS
1139 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1140
1141installhtml : doc
1142 $(RCOPY) html\*.* $(INST_HTML)\*.*
1143
1144inst_lib : $(CONFIGPM)
1145 copy splittree.pl ..
1146 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1147 $(RCOPY) ..\lib $(INST_LIB)\*.*
1148
1149minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
6c85d12e
SH
1150 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1151 if exist ..\t\perl.exe del /f ..\t\perl.exe
1152 rename ..\t\miniperl.exe perl.exe
9e42cd94
GS
1153 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1154 attrib -r ..\t\*.*
6c85d12e
SH
1155 cd ..\t && \
1156 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
9e42cd94
GS
1157
1158test-prep : all utils
1159 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1160 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1161 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1162
1163test : test-prep
1164 cd ..\t
1165 $(PERLEXE) -I..\lib harness
1166 cd ..\win32
1167
1168test-notty : test-prep
1169 set PERL_SKIP_TTY_TEST=1
1170 cd ..\t
1171 $(PERLEXE) -I..\lib harness
1172 cd ..\win32
1173
b4a93add
NK
1174_test :
1175 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1176 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1177 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1178 cd ..\t
1179 $(PERLEXE) -I..\lib harness
1180 cd ..\win32
1181
b4dc1df6 1182_clean :
9e42cd94
GS
1183 -@$(DEL) miniperlmain$(o)
1184 -@$(DEL) $(MINIPERL)
1185 -@$(DEL) perlglob$(o)
1186 -@$(DEL) perlmain$(o)
1187 -@$(DEL) config.w32
1188 -@$(DEL) config.h
1189 -@$(DEL) $(GLOBEXE)
1190 -@$(DEL) $(PERLEXE)
1191 -@$(DEL) $(WPERLEXE)
1192 -@$(DEL) $(PERLDLL)
1193 -@$(DEL) $(CORE_OBJ)
1194 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
522078af 1195 -if exist $(MINIDIR) rmdir /s $(MINIDIR)
9e42cd94
GS
1196 -@$(DEL) $(WIN32_OBJ)
1197 -@$(DEL) $(DLL_OBJ)
1198 -@$(DEL) $(X2P_OBJ)
1199 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1200 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1201 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1202 -@$(DEL) *.ilk
1203 -@$(DEL) *.pdb
1204
b4dc1df6
SH
1205clean : Extensions_clean _clean
1206
1207realclean : Extensions_realclean _clean
1208
9e42cd94
GS
1209# Handy way to run perlbug -ok without having to install and run the
1210# installed perlbug. We don't re-run the tests here - we trust the user.
1211# Please *don't* use this unless all tests pass.
1212# If you want to report test failures, use "nmake nok" instead.
1213ok: utils
1214 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1215
1216okfile: utils
1217 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1218
1219nok: utils
1220 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1221
1222nokfile: utils
1223 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok