Once again syncing after too long an absence
[p5sagit/p5-mst-13.2.git] / win32 / Makefile
CommitLineData
e7083a8c 1#
2# Makefile to build perl on Windows NT using Microsoft NMAKE.
0e06870b 3# Supported compilers:
4# Visual C++ 5.x (possibly other versions)
68dc0745 5#
6# This is set up to build a perl.exe that runs off a shared library
0e06870b 7# (perl57.dll). Also makes individual DLLs for the XS extensions.
e7083a8c 8#
9
10##
69e1fe5e 11## Make sure you read README.win32 *before* you mess with anything here!
12##
13
14##
e7083a8c 15## Build configuration. Edit the values below to suit your needs.
16##
17
137443ea 18#
19# Set these to wherever you want "nmake install" to put your
20# newly built perl.
e7083a8c 21#
eb480a0b 22INST_DRV = c:
e5a95ffb 23INST_TOP = $(INST_DRV)\perl
24
e7083a8c 25#
e5a95ffb 26# Comment this out if you DON'T want your perl installation to be versioned.
27# This means that the new installation will overwrite any files from the
28# old installation at the same INST_TOP location. Leaving it enabled is
29# the safest route, as perl adds the extra version directory to all the
30# locations it installs files to. If you disable it, an alternative
31# versioned installation can be obtained by setting INST_TOP above to a
32# path that includes an arbitrary version string.
e7083a8c 33#
0e06870b 34INST_VER = \5.7.0
d07c2202 35
36#
0cb96387 37# Comment this out if you DON'T want your perl installation to have
38# architecture specific components. This means that architecture-
39# specific files will be installed along with the architecture-neutral
40# files. Leaving it enabled is safer and more flexible, in case you
41# want to build multiple flavors of perl and install them together in
42# the same location. Commenting it out gives you a simpler
43# installation that is easier to understand for beginners.
44#
51371543 45INST_ARCH = \$(ARCHNAME)
0cb96387 46
47#
d08ede9a 48# uncomment to enable multiple interpreters. This is need for fork()
49# emulation.
c5be433b 50#
d08ede9a 51#USE_MULTI = define
137443ea 52
c90c0ff4 53#
d08ede9a 54# Beginnings of interpreter cloning/threads; still very incomplete.
55# This should be enabled to get the fork() emulation. This needs
56# USE_MULTI as well.
b86a2fa7 57#
d08ede9a 58#USE_ITHREADS = define
b86a2fa7 59
60#
d08ede9a 61# uncomment to enable the implicit "host" layer for all system calls
62# made by perl. This needs USE_MULTI above. This is also needed to
63# get fork().
c5be433b 64#
d08ede9a 65#USE_IMP_SYS = define
c5be433b 66
67#
0e06870b 68# uncomment to enable the experimental PerlIO I/O subsystem.
69# This is currently incompatible with USE_MULTI, USE_ITHREADS,
70# and USE_IMP_SYS
71#USE_PERLIO = define
72
73#
d08ede9a 74# WARNING! This option is deprecated and will eventually go away (enable
75# USE_ITHREADS instead).
7766f137 76#
d08ede9a 77# uncomment to enable threads-capabilities. This is incompatible with
78# USE_ITHREADS, and is only here for people who may have come to rely
79# on the experimental Thread support that was in 5.005.
7766f137 80#
0e06870b 81#USE_5005THREADS = define
7766f137 82
83#
d08ede9a 84# WARNING! This option is deprecated and will eventually go away (enable
85# USE_MULTI instead).
7766f137 86#
d08ede9a 87# uncomment next line if you want to use the PERL_OBJECT build option.
88# DO NOT ENABLE unless you have legacy code that relies on the C++
89# CPerlObj class that was available in 5.005. This cannot be enabled
90# if you ask for USE_5005THREADS above.
91#
92#USE_OBJECT = define
7766f137 93
94#
7fac1903 95# uncomment one of the following lines if you are using either
96# Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
e7083a8c 97#
eb480a0b 98#CCTYPE = MSVC20
7fac1903 99#CCTYPE = MSVC60
c90c0ff4 100
101#
102# uncomment next line if you want debug version of perl (big,slow)
e7083a8c 103#
eb480a0b 104#CFG = Debug
137443ea 105
d484a829 106#
66aa1127 107# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
5db10396 108# It has patches that fix known bugs in older versions of MSVCRT.DLL.
c5be433b 109# This currently requires VC 5.0 with Service Pack 3 or later.
b89743e8 110# Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
66aa1127 111# and follow the directions in the package to install.
e7083a8c 112#
f7aeb604 113# Not recommended if you have VC 6.x and you're not running Windows 9x.
114#
e7083a8c 115#USE_PERLCRT = define
116
117#
baed7233 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#
26618a56 127# if you have the source for des_fcrypt(), uncomment this and make sure the
8d9b2e3c 128# file exists (see README.win32). File should be located in the same
ff95b63e 129# directory as this file.
e7083a8c 130#
2d77217b 131#CRYPT_SRC = fcrypt.c
26618a56 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)
a1dd9325 136# Specify the full pathname of the library.
e7083a8c 137#
2d77217b 138#CRYPT_LIB = fcrypt.lib
26618a56 139
140#
1c1c7f20 141# set this if you wish to use perl's malloc
142# WARNING: Turning this on/off WILL break binary compatibility with extensions
5fd76c3e 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
d08ede9a 145# if you ask for USE_IMP_SYS above.
e7083a8c 146#
01f988be 147#PERL_MALLOC = define
1c1c7f20 148
149#
3e3baf6d 150# set the install locations of the compiler include/libraries
69e1fe5e 151# Running VCVARS32.BAT is *required* when using Visual C.
95883bf3 152# Some versions of Visual C don't define MSVCDIR in the environment,
80252599 153# so you may have to set CCHOME explicitly (spaces in the path name should
154# not be quoted)
a8deba26 155#
eb480a0b 156#CCHOME = f:\msvc20
157CCHOME = $(MSVCDIR)
158CCINCDIR = $(CCHOME)\include
159CCLIBDIR = $(CCHOME)\lib
3e3baf6d 160
161#
c39cd008 162# Additional compiler flags can be specified here.
e02fdbd2 163#
c39cd008 164
165#
166# This should normally be disabled. Adding -DPERL_POLLUTE enables support
167# for old symbols by default, at the expense of extreme pollution. You most
168# probably just want to build modules that won't compile with
169# perl Makefile.PL POLLUTE=1
170# instead of enabling this. Please report such modules to the respective
171# authors.
e02fdbd2 172#
c5be433b 173#BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
e02fdbd2 174
175#
c39cd008 176# This should normally be disabled. Enabling it will disable the File::Glob
177# implementation of CORE::glob.
a7089531 178#
52bb0670 179#BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
a7089531 180
c39cd008 181#
182# This should normally be disabled. Enabling it causes perl to read scripts
183# in text mode (which is the 5.005 behavior) and will break ByteLoader.
e68cb057 184#BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
5db10396 185
c39cd008 186#
80252599 187# specify semicolon-separated list of extra directories that modules will
188# look for libraries (spaces in path names need not be quoted)
fa4efe8e 189#
190EXTRALIBDIRS =
191
192#
d484a829 193# set this to your email address (perl will guess a value from
194# from your loginname and your hostname, which may not be right)
e7083a8c 195#
fd9459bc 196#EMAIL =
d484a829 197
e7083a8c 198##
199## Build configuration ends.
200##
201
137443ea 202##################### CHANGE THESE ONLY IF YOU MUST #####################
203
26618a56 204!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
eb480a0b 205D_CRYPT = undef
26618a56 206!ELSE
eb480a0b 207D_CRYPT = define
208CRYPT_FLAG = -DHAVE_DES_FCRYPT
209!ENDIF
210
c5be433b 211!IF "$(USE_OBJECT)" == "define"
eb480a0b 212PERL_MALLOC = undef
aaacdc8b 213USE_5005THREADS = undef
b86a2fa7 214USE_MULTI = undef
7766f137 215USE_IMP_SYS = define
26618a56 216!ENDIF
217
1c1c7f20 218!IF "$(PERL_MALLOC)" == ""
219PERL_MALLOC = undef
220!ENDIF
221
aaacdc8b 222!IF "$(USE_5005THREADS)" == ""
223USE_5005THREADS = undef
eb480a0b 224!ENDIF
225
aaacdc8b 226!IF "$(USE_5005THREADS)" == "define"
7766f137 227USE_ITHREADS = undef
228!ENDIF
229
d08ede9a 230!IF "$(USE_IMP_SYS)" == "define"
231PERL_MALLOC = undef
232!ENDIF
233
b86a2fa7 234!IF "$(USE_MULTI)" == ""
235USE_MULTI = undef
236!ENDIF
237
3bb366e1 238!IF "$(USE_OBJECT)" == ""
239USE_OBJECT = undef
240!ENDIF
241
7766f137 242!IF "$(USE_ITHREADS)" == ""
243USE_ITHREADS = undef
244!ENDIF
245
246!IF "$(USE_IMP_SYS)" == ""
247USE_IMP_SYS = undef
248!ENDIF
249
f7aeb604 250!IF "$(USE_PERLCRT)" == ""
251USE_PERLCRT = undef
252!ENDIF
253
6f4183fe 254!IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef"
255USE_MULTI = define
256!ENDIF
257
258!IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef"
259USE_MULTI = define
260USE_5005THREADS = undef
261!ENDIF
262
aaacdc8b 263!IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
0b94c7bb 264BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
265!ENDIF
266
7766f137 267!IF "$(USE_IMP_SYS)" != "undef"
268BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
269!ENDIF
270
d07c2202 271!IF "$(PROCESSOR_ARCHITECTURE)" == ""
272PROCESSOR_ARCHITECTURE = x86
273!ENDIF
274
c5be433b 275!IF "$(USE_OBJECT)" == "define"
b83ac84c 276ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
277!ELSE
aaacdc8b 278!IF "$(USE_5005THREADS)" == "define"
d07c2202 279ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
924b3ec4 280!ELSE
c5be433b 281!IF "$(USE_MULTI)" == "define"
282ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
283!ELSE
0e06870b 284!IF "$(USE_PERLIO)" == "define"
285ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
286!ELSE
924b3ec4 287ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
d07c2202 288!ENDIF
b83ac84c 289!ENDIF
c5be433b 290!ENDIF
0e06870b 291!ENDIF
292
293!IF "$(USE_PERLIO)" == "define"
294BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
295!ENDIF
d07c2202 296
aaacdc8b 297!IF "$(USE_ITHREADS)" == "define"
298ARCHNAME = $(ARCHNAME)-thread
299!ENDIF
300
7fac1903 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.
0e06870b 306DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
7fac1903 307
308# VC 6.0 seems capable of compiling perl correctly with optimizations
309# enabled. Anything earlier fails tests.
310!IF "$(CFG)" == ""
311CFG = Optimize
312!ENDIF
313!ENDIF
314
28004758 315ARCHDIR = ..\lib\$(ARCHNAME)
d07c2202 316COREDIR = ..\lib\CORE
eb480a0b 317AUTODIR = ..\lib\auto
28004758 318LIBDIR = ..\lib
319EXTDIR = ..\ext
320PODDIR = ..\pod
321EXTUTILSDIR = $(LIBDIR)\ExtUtils
322
323#
324INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
325INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
326INST_LIB = $(INST_TOP)$(INST_VER)\lib
327INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
328INST_COREDIR = $(INST_ARCHLIB)\CORE
329INST_POD = $(INST_LIB)\pod
330INST_HTML = $(INST_POD)\html
d07c2202 331
137443ea 332#
333# Programs to compile, build .lib files and link
334#
68dc0745 335
045453ec 336CC = cl
337LINK32 = link
eb480a0b 338LIB32 = $(LINK32) -lib
fd9459bc 339RSC = rc
eb480a0b 340
68dc0745 341#
137443ea 342# Options
343#
eb480a0b 344
9036c72f 345INCLUDES = -I$(COREDIR) -I.\include -I. -I..
0e06870b 346#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
c5be433b 347DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
eb480a0b 348LOCDEFS = -DPERLDLL -DPERL_CORE
349SUBSYS = console
350CXX_FLAG = -TP -GX
137443ea 351
f7aeb604 352!IF "$(USE_PERLCRT)" != "define"
ee8c7f54 353LIBC = msvcrt.lib
e7083a8c 354!ELSE
ee8c7f54 355LIBC = PerlCRT.lib
e7083a8c 356!ENDIF
357
fd9459bc 358PERLEXE_RES =
359PERLDLL_RES =
360
137443ea 361!IF "$(CFG)" == "Debug"
362! IF "$(CCTYPE)" == "MSVC20"
ee8c7f54 363OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
137443ea 364! ELSE
ee8c7f54 365OPTIMIZE = -Od -MD -Zi -DDEBUGGING
137443ea 366! ENDIF
eb480a0b 367LINK_DBG = -debug -pdb:none
137443ea 368!ELSE
74593e1f 369! IF "$(CFG)" == "Optimize"
c5be433b 370# -O1 yields smaller code, which turns out to be faster than -O2
ee8c7f54 371#OPTIMIZE = -O2 -MD -DNDEBUG
372OPTIMIZE = -O1 -MD -DNDEBUG
137443ea 373! ELSE
ee8c7f54 374OPTIMIZE = -Od -MD -DNDEBUG
137443ea 375! ENDIF
eb480a0b 376LINK_DBG = -release
377!ENDIF
378
c5be433b 379!IF "$(USE_OBJECT)" == "define"
eb480a0b 380OPTIMIZE = $(OPTIMIZE) $(CXX_FLAG)
c5be433b 381BUILDOPT = $(BUILDOPT) -DPERL_OBJECT
137443ea 382!ENDIF
68dc0745 383
f7aeb604 384!IF "$(USE_PERLCRT)" != "define"
385BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
386!ENDIF
387
ee8c7f54 388LIBBASEFILES = $(CRYPT_LIB) \
f7aeb604 389 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
390 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
391 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
eb480a0b 392 version.lib odbc32.lib odbccp32.lib
3e3baf6d 393
e7083a8c 394# we add LIBC here, since we may be using PerlCRT.dll
395LIBFILES = $(LIBBASEFILES) $(LIBC)
396
eb480a0b 397CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
398 $(PCHFLAGS) $(OPTIMIZE)
28004758 399LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
400 -libpath:"$(INST_COREDIR)" \
401 -machine:$(PROCESSOR_ARCHITECTURE)
eb480a0b 402OBJOUT_FLAG = -Fo
403EXEOUT_FLAG = -Fe
404
c5be433b 405CFLAGS_O = $(CFLAGS) $(BUILDOPT)
137443ea 406
407#################### do not edit below this line #######################
408############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
409
d56e6723 410o = .obj
411
137443ea 412#
413# Rules
0e06870b 414#
137443ea 415
fd9459bc 416.SUFFIXES : .c $(o) .dll .lib .exe .rc .res
d56e6723 417
418.c$(o):
eb480a0b 419 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
420
421.y.c:
422 $(NOOP)
137443ea 423
d56e6723 424$(o).dll:
3e3baf6d 425 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
0e06870b 426 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
68dc0745 427
fd9459bc 428.rc.res:
e9ff6d27 429 $(RSC) -i.. $<
fd9459bc 430
68dc0745 431#
68dc0745 432# various targets
0e06870b 433
434# makedef.pl must be updated if this changes, and this should normally
435# only change when there is an incompatible revision of the public API.
436# XXX so why did we change it from perl56 to perl57?
437PERLIMPLIB = ..\perl57.lib
438PERLDLL = ..\perl57.dll
26618a56 439
eb480a0b 440MINIPERL = ..\miniperl.exe
441MINIDIR = .\mini
442PERLEXE = ..\perl.exe
7766f137 443WPERLEXE = ..\wperl.exe
eb480a0b 444GLOBEXE = ..\perlglob.exe
445CONFIGPM = ..\lib\Config.pm
446MINIMOD = ..\lib\ExtUtils\Miniperl.pm
447X2P = ..\x2p\a2p.exe
448
449PL2BAT = bin\pl2bat.pl
450GLOBBAT = bin\perlglob.bat
451
4a71ed0c 452UTILS = \
453 ..\utils\h2ph \
454 ..\utils\splain \
95667ae4 455 ..\utils\dprofpp \
4a71ed0c 456 ..\utils\perlbug \
457 ..\utils\pl2pm \
458 ..\utils\c2ph \
459 ..\utils\h2xs \
460 ..\utils\perldoc \
4a71ed0c 461 ..\utils\perlcc \
462 ..\pod\checkpods \
463 ..\pod\pod2html \
464 ..\pod\pod2latex \
465 ..\pod\pod2man \
466 ..\pod\pod2text \
360aca43 467 ..\pod\pod2usage \
468 ..\pod\podchecker \
469 ..\pod\podselect \
4a71ed0c 470 ..\x2p\find2perl \
471 ..\x2p\s2p \
c4bbdec3 472 bin\exetype.pl \
4a71ed0c 473 bin\runperl.pl \
474 bin\pl2bat.pl \
475 bin\perlglob.pl \
476 bin\search.pl
477
eb480a0b 478MAKE = nmake -nologo
479
480CFGSH_TMPL = config.vc
481CFGH_TMPL = config_H.vc
e7083a8c 482
eb480a0b 483XCOPY = xcopy /f /r /i /d
484RCOPY = xcopy /f /r /i /e /d
485NOOP = @echo
486NULL =
1c1c7f20 487
0e06870b 488DEL = bin\mdelete.bat
489
68dc0745 490#
491# filenames given to xsubpp must have forward slashes (since it puts
492# full pathnames in #line strings)
eb480a0b 493XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
494 -C++ -prototypes
495
852c2e52 496MICROCORE_SRC = \
eb480a0b 497 ..\av.c \
eb480a0b 498 ..\deb.c \
499 ..\doio.c \
500 ..\doop.c \
501 ..\dump.c \
502 ..\globals.c \
503 ..\gv.c \
504 ..\hv.c \
505 ..\mg.c \
506 ..\op.c \
507 ..\perl.c \
51371543 508 ..\perlapi.c \
eb480a0b 509 ..\perly.c \
510 ..\pp.c \
511 ..\pp_ctl.c \
512 ..\pp_hot.c \
513 ..\pp_sys.c \
514 ..\regcomp.c \
515 ..\regexec.c \
516 ..\run.c \
517 ..\scope.c \
518 ..\sv.c \
519 ..\taint.c \
520 ..\toke.c \
521 ..\universal.c \
a176fa2a 522 ..\utf8.c \
349fd7b7 523 ..\util.c \
524 ..\xsutils.c
eb480a0b 525
0cb96387 526EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
527
eb480a0b 528!IF "$(PERL_MALLOC)" == "define"
852c2e52 529EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
eb480a0b 530!ENDIF
531
c5be433b 532!IF "$(USE_OBJECT)" != "define"
852c2e52 533EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
eb480a0b 534!ENDIF
535
536WIN32_SRC = \
537 .\win32.c \
c44d3fdb 538 .\win32sck.c \
0e06870b 539 .\win32thread.c
eb480a0b 540
8d9b2e3c 541!IF "$(CRYPT_SRC)" != ""
542WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
543!ENDIF
544
eb480a0b 545DLL_SRC = $(DYNALOADER).c
546
eb480a0b 547X2P_SRC = \
548 ..\x2p\a2p.c \
549 ..\x2p\hash.c \
550 ..\x2p\str.c \
551 ..\x2p\util.c \
552 ..\x2p\walk.c
553
852c2e52 554CORE_NOCFG_H = \
eb480a0b 555 ..\av.h \
eb480a0b 556 ..\cop.h \
557 ..\cv.h \
558 ..\dosish.h \
559 ..\embed.h \
560 ..\form.h \
561 ..\gv.h \
562 ..\handy.h \
563 ..\hv.h \
0f4eea8f 564 ..\iperlsys.h \
eb480a0b 565 ..\mg.h \
566 ..\nostdio.h \
567 ..\op.h \
568 ..\opcode.h \
569 ..\perl.h \
51371543 570 ..\perlapi.h \
eb480a0b 571 ..\perlsdio.h \
572 ..\perlsfio.h \
573 ..\perly.h \
574 ..\pp.h \
575 ..\proto.h \
576 ..\regexp.h \
577 ..\scope.h \
578 ..\sv.h \
579 ..\thread.h \
580 ..\unixish.h \
a176fa2a 581 ..\utf8.h \
eb480a0b 582 ..\util.h \
2985053f 583 ..\warnings.h \
eb480a0b 584 ..\XSUB.h \
eb480a0b 585 ..\EXTERN.h \
586 ..\perlvars.h \
587 ..\intrpvar.h \
588 ..\thrdvar.h \
589 .\include\dirent.h \
590 .\include\netdb.h \
591 .\include\sys\socket.h \
f8fb7c90 592 .\win32.h
eb480a0b 593
852c2e52 594CORE_H = $(CORE_NOCFG_H) .\config.h
595
596MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
597CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
eb480a0b 598WIN32_OBJ = $(WIN32_SRC:.c=.obj)
852c2e52 599MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
600 $(MINIDIR)\miniperlmain$(o) \
601 $(MINIDIR)\perlio$(o)
eb480a0b 602MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
603MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
eb480a0b 604DLL_OBJ = $(DLL_SRC:.c=.obj)
605X2P_OBJ = $(X2P_SRC:.c=.obj)
606
eb480a0b 607PERLDLL_OBJ = $(CORE_OBJ)
608PERLEXE_OBJ = perlmain$(o)
609
eb480a0b 610PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
0cb96387 611#PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
eb480a0b 612
baed7233 613!IF "$(USE_SETARGV)" != ""
614SETARGV_OBJ = setargv$(o)
615!ENDIF
616
823edd99 617DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
f91101c9 618 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
0e06870b 619 Sys/Hostname Storable Filter/Util/Call Encode
eb480a0b 620STATIC_EXT = DynaLoader
eab60bb1 621NONXS_EXT = Errno
eb480a0b 622
623DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
624SOCKET = $(EXTDIR)\Socket\Socket
625FCNTL = $(EXTDIR)\Fcntl\Fcntl
626OPCODE = $(EXTDIR)\Opcode\Opcode
627SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
628IO = $(EXTDIR)\IO\IO
629POSIX = $(EXTDIR)\POSIX\POSIX
630ATTRS = $(EXTDIR)\attrs\attrs
631THREAD = $(EXTDIR)\Thread\Thread
632B = $(EXTDIR)\B\B
823edd99 633RE = $(EXTDIR)\re\re
634DUMPER = $(EXTDIR)\Data\Dumper\Dumper
eab60bb1 635ERRNO = $(EXTDIR)\Errno\Errno
3967c732 636PEEK = $(EXTDIR)\Devel\Peek\Peek
a6c40364 637BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
38b3a85b 638DPROF = $(EXTDIR)\Devel\DProf\DProf
4f49e16e 639GLOB = $(EXTDIR)\File\Glob\Glob
f91101c9 640HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
22d4bb9c 641STORABLE = $(EXTDIR)\Storable\Storable
0e06870b 642FILTER = $(EXTDIR)\Filter\Util\Call\Call
643ENCODE = $(EXTDIR)\Encode\Encode
eb480a0b 644
645SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
646FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
647OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
648SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
649IO_DLL = $(AUTODIR)\IO\IO.dll
650POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
651ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
652THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
653B_DLL = $(AUTODIR)\B\B.dll
823edd99 654DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
3967c732 655PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
15e52e56 656RE_DLL = $(AUTODIR)\re\re.dll
b295d113 657BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
38b3a85b 658DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
4f49e16e 659GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
f91101c9 660HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
22d4bb9c 661STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
0e06870b 662FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
663ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
eb480a0b 664
eab60bb1 665ERRNO_PM = $(LIBDIR)\Errno.pm
666
eb480a0b 667EXTENSION_C = \
668 $(SOCKET).c \
669 $(FCNTL).c \
670 $(OPCODE).c \
671 $(SDBM_FILE).c \
672 $(IO).c \
673 $(POSIX).c \
674 $(ATTRS).c \
675 $(THREAD).c \
15e52e56 676 $(RE).c \
823edd99 677 $(DUMPER).c \
3967c732 678 $(PEEK).c \
b295d113 679 $(B).c \
38b3a85b 680 $(BYTELOADER).c \
4f49e16e 681 $(DPROF).c \
f91101c9 682 $(GLOB).c \
22d4bb9c 683 $(HOSTNAME).c \
0e06870b 684 $(STORABLE).c \
685 $(FILTER).c \
686 $(ENCODE).c
eb480a0b 687
688EXTENSION_DLL = \
689 $(SOCKET_DLL) \
690 $(FCNTL_DLL) \
691 $(OPCODE_DLL) \
692 $(SDBM_FILE_DLL)\
693 $(IO_DLL) \
694 $(POSIX_DLL) \
51aa15f3 695 $(ATTRS_DLL) \
823edd99 696 $(DUMPER_DLL) \
3967c732 697 $(PEEK_DLL) \
b295d113 698 $(B_DLL) \
c5be433b 699 $(RE_DLL) \
700 $(THREAD_DLL) \
38b3a85b 701 $(BYTELOADER_DLL) \
4f49e16e 702 $(DPROF_DLL) \
f91101c9 703 $(GLOB_DLL) \
22d4bb9c 704 $(HOSTNAME_DLL) \
0e06870b 705 $(STORABLE_DLL) \
706 $(FILTER_DLL) \
707 $(ENCODE_DLL)
26ca90b6 708
eab60bb1 709EXTENSION_PM = \
710 $(ERRNO_PM)
711
eb480a0b 712POD2HTML = $(PODDIR)\pod2html
713POD2MAN = $(PODDIR)\pod2man
714POD2LATEX = $(PODDIR)\pod2latex
715POD2TEXT = $(PODDIR)\pod2text
716
717CFG_VARS = \
718 "INST_DRV=$(INST_DRV)" \
719 "INST_TOP=$(INST_TOP)" \
e5a95ffb 720 "INST_VER=$(INST_VER)" \
0cb96387 721 "INST_ARCH=$(INST_ARCH)" \
eb480a0b 722 "archname=$(ARCHNAME)" \
723 "cc=$(CC)" \
0e06870b 724 "ld=$(LINK32)" \
725 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
726 "cf_email=$(EMAIL)" \
eb480a0b 727 "d_crypt=$(D_CRYPT)" \
728 "d_mymalloc=$(PERL_MALLOC)" \
729 "libs=$(LIBFILES)" \
80252599 730 "incpath=$(CCINCDIR:"=\")" \
731 "libperl=$(PERLIMPLIB:..\=)" \
732 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
eb480a0b 733 "libc=$(LIBC)" \
734 "make=nmake" \
735 "static_ext=$(STATIC_EXT)" \
736 "dynamic_ext=$(DYNAMIC_EXT)" \
eab60bb1 737 "nonxs_ext=$(NONXS_EXT)" \
aaacdc8b 738 "use5005threads=$(USE_5005THREADS)" \
739 "useithreads=$(USE_ITHREADS)" \
740 "usethreads=$(USE_5005THREADS)" \
b86a2fa7 741 "usemultiplicity=$(USE_MULTI)" \
80252599 742 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
743 "optimize=$(OPTIMIZE:"=\")"
924b3ec4 744
137443ea 745#
746# Top targets
747#
0a753a76 748
9e5f57de 749all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
c5be433b 750 $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
0a753a76 751
d56e6723 752$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
0a753a76 753
137443ea 754#------------------------------------------------------------
0a753a76 755
eb480a0b 756$(GLOBEXE) : perlglob$(o)
dc050285 757 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
0e06870b 758 perlglob$(o) setargv$(o)
0a753a76 759
d56e6723 760perlglob$(o) : perlglob.c
137443ea 761
3e3baf6d 762config.w32 : $(CFGSH_TMPL)
763 copy $(CFGSH_TMPL) config.w32
764
d55594ae 765.\config.h : $(CFGH_TMPL)
3e3baf6d 766 -del /f config.h
767 copy $(CFGH_TMPL) config.h
768
137443ea 769..\config.sh : config.w32 $(MINIPERL) config_sh.PL
924b3ec4 770 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
137443ea 771
ac4c12e7 772# this target is for when changes to the main config.sh happen
773# edit config.{b,v,g}c and make this target once for each supported
0e06870b 774# compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
ac4c12e7 775regen_config_h:
776 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
777 cd ..
778 -del /f perl.exe
779 perl configpm
780 cd win32
781 -del /f $(CFGH_TMPL)
80252599 782 -mkdir $(COREDIR)
e5a95ffb 783 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
ac4c12e7 784 rename config.h $(CFGH_TMPL)
785
83437bec 786$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
0e06870b 787 cd ..
788 miniperl configpm
789 cd win32
c90c0ff4 790 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
d07c2202 791 $(XCOPY) ..\*.h $(COREDIR)\*.*
792 $(XCOPY) *.h $(COREDIR)\*.*
15e52e56 793 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
d07c2202 794 $(RCOPY) include $(COREDIR)\*.*
0e06870b 795 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
796 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
137443ea 797
eb480a0b 798$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
137443ea 799 $(LINK32) -subsystem:console -out:$@ @<<
eb480a0b 800 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
137443ea 801<<
802
eb480a0b 803$(MINIDIR) :
804 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
805
852c2e52 806$(MINICORE_OBJ) : $(CORE_NOCFG_H)
fe0bfefd 807 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
eb480a0b 808
852c2e52 809$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
eb480a0b 810 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
811
7766f137 812# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
f8fb7c90 813# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
7766f137 814!IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
f8fb7c90 815perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
7766f137 816 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
817!ENDIF
818
852c2e52 819# 1. we don't want to rebuild miniperl.exe when config.h changes
820# 2. we don't want to rebuild miniperl.exe with non-default config.h
821$(MINI_OBJ) : $(CORE_NOCFG_H)
822
eb480a0b 823$(WIN32_OBJ) : $(CORE_H)
824$(CORE_OBJ) : $(CORE_H)
eb480a0b 825$(DLL_OBJ) : $(CORE_H)
eb480a0b 826$(X2P_OBJ) : $(CORE_H)
0a753a76 827
549a6b10 828perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
829 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
910dfcc8 830 CCTYPE=$(CCTYPE) > perldll.def
0a753a76 831
fd9459bc 832$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
ee8c7f54 833 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
834 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
137443ea 835<<
d07c2202 836 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
137443ea 837
83437bec 838$(MINIMOD) : $(MINIPERL) ..\minimod.pl
0e06870b 839 cd ..
840 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
841 cd win32
83437bec 842
eb480a0b 843..\x2p\a2p$(o) : ..\x2p\a2p.c
844 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
845
846..\x2p\hash$(o) : ..\x2p\hash.c
847 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
848
849..\x2p\str$(o) : ..\x2p\str.c
850 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
851
852..\x2p\util$(o) : ..\x2p\util.c
853 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
854
855..\x2p\walk$(o) : ..\x2p\walk.c
856 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
857
858$(X2P) : $(MINIPERL) $(X2P_OBJ)
859 $(MINIPERL) ..\x2p\find2perl.PL
860 $(MINIPERL) ..\x2p\s2p.PL
d07c2202 861 $(LINK32) -subsystem:console -out:$@ @<<
eb480a0b 862 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
d07c2202 863<<
864
0e06870b 865perlmain.c : runperl.c
0a753a76 866 copy runperl.c perlmain.c
137443ea 867
d56e6723 868perlmain$(o) : perlmain.c
8957be0a 869 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
137443ea 870
fd9459bc 871$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
ee8c7f54 872 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
873 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
7766f137 874 copy $(PERLEXE) $(WPERLEXE)
2f8d1947 875 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
0e06870b 876 copy splittree.pl ..
eb480a0b 877 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
0a753a76 878
137443ea 879$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
eb480a0b 880 if not exist $(AUTODIR) mkdir $(AUTODIR)
a1dd9325 881 cd $(EXTDIR)\$(*B)
bfab39a2 882 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
8454a2ba 883 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
a1dd9325 884 cd ..\..\win32
68dc0745 885 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
8454a2ba 886 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
68dc0745 887 cd $(EXTDIR)\$(*B)
888 $(XSUBPP) dl_win32.xs > $(*B).c
0a753a76 889 cd ..\..\win32
890
68dc0745 891$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
892 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
0a753a76 893
823edd99 894$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
895 cd $(EXTDIR)\Data\$(*B)
896 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
897 $(MAKE)
898 cd ..\..\..\win32
899
38b3a85b 900$(DPROF_DLL): $(PERLEXE) $(DPROF).xs
901 cd $(EXTDIR)\Devel\$(*B)
902 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
903 $(MAKE)
904 cd ..\..\..\win32
905
4f49e16e 906$(GLOB_DLL): $(PERLEXE) $(GLOB).xs
907 cd $(EXTDIR)\File\$(*B)
908 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
909 $(MAKE)
910 cd ..\..\..\win32
911
3967c732 912$(PEEK_DLL): $(PERLEXE) $(PEEK).xs
913 cd $(EXTDIR)\Devel\$(*B)
914 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
915 $(MAKE)
916 cd ..\..\..\win32
917
15e52e56 918$(RE_DLL): $(PERLEXE) $(RE).xs
919 cd $(EXTDIR)\$(*B)
920 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
921 $(MAKE)
922 cd ..\..\win32
923
2a321948 924$(B_DLL): $(PERLEXE) $(B).xs
a98bd6f4 925 cd $(EXTDIR)\$(*B)
926 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
927 $(MAKE)
928 cd ..\..\win32
929
d55594ae 930$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
059e4e88 931 cd $(EXTDIR)\$(*B)
932 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
933 $(MAKE)
934 cd ..\..\win32
935
2a321948 936$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
937 cd $(EXTDIR)\$(*B)
938 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
939 $(MAKE)
940 cd ..\..\win32
d55594ae 941
6dead956 942$(POSIX_DLL): $(PERLEXE) $(POSIX).xs
943 cd $(EXTDIR)\$(*B)
944 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
945 $(MAKE)
946 cd ..\..\win32
947
eb480a0b 948$(IO_DLL): $(PERLEXE) $(IO).xs
68dc0745 949 cd $(EXTDIR)\$(*B)
137443ea 950 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
951 $(MAKE)
0a753a76 952 cd ..\..\win32
953
137443ea 954$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
68dc0745 955 cd $(EXTDIR)\$(*B)
137443ea 956 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
957 $(MAKE)
68dc0745 958 cd ..\..\win32
0a753a76 959
137443ea 960$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
68dc0745 961 cd $(EXTDIR)\$(*B)
137443ea 962 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
963 $(MAKE)
0a753a76 964 cd ..\..\win32
965
137443ea 966$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
68dc0745 967 cd $(EXTDIR)\$(*B)
137443ea 968 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
969 $(MAKE)
68dc0745 970 cd ..\..\win32
0a753a76 971
059e4e88 972$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
68dc0745 973 cd $(EXTDIR)\$(*B)
137443ea 974 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
975 $(MAKE)
0a753a76 976 cd ..\..\win32
977
f91101c9 978$(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs
979 cd $(EXTDIR)\Sys\$(*B)
980 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
981 $(MAKE)
982 cd ..\..\..\win32
983
b295d113 984$(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs
985 cd $(EXTDIR)\$(*B)
986 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
987 $(MAKE)
988 cd ..\..\win32
989
0e06870b 990$(ENCODE_DLL): $(PERLEXE) $(ENCODE).xs
991 cd $(EXTDIR)\$(*B)
992 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
993 $(MAKE)
994 cd ..\..\win32
995
22d4bb9c 996$(STORABLE_DLL): $(PERLEXE) $(STORABLE).xs
997 cd $(EXTDIR)\$(*B)
998 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
999 $(MAKE)
1000 cd ..\..\win32
1001
0e06870b 1002$(FILTER_DLL): $(PERLEXE) $(FILTER).xs
1003 cd $(EXTDIR)\Filter\Util\Call
1004 ..\..\..\..\miniperl -I..\..\..\..\lib Makefile.PL INSTALLDIRS=perl
1005 $(MAKE)
1006 cd ..\..\..\..\win32
1007
1008$(ENCODE_DLL): $(PERLEXE) $(ENCODE).xs
1009 cd $(EXTDIR)\$(*B)
1010 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1011 $(MAKE)
1012 cd ..\..\win32
1013
eab60bb1 1014$(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
1015 cd $(EXTDIR)\$(*B)
1016 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1017 $(MAKE)
1018 cd ..\..\win32
1019
68dc0745 1020doc: $(PERLEXE)
d07c2202 1021 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
b3b61bd8 1022 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
3e3baf6d 1023 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
68dc0745 1024
4a71ed0c 1025utils: $(PERLEXE) $(X2P)
3fe9a6f1 1026 cd ..\utils
eb480a0b 1027 $(MAKE) PERL=$(MINIPERL)
4a71ed0c 1028 cd ..\pod
ee8c7f54 1029 copy ..\README.amiga .\perlamiga.pod
1030 copy ..\README.cygwin .\perlcygwin.pod
1031 copy ..\README.dos .\perldos.pod
1032 copy ..\README.hpux .\perlhpux.pod
1033 copy ..\README.machten .\perlmachten.pod
1034 copy ..\README.os2 .\perlos2.pod
1035 copy ..\vms\perlvms.pod .\perlvms.pod
66aa1127 1036 copy ..\README.win32 .\perlwin32.pod
4a71ed0c 1037 $(MAKE) -f ..\win32\pod.mak converters
4b19af01 1038 cd ..\lib
1039 $(PERLEXE) lib_pm.PL
3fe9a6f1 1040 cd ..\win32
4a71ed0c 1041 $(PERLEXE) $(PL2BAT) $(UTILS)
3fe9a6f1 1042
137443ea 1043distclean: clean
9e5f57de 1044 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
83437bec 1045 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
3e3baf6d 1046 -del /f *.def *.map
eab60bb1 1047 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1048 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
eb480a0b 1049 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1050 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
8454a2ba 1051 -del /f $(LIBDIR)\XSLoader.pm
eb480a0b 1052 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1053 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1054 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
15e52e56 1055 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
b295d113 1056 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
38b3a85b 1057 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
4f49e16e 1058 -del /f $(LIBDIR)\File\Glob.pm
22d4bb9c 1059 -del /f $(LIBDIR)\Storable.pm
0e06870b 1060 -del /f $(LIBDIR)\Filter\Util\Call\Call.pm
1061 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1062 -rmdir /s $(LIBDIR)\IO
1063 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1064 -rmdir /s $(LIBDIR)\Thread
1065 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1066 -rmdir /s $(LIBDIR)\B
1067 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1068 -rmdir /s $(LIBDIR)\Data
1069 -if exist $(LIBDIR)\Filter\Util\Call rmdir /s /q $(LIBDIR)\Filter\Util\Call
1070 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
68dc0745 1071 -del /f $(PODDIR)\*.html
1072 -del /f $(PODDIR)\*.bat
eb480a0b 1073 cd ..\utils
5920a0ba 1074 -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc dprofpp
eb480a0b 1075 -del /f *.bat
1076 cd ..\win32
1077 cd ..\x2p
1078 -del /f find2perl s2p
1079 -del /f *.bat
1080 cd ..\win32
1081 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1082 -del /f $(CONFIGPM)
d444a431 1083 -del /f bin\*.bat
3e3baf6d 1084 cd $(EXTDIR)
22c35a8c 1085 -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
3e3baf6d 1086 cd ..\win32
0e06870b 1087 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1088 -rmdir /s $(AUTODIR)
1089 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1090 -rmdir /s $(COREDIR)
68dc0745 1091
4a71ed0c 1092install : all installbare installhtml
6dead956 1093
4a71ed0c 1094installbare : utils
d07c2202 1095 $(PERLEXE) ..\installperl
7766f137 1096 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
68dc0745 1097 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
e5a95ffb 1098 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
6dead956 1099
1100installhtml : doc
3e3baf6d 1101 $(RCOPY) html\*.* $(INST_HTML)\*.*
68dc0745 1102
137443ea 1103inst_lib : $(CONFIGPM)
0e06870b 1104 copy splittree.pl ..
eb480a0b 1105 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
c90c0ff4 1106 $(RCOPY) ..\lib $(INST_LIB)\*.*
0a753a76 1107
dfb634a9 1108minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
137443ea 1109 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1110 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1111 attrib -r ..\t\*.*
1112 copy test ..\t
1113 cd ..\t
1114 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1115 cd ..\win32
1116
dfb634a9 1117test-prep : all utils
68dc0745 1118 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1119 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1120 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
fb73857a 1121
1122test : test-prep
1123 cd ..\t
1124 $(PERLEXE) -I..\lib harness
1125 cd ..\win32
1126
1127test-notty : test-prep
1128 set PERL_SKIP_TTY_TEST=1
137443ea 1129 cd ..\t
1130 $(PERLEXE) -I..\lib harness
68dc0745 1131 cd ..\win32
137443ea 1132
2b32313b 1133test-wide : test-prep
1134 set HARNESS_PERL_SWITCHES=-C
1135 cd ..\t
1136 $(PERLEXE) -I..\lib harness
1137 cd ..\win32
1138
1139test-wide-notty : test-prep
1140 set PERL_SKIP_TTY_TEST=1
1141 set HARNESS_PERL_SWITCHES=-C
1142 cd ..\t
1143 $(PERLEXE) -I..\lib harness
1144 cd ..\win32
1145
0e06870b 1146clean :
1147 -@$(DEL) miniperlmain$(o)
1148 -@$(DEL) $(MINIPERL)
1149 -@$(DEL) perlglob$(o)
1150 -@$(DEL) perlmain$(o)
1151 -@$(DEL) config.w32
1152 -@$(DEL) /f config.h
1153 -@$(DEL) $(GLOBEXE)
1154 -@$(DEL) $(PERLEXE)
1155 -@$(DEL) $(WPERLEXE)
1156 -@$(DEL) $(PERLDLL)
1157 -@$(DEL) $(CORE_OBJ)
1158 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1159 -rmdir /s $(MINIDIR)
1160 -@$(DEL) $(WIN32_OBJ)
1161 -@$(DEL) $(DLL_OBJ)
1162 -@$(DEL) $(X2P_OBJ)
1163 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1164 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1165 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1166 -@$(DEL) *.ilk
1167 -@$(DEL) *.pdb
1168
22d4bb9c 1169# Handy way to run perlbug -ok without having to install and run the
1170# installed perlbug. We don't re-run the tests here - we trust the user.
1171# Please *don't* use this unless all tests pass.
1172# If you want to report test failures, use "nmake nok" instead.
1173ok: utils
1174 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1175
1176okfile: utils
1177 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
0e06870b 1178
22d4bb9c 1179nok: utils
1180 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
0e06870b 1181
22d4bb9c 1182nokfile: utils
1183 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok