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