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