This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
bleadperl/MM/VMS (was Re: perl@22413)
[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#
60a7d337 35#INST_VER = \5.9.1
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
d921a5fb 360OPTIMIZE = -MD -DNDEBUG
9e42cd94 361LINK_DBG = -release
d921a5fb
GS
362! IF "$(WIN64)" == "define"
363# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
364OPTIMIZE = $(OPTIMIZE) -Ox -GL
365LINK_DBG = $(LINK_DBG) -ltcg
366! ELSE
367# -O1 yields smaller code, which turns out to be faster than -O2 on x86
368OPTIMIZE = $(OPTIMIZE) -O1
369#OPTIMIZE = $(OPTIMIZE) -O2
370! ENDIF
9e42cd94
GS
371!ENDIF
372
c623ac67
GS
373!IF "$(WIN64)" == "define"
374DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
375OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
376!ENDIF
377
9e42cd94
GS
378!IF "$(USE_PERLCRT)" != "define"
379BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
380!ENDIF
381
382LIBBASEFILES = $(CRYPT_LIB) \
383 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
384 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
385 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
c623ac67
GS
386 version.lib
387
388# win64 doesn't have some libs
389!IF "$(WIN64)" != "define"
390LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
391!ENDIF
9e42cd94
GS
392
393# we add LIBC here, since we may be using PerlCRT.dll
394LIBFILES = $(LIBBASEFILES) $(LIBC)
395
396CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
397 $(PCHFLAGS) $(OPTIMIZE)
398LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
399 -libpath:"$(INST_COREDIR)" \
400 -machine:$(PROCESSOR_ARCHITECTURE)
401OBJOUT_FLAG = -Fo
402EXEOUT_FLAG = -Fe
403
404CFLAGS_O = $(CFLAGS) $(BUILDOPT)
405
406#################### do not edit below this line #######################
407############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
408
409o = .obj
410
411#
412# Rules
413#
414
415.SUFFIXES : .c $(o) .dll .lib .exe .rc .res
416
417.c$(o):
418 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
419
420.y.c:
421 $(NOOP)
422
423$(o).dll:
424 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
425 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
426
427.rc.res:
428 $(RSC) -i.. $<
429
430#
431# various targets
432
433# makedef.pl must be updated if this changes, and this should normally
434# only change when there is an incompatible revision of the public API.
78a7c709
HS
435PERLIMPLIB = ..\perl59.lib
436PERLDLL = ..\perl59.dll
9e42cd94
GS
437
438MINIPERL = ..\miniperl.exe
439MINIDIR = .\mini
440PERLEXE = ..\perl.exe
441WPERLEXE = ..\wperl.exe
442GLOBEXE = ..\perlglob.exe
443CONFIGPM = ..\lib\Config.pm
444MINIMOD = ..\lib\ExtUtils\Miniperl.pm
445X2P = ..\x2p\a2p.exe
446
3890b58f
RGS
447PERLEXE_ICO = .\perlexe.ico
448PERLEXE_RES = .\perlexe.res
449PERLDLL_RES =
450
9e42cd94
GS
451# Nominate a target which causes extensions to be re-built
452# This used to be $(PERLEXE), but at worst it is the .dll that they depend
453# on and really only the interface - i.e. the .def file used to export symbols
454# from the .dll
455PERLDEP = perldll.def
456
457PL2BAT = bin\pl2bat.pl
458GLOBBAT = bin\perlglob.bat
459
460UTILS = \
461 ..\utils\h2ph \
462 ..\utils\splain \
463 ..\utils\dprofpp \
464 ..\utils\perlbug \
465 ..\utils\pl2pm \
466 ..\utils\c2ph \
827a599d 467 ..\utils\pstruct \
9e42cd94
GS
468 ..\utils\h2xs \
469 ..\utils\perldoc \
470 ..\utils\perlcc \
471 ..\utils\perlivp \
472 ..\utils\libnetcfg \
827a599d
GS
473 ..\utils\enc2xs \
474 ..\utils\piconv \
83cd6e83 475 ..\utils\cpan \
ea0e987d 476 ..\utils\xsubpp \
4b618757 477 ..\utils\prove \
ea0e987d 478 ..\utils\instmodsh \
9e42cd94
GS
479 ..\pod\checkpods \
480 ..\pod\pod2html \
481 ..\pod\pod2latex \
482 ..\pod\pod2man \
483 ..\pod\pod2text \
484 ..\pod\pod2usage \
485 ..\pod\podchecker \
486 ..\pod\podselect \
487 ..\x2p\find2perl \
827a599d 488 ..\x2p\psed \
9e42cd94 489 ..\x2p\s2p \
9e42cd94
GS
490 bin\exetype.pl \
491 bin\runperl.pl \
492 bin\pl2bat.pl \
493 bin\perlglob.pl \
494 bin\search.pl
495
496MAKE = nmake -nologo
497MAKE_BARE = nmake
498
c623ac67
GS
499!IF "$(WIN64)" == "define"
500CFGSH_TMPL = config.vc64
501CFGH_TMPL = config_H.vc64
502!ELSE
9e42cd94
GS
503CFGSH_TMPL = config.vc
504CFGH_TMPL = config_H.vc
c623ac67 505!ENDIF
9e42cd94
GS
506
507XCOPY = xcopy /f /r /i /d
508RCOPY = xcopy /f /r /i /e /d
509NOOP = @echo
510NULL =
511
512DEL = del
513
514#
515# filenames given to xsubpp must have forward slashes (since it puts
516# full pathnames in #line strings)
517XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
518 -C++ -prototypes
519
520MICROCORE_SRC = \
521 ..\av.c \
522 ..\deb.c \
523 ..\doio.c \
524 ..\doop.c \
525 ..\dump.c \
526 ..\globals.c \
527 ..\gv.c \
528 ..\hv.c \
529 ..\locale.c \
530 ..\mg.c \
531 ..\numeric.c \
532 ..\op.c \
295f0f84 533 ..\pad.c \
9e42cd94
GS
534 ..\perl.c \
535 ..\perlapi.c \
536 ..\perly.c \
537 ..\pp.c \
538 ..\pp_ctl.c \
539 ..\pp_hot.c \
540 ..\pp_pack.c \
541 ..\pp_sort.c \
542 ..\pp_sys.c \
10bc17b6 543 ..\reentr.c \
9e42cd94
GS
544 ..\regcomp.c \
545 ..\regexec.c \
546 ..\run.c \
547 ..\scope.c \
548 ..\sv.c \
549 ..\taint.c \
550 ..\toke.c \
551 ..\universal.c \
552 ..\utf8.c \
553 ..\util.c \
554 ..\xsutils.c
555
556EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
557
558!IF "$(PERL_MALLOC)" == "define"
559EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
560!ENDIF
561
562EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
563
564WIN32_SRC = \
565 .\win32.c \
566 .\win32sck.c \
567 .\win32thread.c
568
f7d585d3
GS
569# We need this for miniperl build unless we override canned
570# config.h #define building mini\*
571#!IF "$(USE_PERLIO)" == "define"
9e42cd94 572WIN32_SRC = $(WIN32_SRC) .\win32io.c
f7d585d3 573#!ENDIF
9e42cd94
GS
574
575!IF "$(CRYPT_SRC)" != ""
576WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
577!ENDIF
578
579DLL_SRC = $(DYNALOADER).c
580
581X2P_SRC = \
582 ..\x2p\a2p.c \
583 ..\x2p\hash.c \
584 ..\x2p\str.c \
585 ..\x2p\util.c \
586 ..\x2p\walk.c
587
588CORE_NOCFG_H = \
589 ..\av.h \
590 ..\cop.h \
591 ..\cv.h \
592 ..\dosish.h \
593 ..\embed.h \
594 ..\form.h \
595 ..\gv.h \
596 ..\handy.h \
597 ..\hv.h \
598 ..\iperlsys.h \
599 ..\mg.h \
600 ..\nostdio.h \
601 ..\op.h \
602 ..\opcode.h \
603 ..\perl.h \
604 ..\perlapi.h \
605 ..\perlsdio.h \
606 ..\perlsfio.h \
607 ..\perly.h \
608 ..\pp.h \
609 ..\proto.h \
610 ..\regexp.h \
611 ..\scope.h \
612 ..\sv.h \
613 ..\thread.h \
614 ..\unixish.h \
615 ..\utf8.h \
616 ..\util.h \
617 ..\warnings.h \
618 ..\XSUB.h \
619 ..\EXTERN.h \
620 ..\perlvars.h \
621 ..\intrpvar.h \
622 ..\thrdvar.h \
623 .\include\dirent.h \
624 .\include\netdb.h \
625 .\include\sys\socket.h \
626 .\win32.h
627
628CORE_H = $(CORE_NOCFG_H) .\config.h
629
630MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
631CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
632WIN32_OBJ = $(WIN32_SRC:.c=.obj)
633MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
634 $(MINIDIR)\miniperlmain$(o) \
635 $(MINIDIR)\perlio$(o)
636MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
637MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
638DLL_OBJ = $(DLL_SRC:.c=.obj)
639X2P_OBJ = $(X2P_SRC:.c=.obj)
640
641PERLDLL_OBJ = $(CORE_OBJ)
642PERLEXE_OBJ = perlmain$(o)
643
644PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
645#PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
646
647!IF "$(USE_SETARGV)" != ""
648SETARGV_OBJ = setargv$(o)
649!ENDIF
650
651DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
652SOCKET = $(EXTDIR)\Socket\Socket
653FCNTL = $(EXTDIR)\Fcntl\Fcntl
654OPCODE = $(EXTDIR)\Opcode\Opcode
655SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
656IO = $(EXTDIR)\IO\IO
657POSIX = $(EXTDIR)\POSIX\POSIX
658ATTRS = $(EXTDIR)\attrs\attrs
659THREAD = $(EXTDIR)\Thread\Thread
660B = $(EXTDIR)\B\B
661RE = $(EXTDIR)\re\re
662DUMPER = $(EXTDIR)\Data\Dumper\Dumper
663ERRNO = $(EXTDIR)\Errno\Errno
664PEEK = $(EXTDIR)\Devel\Peek\Peek
665BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
666DPROF = $(EXTDIR)\Devel\DProf\DProf
667GLOB = $(EXTDIR)\File\Glob\Glob
668HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
669STORABLE = $(EXTDIR)\Storable\Storable
670FILTER = $(EXTDIR)\Filter\Util\Call\Call
671ENCODE = $(EXTDIR)\Encode\Encode
672MD5 = $(EXTDIR)\Digest\MD5\MD5
e934609f 673PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar
9e42cd94
GS
674MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
675TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
676CWD = $(EXTDIR)\Cwd\Cwd
677LISTUTIL = $(EXTDIR)\List\Util\Util
e934609f 678PERLIOVIA = $(EXTDIR)\PerlIO\via\via
83e2e978 679XSAPITEST = $(EXTDIR)\XS\APItest\APItest
9e42cd94
GS
680XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
681UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
682
683SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
684FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
685OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
686SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
687IO_DLL = $(AUTODIR)\IO\IO.dll
688POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
689ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
690THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
691B_DLL = $(AUTODIR)\B\B.dll
692DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
693PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
694RE_DLL = $(AUTODIR)\re\re.dll
695BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
696DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
697GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
698HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
699STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
700FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
701ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
702MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
e934609f 703PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll
9e42cd94
GS
704MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
705TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
706CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
707LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
e934609f 708PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll
83e2e978 709XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll
9e42cd94
GS
710XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
711UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
712
713EXTENSION_C = \
714 $(SOCKET).c \
715 $(FCNTL).c \
716 $(OPCODE).c \
717 $(SDBM_FILE).c \
718 $(IO).c \
719 $(POSIX).c \
720 $(ATTRS).c \
721 $(THREAD).c \
722 $(RE).c \
723 $(DUMPER).c \
724 $(PEEK).c \
725 $(B).c \
726 $(BYTELOADER).c \
727 $(DPROF).c \
728 $(GLOB).c \
729 $(HOSTNAME).c \
730 $(STORABLE).c \
731 $(FILTER).c \
732 $(ENCODE).c \
733 $(MD5).c \
734 $(PERLIOSCALAR).c \
735 $(MIMEBASE64).c \
736 $(TIMEHIRES).c \
737 $(CWD).c \
738 $(LISTUTIL).c \
739 $(PERLIOVIA).c \
83e2e978 740 $(XSAPITEST).c \
9e42cd94
GS
741 $(XSTYPEMAP).c \
742 $(UNICODENORMALIZE).c
743
744EXTENSION_DLL = \
745 $(SOCKET_DLL) \
746 $(FCNTL_DLL) \
747 $(OPCODE_DLL) \
748 $(SDBM_FILE_DLL)\
749 $(IO_DLL) \
750 $(POSIX_DLL) \
751 $(ATTRS_DLL) \
752 $(DUMPER_DLL) \
753 $(PEEK_DLL) \
754 $(B_DLL) \
755 $(RE_DLL) \
756 $(THREAD_DLL) \
757 $(BYTELOADER_DLL) \
758 $(DPROF_DLL) \
759 $(GLOB_DLL) \
760 $(HOSTNAME_DLL) \
761 $(STORABLE_DLL) \
762 $(FILTER_DLL) \
763 $(ENCODE_DLL) \
764 $(MD5_DLL) \
765 $(PERLIOSCALAR_DLL) \
766 $(MIMEBASE64_DLL) \
767 $(TIMEHIRES_DLL) \
768 $(CWD_DLL) \
769 $(LISTUTIL_DLL) \
770 $(PERLIOVIA_DLL) \
83e2e978 771 $(XSAPITEST_DLL) \
9e42cd94
GS
772 $(XSTYPEMAP_DLL) \
773 $(UNICODENORMALIZE_DLL)
774
775POD2HTML = $(PODDIR)\pod2html
776POD2MAN = $(PODDIR)\pod2man
777POD2LATEX = $(PODDIR)\pod2latex
778POD2TEXT = $(PODDIR)\pod2text
779
780CFG_VARS = \
781 "INST_DRV=$(INST_DRV)" \
782 "INST_TOP=$(INST_TOP)" \
783 "INST_VER=$(INST_VER)" \
784 "INST_ARCH=$(INST_ARCH)" \
785 "archname=$(ARCHNAME)" \
786 "cc=$(CC)" \
787 "ld=$(LINK32)" \
788 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
789 "cf_email=$(EMAIL)" \
790 "d_crypt=$(D_CRYPT)" \
791 "d_mymalloc=$(PERL_MALLOC)" \
792 "libs=$(LIBFILES)" \
793 "incpath=$(CCINCDIR:"=\")" \
794 "libperl=$(PERLIMPLIB:..\=)" \
795 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
796 "libc=$(LIBC)" \
797 "make=$(MAKE_BARE)" \
7e0017d3 798 "usethreads=$(USE_ITHREADS)" \
9e42cd94 799 "useithreads=$(USE_ITHREADS)" \
9e42cd94
GS
800 "usemultiplicity=$(USE_MULTI)" \
801 "useperlio=$(USE_PERLIO)" \
4a9d6100 802 "uselargefiles=$(USE_LARGE_FILES)" \
9e42cd94
GS
803 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
804 "optimize=$(OPTIMIZE:"=\")"
805
806#
807# Top targets
808#
809
810all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
811 $(X2P) Extensions
812 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
813
814$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
815
816#------------------------------------------------------------
817
818$(GLOBEXE) : perlglob$(o)
819 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
820 perlglob$(o) setargv$(o)
821
822perlglob$(o) : perlglob.c
823
824config.w32 : $(CFGSH_TMPL)
825 copy $(CFGSH_TMPL) config.w32
826
827.\config.h : $(CFGH_TMPL)
828 -del /f config.h
829 copy $(CFGH_TMPL) config.h
830
831..\config.sh : config.w32 $(MINIPERL) config_sh.PL
832 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
833
834# this target is for when changes to the main config.sh happen
835# edit config.{b,v,g}c and make this target once for each supported
836# compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
837regen_config_h:
838 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
839 cd ..
8839b9e4 840 -del /f perl.exe perl*.dll
9e42cd94
GS
841 perl configpm
842 cd win32
843 -del /f $(CFGH_TMPL)
844 -mkdir $(COREDIR)
8839b9e4 845 -perl config_h.PL "INST_VER=$(INST_VER)"
9e42cd94
GS
846 rename config.h $(CFGH_TMPL)
847
848$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
849 cd ..
850 miniperl configpm
851 cd win32
852 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
853 $(XCOPY) ..\*.h $(COREDIR)\*.*
854 $(XCOPY) *.h $(COREDIR)\*.*
855 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
856 $(RCOPY) include $(COREDIR)\*.*
857 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
858 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
859
860$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
861 $(LINK32) -subsystem:console -out:$@ @<<
862 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
863<<
864
865$(MINIDIR) :
866 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
867
868$(MINICORE_OBJ) : $(CORE_NOCFG_H)
869 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
870
871$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
872 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
873
874# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
875# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
876!IF "$(USE_IMP_SYS)" == "define"
877perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
878 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
879!ENDIF
880
881# 1. we don't want to rebuild miniperl.exe when config.h changes
882# 2. we don't want to rebuild miniperl.exe with non-default config.h
883$(MINI_OBJ) : $(CORE_NOCFG_H)
884
885$(WIN32_OBJ) : $(CORE_H)
886$(CORE_OBJ) : $(CORE_H)
887$(DLL_OBJ) : $(CORE_H)
888$(X2P_OBJ) : $(CORE_H)
889
890perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
891 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
892 CCTYPE=$(CCTYPE) > perldll.def
893
894$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
895 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
896 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
897<<
898 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
899
e84ac4e2
SH
900$(PERLEXE_ICO): $(MINIPERL) makeico.pl
901 $(MINIPERL) makeico.pl > $@
902
903$(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO)
904
9e42cd94
GS
905$(MINIMOD) : $(MINIPERL) ..\minimod.pl
906 cd ..
907 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
908 cd win32
909
910..\x2p\a2p$(o) : ..\x2p\a2p.c
911 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
912
913..\x2p\hash$(o) : ..\x2p\hash.c
914 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
915
916..\x2p\str$(o) : ..\x2p\str.c
917 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
918
919..\x2p\util$(o) : ..\x2p\util.c
920 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
921
922..\x2p\walk$(o) : ..\x2p\walk.c
923 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
924
925$(X2P) : $(MINIPERL) $(X2P_OBJ)
926 $(MINIPERL) ..\x2p\find2perl.PL
927 $(MINIPERL) ..\x2p\s2p.PL
928 $(LINK32) -subsystem:console -out:$@ @<<
929 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
930<<
931
932perlmain.c : runperl.c
933 copy runperl.c perlmain.c
934
935perlmain$(o) : perlmain.c
936 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
937
938$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
939 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
940 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
941 copy $(PERLEXE) $(WPERLEXE)
942 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
943 copy splittree.pl ..
944 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
945
946$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
947 if not exist $(AUTODIR) mkdir $(AUTODIR)
948 cd $(EXTDIR)\$(*B)
949 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
950 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
951 cd ..\..\win32
952 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
953 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
954 cd $(EXTDIR)\$(*B)
955 $(XSUBPP) dl_win32.xs > $(*B).c
956 cd ..\..\win32
957
958$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
959 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
960
961#----------------------------------------------------------------------------------
962Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
963 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
964
965Extensions_clean:
966 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
967
968#----------------------------------------------------------------------------------
969
970doc: $(PERLEXE)
971 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
972 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
973 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
974
b0b6bf2b
AT
975# Note that this next section is parsed (and regenerated) by pod/buildtoc
976# so please check that script before making structural changes here
977
9e42cd94
GS
978utils: $(PERLEXE) $(X2P)
979 cd ..\utils
980 $(MAKE) PERL=$(MINIPERL)
981 cd ..\pod
4cb44f92 982 copy ..\vms\perlvms.pod .\perlvms.pod
b0b6bf2b
AT
983 copy ..\README.aix ..\pod\perlaix.pod
984 copy ..\README.amiga ..\pod\perlamiga.pod
985 copy ..\README.apollo ..\pod\perlapollo.pod
986 copy ..\README.beos ..\pod\perlbeos.pod
987 copy ..\README.bs2000 ..\pod\perlbs2000.pod
988 copy ..\README.ce ..\pod\perlce.pod
989 copy ..\README.cn ..\pod\perlcn.pod
990 copy ..\README.cygwin ..\pod\perlcygwin.pod
991 copy ..\README.dgux ..\pod\perldgux.pod
992 copy ..\README.dos ..\pod\perldos.pod
993 copy ..\README.epoc ..\pod\perlepoc.pod
994 copy ..\README.freebsd ..\pod\perlfreebsd.pod
995 copy ..\README.hpux ..\pod\perlhpux.pod
996 copy ..\README.hurd ..\pod\perlhurd.pod
997 copy ..\README.irix ..\pod\perlirix.pod
998 copy ..\README.jp ..\pod\perljp.pod
999 copy ..\README.ko ..\pod\perlko.pod
1000 copy ..\README.machten ..\pod\perlmachten.pod
1001 copy ..\README.macos ..\pod\perlmacos.pod
1002 copy ..\README.macosx ..\pod\perlmacosx.pod
1003 copy ..\README.mint ..\pod\perlmint.pod
1004 copy ..\README.mpeix ..\pod\perlmpeix.pod
1005 copy ..\README.netware ..\pod\perlnetware.pod
1006 copy ..\README.os2 ..\pod\perlos2.pod
1007 copy ..\README.os390 ..\pod\perlos390.pod
1008 copy ..\README.os400 ..\pod\perlos400.pod
1009 copy ..\README.plan9 ..\pod\perlplan9.pod
1010 copy ..\README.qnx ..\pod\perlqnx.pod
1011 copy ..\README.solaris ..\pod\perlsolaris.pod
1012 copy ..\README.tru64 ..\pod\perltru64.pod
1013 copy ..\README.tw ..\pod\perltw.pod
1014 copy ..\README.uts ..\pod\perluts.pod
1015 copy ..\README.vmesa ..\pod\perlvmesa.pod
1016 copy ..\README.vms ..\pod\perlvms.pod
1017 copy ..\README.vos ..\pod\perlvos.pod
1018 copy ..\README.win32 ..\pod\perlwin32.pod
1400179b 1019 copy ..\pod\perl591delta.pod ..\pod\perldelta.pod
9e42cd94
GS
1020 $(MAKE) -f ..\win32\pod.mak converters
1021 cd ..\lib
1022 $(PERLEXE) lib_pm.PL
1023 cd ..\win32
1024 $(PERLEXE) $(PL2BAT) $(UTILS)
1025
b0b6bf2b
AT
1026# Note that the pod cleanup in this next section is parsed (and regenerated
1027# by pod/buildtoc so please check that script before making changes here
1028
522078af
GS
1029# the doubled rmdir calls are needed because older cmd shells
1030# don't understand /q
9e42cd94
GS
1031distclean: clean
1032 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1033 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1034 -del /f *.def *.map
1035 -del /f $(EXTENSION_DLL)
1036 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1037 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1038 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1039 -del /f $(LIBDIR)\XSLoader.pm
1040 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1041 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1042 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1043 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1044 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1045 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1046 -del /f $(LIBDIR)\File\Glob.pm
1047 -del /f $(LIBDIR)\Storable.pm
1048 -del /f $(LIBDIR)\Filter\Util\Call.pm
1049 -del /f $(LIBDIR)\Digest\MD5.pm
e934609f
JH
1050 -del /f $(LIBDIR)\PerlIO\scalar.pm
1051 -del /f $(LIBDIR)\PerlIO\via.pm
9e42cd94
GS
1052 -del /f $(LIBDIR)\MIME\Base64.pm
1053 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
1054 -del /f $(LIBDIR)\List\Util.pm
1055 -del /f $(LIBDIR)\Scalar\Util.pm
1056 -del /f $(LIBDIR)\Time\HiRes.pm
83e2e978 1057 -del /f $(LIBDIR)\XS\APItest.pm
9e42cd94
GS
1058 -del /f $(LIBDIR)\XS\Typemap.pm
1059 -del /f $(LIBDIR)\Unicode\Normalize.pm
1060 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
522078af 1061 -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
9e42cd94 1062 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
522078af 1063 -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
9e42cd94 1064 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
522078af 1065 -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
9e42cd94 1066 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
522078af 1067 -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
9e42cd94 1068 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
522078af 1069 -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
9e42cd94 1070 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
522078af 1071 -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
9e42cd94 1072 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
522078af 1073 -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
9e42cd94 1074 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
522078af 1075 -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
9e42cd94
GS
1076 cd $(PODDIR)
1077 -del /f *.html *.bat checkpods \
1078 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
b0b6bf2b 1079 perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1400179b
NC
1080 perldelta.pod perldgux.pod perldos.pod perlepoc.pod \
1081 perlfreebsd.pod perlhpux.pod perlhurd.pod perlirix.pod \
1082 perljp.pod perlko.pod perlmachten.pod perlmacos.pod \
1083 perlmacosx.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1084 perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
1085 perlqnx.pod perlsolaris.pod perltru64.pod perltw.pod \
1086 perluts.pod perlvmesa.pod perlvms.pod perlvms.pod perlvos.pod \
1087 perlwin32.pod \
b0b6bf2b 1088 pod2html pod2latex pod2man pod2text pod2usage \
9e42cd94
GS
1089 podchecker podselect
1090 cd ..\utils
827a599d 1091 -del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs perldoc perlivp \
4b618757 1092 dprofpp perlcc libnetcfg enc2xs piconv cpan xsubpp instmodsh prove
9e42cd94
GS
1093 -del /f *.bat
1094 cd ..\win32
1095 cd ..\x2p
827a599d 1096 -del /f find2perl s2p psed
9e42cd94
GS
1097 -del /f *.bat
1098 cd ..\win32
1099 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1100 -del /f $(CONFIGPM)
1101 -del /f bin\*.bat
827a599d
GS
1102 cd ..
1103 -del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
1104 cd win32
9e42cd94 1105 cd $(EXTDIR)
827a599d 1106 -del /s *.def Makefile Makefile.old
9e42cd94
GS
1107 cd ..\win32
1108 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
522078af 1109 -if exist $(AUTODIR) rmdir /s $(AUTODIR)
9e42cd94 1110 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
522078af 1111 -if exist $(COREDIR) rmdir /s $(COREDIR)
9e42cd94
GS
1112
1113install : all installbare installhtml
1114
1115installbare : utils
1116 $(PERLEXE) ..\installperl
1117 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1118 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1119 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1120
1121installhtml : doc
1122 $(RCOPY) html\*.* $(INST_HTML)\*.*
1123
1124inst_lib : $(CONFIGPM)
1125 copy splittree.pl ..
1126 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1127 $(RCOPY) ..\lib $(INST_LIB)\*.*
1128
1129minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1130 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1131 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1132 attrib -r ..\t\*.*
1133 copy test ..\t
1134 cd ..\t
1135 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1136 cd ..\win32
1137
1138test-prep : all utils
1139 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1140 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1141 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1142
1143test : test-prep
1144 cd ..\t
1145 $(PERLEXE) -I..\lib harness
1146 cd ..\win32
1147
1148test-notty : test-prep
1149 set PERL_SKIP_TTY_TEST=1
1150 cd ..\t
1151 $(PERLEXE) -I..\lib harness
1152 cd ..\win32
1153
b4a93add
NK
1154_test :
1155 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1156 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1157 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1158 cd ..\t
1159 $(PERLEXE) -I..\lib harness
1160 cd ..\win32
1161
9e42cd94
GS
1162clean : Extensions_clean
1163 -@$(DEL) miniperlmain$(o)
1164 -@$(DEL) $(MINIPERL)
1165 -@$(DEL) perlglob$(o)
1166 -@$(DEL) perlmain$(o)
1167 -@$(DEL) config.w32
1168 -@$(DEL) config.h
1169 -@$(DEL) $(GLOBEXE)
1170 -@$(DEL) $(PERLEXE)
1171 -@$(DEL) $(WPERLEXE)
1172 -@$(DEL) $(PERLDLL)
1173 -@$(DEL) $(CORE_OBJ)
1174 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
522078af 1175 -if exist $(MINIDIR) rmdir /s $(MINIDIR)
9e42cd94
GS
1176 -@$(DEL) $(WIN32_OBJ)
1177 -@$(DEL) $(DLL_OBJ)
1178 -@$(DEL) $(X2P_OBJ)
1179 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1180 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1181 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1182 -@$(DEL) *.ilk
1183 -@$(DEL) *.pdb
1184
1185# Handy way to run perlbug -ok without having to install and run the
1186# installed perlbug. We don't re-run the tests here - we trust the user.
1187# Please *don't* use this unless all tests pass.
1188# If you want to report test failures, use "nmake nok" instead.
1189ok: utils
1190 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1191
1192okfile: utils
1193 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1194
1195nok: utils
1196 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1197
1198nokfile: utils
1199 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok