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