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