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