This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[5.004_71] Patch: Fix perl_exp.SH for Unixware
[perl5.git] / win32 / makefile.mk
CommitLineData
08aa1457 1#
e7083a8c 2# Makefile to build perl on Windows NT using DMAKE.
d56e6723
GS
3# Supported compilers:
4# Visual C++ 2.0 thro 5.0
5# Borland C++ 5.02
e7083a8c 6# Mingw32 with gcc-2.8.1 or egcs-1.0.2
08aa1457
PP
7#
8# This is set up to build a perl.exe that runs off a shared library
9# (perl.dll). Also makes individual DLLs for the XS extensions.
10#
11
e7083a8c
DL
12##
13## Build configuration. Edit the values below to suit your needs.
14##
15
08aa1457
PP
16#
17# Set these to wherever you want "nmake install" to put your
18# newly built perl.
e7083a8c 19#
d56e6723 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#
823edd99 32INST_VER *= \5.00471
d56e6723
GS
33
34#
d07c2202 35# uncomment to enable threads-capabilities
e7083a8c 36#
07ba5892 37#USE_THREADS *= define
08aa1457
PP
38
39#
d56e6723 40# uncomment one
e7083a8c 41#
d56e6723
GS
42#CCTYPE *= MSVC20
43#CCTYPE *= MSVC
4a52a3da
GS
44CCTYPE *= BORLAND
45#CCTYPE *= GCC
08aa1457
PP
46
47#
8f818fa0 48# uncomment next line if you want to use the perl object
26ca90b6 49# Currently, this cannot be enabled if you ask for threads above
e7083a8c 50#
26ca90b6 51#OBJECT *= -DPERL_OBJECT
8f818fa0
GS
52
53#
08aa1457 54# uncomment next line if you want debug version of perl (big,slow)
e7083a8c 55#
d56e6723 56#CFG *= Debug
08aa1457
PP
57
58#
e7083a8c
DL
59# uncomment to enable use of PerlCRT.DLL. Highly recommended. It has
60# patches that fix known bugs in MSCVRT.DLL. You will need to download it
61# from: <TBD> and follow the directions in the package to install.
62#
63#USE_PERLCRT *= define
64
65#
26618a56 66# if you have the source for des_fcrypt(), uncomment this and make sure the
a1dd9325
GS
67# file exists (see README.win32). File should be located at the perl
68# top level directory.
e7083a8c 69#
26618a56
GS
70#CRYPT_SRC *= des_fcrypt.c
71
72#
73# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
74# library, uncomment this, and make sure the library exists (see README.win32)
a1dd9325 75# Specify the full pathname of the library.
e7083a8c 76#
26618a56
GS
77#CRYPT_LIB *= des_fcrypt.lib
78
79#
1c1c7f20
GS
80# set this if you wish to use perl's malloc
81# WARNING: Turning this on/off WILL break binary compatibility with extensions
5fd76c3e
GS
82# you may have compiled with/without it. Be prepared to recompile all
83# extensions if you change the default. Currently, this cannot be enabled
84# if you ask for PERL_OBJECT above.
e7083a8c 85#
ac4c12e7 86#PERL_MALLOC *= define
1c1c7f20
GS
87
88#
08aa1457 89# set the install locations of the compiler include/libraries
eb480a0b 90#
d56e6723 91#CCHOME *= f:\msdev\vc
4a52a3da
GS
92CCHOME *= C:\bc5
93#CCHOME *= D:\packages\mingw32
d56e6723
GS
94CCINCDIR *= $(CCHOME)\include
95CCLIBDIR *= $(CCHOME)\lib
08aa1457
PP
96
97#
fa4efe8e
GS
98# specify space-separated list of extra directories to look for libraries
99#
100EXTRALIBDIRS *=
101
102#
08aa1457
PP
103# set this to point to cmd.exe (only needed if you use some
104# alternate shell that doesn't grok cmd.exe style commands)
e7083a8c 105#
d56e6723 106#SHELL *= g:\winnt\system32\cmd.exe
08aa1457
PP
107
108#
109# set this to your email address (perl will guess a value from
110# from your loginname and your hostname, which may not be right)
e7083a8c 111#
eb480a0b 112#EMAIL *=
08aa1457 113
e7083a8c
DL
114##
115## Build configuration ends.
116##
117
08aa1457
PP
118##################### CHANGE THESE ONLY IF YOU MUST #####################
119
26618a56 120.IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
eb480a0b 121D_CRYPT = undef
26618a56 122.ELSE
eb480a0b
GS
123D_CRYPT = define
124CRYPT_FLAG = -DHAVE_DES_FCRYPT
26618a56
GS
125.ENDIF
126
eb480a0b
GS
127.IF "$(OBJECT)" != ""
128PERL_MALLOC != undef
1c1c7f20
GS
129.ENDIF
130
eb480a0b
GS
131PERL_MALLOC *= undef
132
133USE_THREADS *= undef
134
924b3ec4
GS
135#BUILDOPT *= -DMULTIPLICITY
136#BUILDOPT *= -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
d07c2202
GS
137# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
138
139.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
140
141PROCESSOR_ARCHITECTURE *= x86
142
924b3ec4 143.IF "$(USE_THREADS)" == "define"
d07c2202 144ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
924b3ec4
GS
145.ELSE
146ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
d07c2202
GS
147.ENDIF
148
149ARCHDIR = ..\lib\$(ARCHNAME)
150COREDIR = ..\lib\CORE
eb480a0b 151AUTODIR = ..\lib\auto
d07c2202 152
08aa1457
PP
153#
154# Programs to compile, build .lib files and link
155#
156
157.USESHELL :
158
159.IF "$(CCTYPE)" == "BORLAND"
160
eb480a0b
GS
161CC = bcc32
162LINK32 = tlink32
064a70d4 163LIB32 = tlib /P128
eb480a0b 164IMPLIB = implib -c
08aa1457
PP
165
166#
167# Options
168#
eb480a0b
GS
169RUNTIME = -D_RTLDLL
170INCLUDES = -I.\include -I. -I.. -I$(CCINCDIR)
171#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
172DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
173LOCDEFS = -DPERLDLL -DPERL_CORE
174SUBSYS = console
175CXX_FLAG = -P
08aa1457 176
eb480a0b
GS
177LIBC = cw32mti.lib
178LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib
08aa1457
PP
179
180.IF "$(CFG)" == "Debug"
eb480a0b
GS
181OPTIMIZE = -v $(RUNTIME) -DDEBUGGING
182LINK_DBG = -v
08aa1457 183.ELSE
6a6688c3 184OPTIMIZE = -O2 $(RUNTIME)
eb480a0b 185LINK_DBG =
08aa1457
PP
186.ENDIF
187
eb480a0b
GS
188CFLAGS = -w -d -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
189 $(PCHFLAGS) $(OPTIMIZE)
fa4efe8e 190LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
eb480a0b
GS
191OBJOUT_FLAG = -o
192EXEOUT_FLAG = -e
064a70d4 193LIBOUT_FLAG =
d56e6723
GS
194
195.ELIF "$(CCTYPE)" == "GCC"
196
3b657871
GS
197CC = gcc
198LINK32 = gcc
064a70d4 199LIB32 = ar rc
eb480a0b 200IMPLIB = dlltool
d56e6723
GS
201
202o = .o
eda5ff31 203a = .a
d56e6723
GS
204
205#
206# Options
207#
eb480a0b
GS
208RUNTIME =
209INCLUDES = -I.\include -I. -I..
210DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
211LOCDEFS = -DPERLDLL -DPERL_CORE
212SUBSYS = console
213CXX_FLAG = -xc++
d56e6723 214
eb480a0b
GS
215LIBC = -lcrtdll
216LIBFILES = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 -lmingw32 \
217 -lgcc -lmoldname $(LIBC) -lkernel32
d56e6723
GS
218
219.IF "$(CFG)" == "Debug"
eb480a0b
GS
220OPTIMIZE = -g -O2 $(RUNTIME) -DDEBUGGING
221LINK_DBG = -g
d56e6723 222.ELSE
eb480a0b
GS
223OPTIMIZE = -g -O2 $(RUNTIME)
224LINK_DBG =
d56e6723
GS
225.ENDIF
226
eb480a0b 227CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
fa4efe8e 228LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
eb480a0b
GS
229OBJOUT_FLAG = -o
230EXEOUT_FLAG = -o
064a70d4 231LIBOUT_FLAG =
08aa1457
PP
232
233.ELSE
234
eb480a0b
GS
235CC = cl.exe
236LINK32 = link.exe
237LIB32 = $(LINK32) -lib
238
08aa1457
PP
239#
240# Options
241#
eb480a0b 242
af883608 243RUNTIME = -MD
eb480a0b
GS
244INCLUDES = -I.\include -I. -I..
245#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
246DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG)
247LOCDEFS = -DPERLDLL -DPERL_CORE
248SUBSYS = console
249CXX_FLAG = -TP -GX
08aa1457 250
e7083a8c
DL
251.IF "$(USE_PERLCRT)" == ""
252.IF "$(CFG)" == "Debug"
253PERLCRTLIBC = msvcrtd.lib
254.ELSE
255PERLCRTLIBC = msvcrt.lib
256.ENDIF
257.ELSE
258.IF "$(CFG)" == "Debug"
259PERLCRTLIBC = PerlCRTD.lib
260.ELSE
261PERLCRTLIBC = PerlCRT.lib
262.ENDIF
263.ENDIF
264
08aa1457 265.IF "$(RUNTIME)" == "-MD"
e7083a8c 266LIBC = $(PERLCRTLIBC)
08aa1457 267.ELSE
eb480a0b 268LIBC = libcmt.lib
08aa1457
PP
269.ENDIF
270
271.IF "$(CFG)" == "Debug"
272.IF "$(CCTYPE)" == "MSVC20"
eb480a0b 273OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING
08aa1457 274.ELSE
3dfd1da1 275OPTIMIZE = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING
08aa1457 276.ENDIF
eb480a0b 277LINK_DBG = -debug -pdb:none
08aa1457
PP
278.ELSE
279.IF "$(CCTYPE)" == "MSVC20"
af883608 280OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
08aa1457 281.ELSE
af883608 282OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
08aa1457 283.ENDIF
eb480a0b 284LINK_DBG = -release
08aa1457
PP
285.ENDIF
286
e7083a8c 287LIBBASEFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \
eb480a0b
GS
288 winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
289 oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
290 version.lib odbc32.lib odbccp32.lib
08aa1457 291
e7083a8c
DL
292# we add LIBC here, since we may be using PerlCRT.dll
293LIBFILES = $(LIBBASEFILES) $(LIBC)
294
eb480a0b
GS
295CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
296 $(PCHFLAGS) $(OPTIMIZE)
e7083a8c 297LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
eb480a0b
GS
298OBJOUT_FLAG = -Fo
299EXEOUT_FLAG = -Fe
064a70d4 300LIBOUT_FLAG = /out:
08aa1457
PP
301
302.ENDIF
303
eb480a0b
GS
304.IF "$(OBJECT)" != ""
305OPTIMIZE += $(CXX_FLAG)
306.ENDIF
307
308CFLAGS_O = $(CFLAGS) $(OBJECT)
309
08aa1457
PP
310#################### do not edit below this line #######################
311############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
312
d56e6723 313o *= .obj
eda5ff31 314a *= .lib
d56e6723 315
eb480a0b
GS
316LKPRE = INPUT (
317LKPOST = )
318
08aa1457
PP
319#
320# Rules
321#
08aa1457 322
eda5ff31 323.SUFFIXES : .c $(o) .dll $(a) .exe
d56e6723
GS
324
325.c$(o):
eb480a0b 326 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
d07c2202
GS
327
328.y.c:
329 $(NOOP)
08aa1457 330
d56e6723 331$(o).dll:
08aa1457 332.IF "$(CCTYPE)" == "BORLAND"
d56e6723 333 $(LINK32) -Tpd -ap $(LINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
08aa1457 334 $(IMPLIB) $(*B).lib $@
d56e6723
GS
335.ELIF "$(CCTYPE)" == "GCC"
336 $(LINK32) -o $@ $(LINK_FLAGS) $< $(LIBFILES)
eda5ff31 337 $(IMPLIB) -def $(*B).def $(*B).a $@
08aa1457 338.ELSE
08aa1457 339 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
dc050285 340 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
08aa1457
PP
341.ENDIF
342
343#
e5a95ffb
GS
344INST_BIN = $(INST_TOP)$(INST_VER)\bin\$(ARCHNAME)
345INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
346INST_LIB = $(INST_TOP)$(INST_VER)\lib
eb480a0b
GS
347INST_POD = $(INST_LIB)\pod
348INST_HTML = $(INST_POD)\html
349LIBDIR = ..\lib
350EXTDIR = ..\ext
351PODDIR = ..\pod
352EXTUTILSDIR = $(LIBDIR)\extutils
08aa1457
PP
353
354#
355# various targets
eb480a0b
GS
356MINIPERL = ..\miniperl.exe
357MINIDIR = .\mini
358PERLEXE = ..\perl.exe
359GLOBEXE = ..\perlglob.exe
360CONFIGPM = ..\lib\Config.pm
361MINIMOD = ..\lib\ExtUtils\Miniperl.pm
362X2P = ..\x2p\a2p.exe
363
364PL2BAT = bin\pl2bat.pl
365GLOBBAT = bin\perlglob.bat
08aa1457 366
4a71ed0c
GS
367UTILS = \
368 ..\utils\h2ph \
369 ..\utils\splain \
370 ..\utils\perlbug \
371 ..\utils\pl2pm \
372 ..\utils\c2ph \
373 ..\utils\h2xs \
374 ..\utils\perldoc \
375 ..\utils\pstruct \
376 ..\utils\perlcc \
377 ..\pod\checkpods \
378 ..\pod\pod2html \
379 ..\pod\pod2latex \
380 ..\pod\pod2man \
381 ..\pod\pod2text \
382 ..\x2p\find2perl \
383 ..\x2p\s2p \
384 bin\www.pl \
385 bin\runperl.pl \
386 bin\pl2bat.pl \
387 bin\perlglob.pl \
388 bin\search.pl
389
08aa1457
PP
390.IF "$(CCTYPE)" == "BORLAND"
391
eb480a0b
GS
392CFGSH_TMPL = config.bc
393CFGH_TMPL = config_H.bc
d56e6723
GS
394
395.ELIF "$(CCTYPE)" == "GCC"
396
eb480a0b
GS
397CFGSH_TMPL = config.gc
398CFGH_TMPL = config_H.gc
eda5ff31 399PERLIMPLIB *= ..\libperl$(a)
08aa1457
PP
400
401.ELSE
402
eb480a0b
GS
403CFGSH_TMPL = config.vc
404CFGH_TMPL = config_H.vc
e7083a8c 405.IF "$(USE_PERLCRT)" == ""
eb480a0b 406PERL95EXE = ..\perl95.exe
e7083a8c 407.ENDIF
08aa1457
PP
408
409.ENDIF
410
eda5ff31
GS
411.IF "$(OBJECT)" == "-DPERL_OBJECT"
412PERLIMPLIB *= ..\perlcore$(a)
413PERLDLL = ..\perlcore.dll
414CAPILIB = $(COREDIR)\PerlCAPI$(a)
415.ELSE
416PERLIMPLIB *= ..\perl$(a)
417PERLDLL = ..\perl.dll
418CAPILIB =
419.ENDIF
420
eb480a0b
GS
421XCOPY = xcopy /f /r /i /d
422RCOPY = xcopy /f /r /i /e /d
423NOOP = @echo
08aa1457 424
eb480a0b
GS
425#
426# filenames given to xsubpp must have forward slashes (since it puts
427# full pathnames in #line strings)
428XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
429 -C++ -prototypes
430
852c2e52 431MICROCORE_SRC = \
eb480a0b
GS
432 ..\av.c \
433 ..\byterun.c \
434 ..\deb.c \
435 ..\doio.c \
436 ..\doop.c \
437 ..\dump.c \
438 ..\globals.c \
439 ..\gv.c \
440 ..\hv.c \
441 ..\mg.c \
442 ..\op.c \
443 ..\perl.c \
444 ..\perly.c \
445 ..\pp.c \
446 ..\pp_ctl.c \
447 ..\pp_hot.c \
448 ..\pp_sys.c \
449 ..\regcomp.c \
450 ..\regexec.c \
451 ..\run.c \
452 ..\scope.c \
453 ..\sv.c \
454 ..\taint.c \
455 ..\toke.c \
456 ..\universal.c \
457 ..\util.c
458
a1dd9325 459.IF "$(CRYPT_SRC)" != ""
852c2e52 460MICROCORE_SRC += ..\$(CRYPT_SRC)
a1dd9325 461.ENDIF
26618a56 462
1c1c7f20 463.IF "$(PERL_MALLOC)" == "define"
852c2e52 464EXTRACORE_SRC += ..\malloc.c
1c1c7f20
GS
465.ENDIF
466
eb480a0b 467.IF "$(OBJECT)" == ""
852c2e52 468EXTRACORE_SRC += ..\perlio.c
eb480a0b
GS
469.ENDIF
470
471WIN32_SRC = \
472 .\win32.c \
473 .\win32sck.c
474
475.IF "$(USE_THREADS)" == "define"
476WIN32_SRC += .\win32thread.c
477.ENDIF
478
479PERL95_SRC = \
480 perl95.c \
481 win32mt.c \
482 win32sckmt.c
483
a1dd9325
GS
484.IF "$(CRYPT_SRC)" != ""
485PERL95_SRC += ..\$(CRYPT_SRC)
486.ENDIF
487
eb480a0b
GS
488DLL_SRC = $(DYNALOADER).c
489
490
491.IF "$(OBJECT)" == ""
492DLL_SRC += perllib.c
493.ENDIF
494
495X2P_SRC = \
496 ..\x2p\a2p.c \
497 ..\x2p\hash.c \
498 ..\x2p\str.c \
499 ..\x2p\util.c \
500 ..\x2p\walk.c
501
852c2e52 502CORE_NOCFG_H = \
eb480a0b
GS
503 ..\av.h \
504 ..\byterun.h \
505 ..\bytecode.h \
506 ..\cop.h \
507 ..\cv.h \
508 ..\dosish.h \
509 ..\embed.h \
510 ..\form.h \
511 ..\gv.h \
512 ..\handy.h \
513 ..\hv.h \
0f4eea8f 514 ..\iperlsys.h \
eb480a0b
GS
515 ..\mg.h \
516 ..\nostdio.h \
517 ..\op.h \
518 ..\opcode.h \
519 ..\perl.h \
eb480a0b
GS
520 ..\perlsdio.h \
521 ..\perlsfio.h \
522 ..\perly.h \
523 ..\pp.h \
524 ..\proto.h \
525 ..\regexp.h \
526 ..\scope.h \
527 ..\sv.h \
528 ..\thread.h \
529 ..\unixish.h \
530 ..\util.h \
531 ..\XSUB.h \
eb480a0b
GS
532 ..\EXTERN.h \
533 ..\perlvars.h \
534 ..\intrpvar.h \
535 ..\thrdvar.h \
536 .\include\dirent.h \
537 .\include\netdb.h \
538 .\include\sys\socket.h \
539 .\win32.h
540
852c2e52
GS
541CORE_H = $(CORE_NOCFG_H) .\config.h
542
543MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
544CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
eb480a0b 545WIN32_OBJ = $(WIN32_SRC:db:+$(o))
5fd76c3e 546MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
eb480a0b
GS
547MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
548MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
af883608 549PERL95_OBJ = $(PERL95_SRC:db:+$(o))
eb480a0b
GS
550DLL_OBJ = $(DLL_SRC:db:+$(o))
551X2P_OBJ = $(X2P_SRC:db:+$(o))
552
eb480a0b
GS
553PERLDLL_OBJ = $(CORE_OBJ)
554PERLEXE_OBJ = perlmain$(o)
555
556.IF "$(OBJECT)" == ""
557PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
558.ELSE
559PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
af883608 560PERL95_OBJ += DynaLoadmt$(o)
eb480a0b
GS
561.ENDIF
562
823edd99
GS
563DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
564 Data/Dumper
eb480a0b 565STATIC_EXT = DynaLoader
eab60bb1 566NONXS_EXT = Errno
eb480a0b
GS
567
568DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
569SOCKET = $(EXTDIR)\Socket\Socket
570FCNTL = $(EXTDIR)\Fcntl\Fcntl
571OPCODE = $(EXTDIR)\Opcode\Opcode
572SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
573IO = $(EXTDIR)\IO\IO
574POSIX = $(EXTDIR)\POSIX\POSIX
575ATTRS = $(EXTDIR)\attrs\attrs
576THREAD = $(EXTDIR)\Thread\Thread
577B = $(EXTDIR)\B\B
15e52e56 578RE = $(EXTDIR)\re\re
823edd99 579DUMPER = $(EXTDIR)\Data\Dumper\Dumper
eab60bb1 580ERRNO = $(EXTDIR)\Errno\Errno
eb480a0b
GS
581
582SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
583FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
584OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
585SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
586IO_DLL = $(AUTODIR)\IO\IO.dll
587POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
588ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
589THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
590B_DLL = $(AUTODIR)\B\B.dll
823edd99 591DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
15e52e56 592RE_DLL = $(AUTODIR)\re\re.dll
eb480a0b 593
eab60bb1
GS
594ERRNO_PM = $(LIBDIR)\Errno.pm
595
ac4c12e7 596EXTENSION_C = \
eb480a0b
GS
597 $(SOCKET).c \
598 $(FCNTL).c \
599 $(OPCODE).c \
600 $(SDBM_FILE).c \
601 $(IO).c \
602 $(POSIX).c \
603 $(ATTRS).c \
604 $(THREAD).c \
15e52e56 605 $(RE).c \
823edd99 606 $(DUMPER).c \
eb480a0b
GS
607 $(B).c
608
ac4c12e7 609EXTENSION_DLL = \
eb480a0b
GS
610 $(SOCKET_DLL) \
611 $(FCNTL_DLL) \
612 $(OPCODE_DLL) \
613 $(SDBM_FILE_DLL)\
614 $(IO_DLL) \
615 $(POSIX_DLL) \
51aa15f3 616 $(ATTRS_DLL) \
823edd99 617 $(DUMPER_DLL) \
51aa15f3 618 $(B_DLL)
26ca90b6 619
eab60bb1
GS
620EXTENSION_PM = \
621 $(ERRNO_PM)
622
15e52e56 623# re.dll doesn't build with PERL_OBJECT yet
26ca90b6
GS
624.IF "$(OBJECT)" == ""
625EXTENSION_DLL += \
15e52e56
GS
626 $(THREAD_DLL) \
627 $(RE_DLL)
26ca90b6 628.ENDIF
eb480a0b
GS
629
630POD2HTML = $(PODDIR)\pod2html
631POD2MAN = $(PODDIR)\pod2man
632POD2LATEX = $(PODDIR)\pod2latex
633POD2TEXT = $(PODDIR)\pod2text
634
635CFG_VARS = \
636 "INST_DRV=$(INST_DRV)" \
637 "INST_TOP=$(INST_TOP)" \
e5a95ffb 638 "INST_VER=$(INST_VER)" \
eb480a0b
GS
639 "archname=$(ARCHNAME)" \
640 "cc=$(CC)" \
ac4c12e7 641 "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)" \
eb480a0b
GS
642 "cf_email=$(EMAIL)" \
643 "d_crypt=$(D_CRYPT)" \
644 "d_mymalloc=$(PERL_MALLOC)" \
645 "libs=$(LIBFILES:f)" \
646 "incpath=$(CCINCDIR)" \
eda5ff31 647 "libperl=$(PERLIMPLIB:f)" \
fa4efe8e 648 "libpth=$(strip $(CCLIBDIR) $(EXTRALIBDIRS) $(LIBFILES:d))" \
eb480a0b
GS
649 "libc=$(LIBC)" \
650 "make=dmake" \
eda5ff31
GS
651 "_o=$(o)" "obj_ext=$(o)" \
652 "_a=$(a)" "lib_ext=$(a)" \
eb480a0b
GS
653 "static_ext=$(STATIC_EXT)" \
654 "dynamic_ext=$(DYNAMIC_EXT)" \
eab60bb1 655 "nonxs_ext=$(NONXS_EXT)" \
eb480a0b
GS
656 "usethreads=$(USE_THREADS)" \
657 "LINK_FLAGS=$(LINK_FLAGS)" \
658 "optimize=$(OPTIMIZE)"
924b3ec4 659
08aa1457
PP
660#
661# Top targets
662#
663
852c2e52 664all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
eab60bb1 665 $(CAPILIB) $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
08aa1457 666
d56e6723 667$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
08aa1457
PP
668
669#------------------------------------------------------------
670
eb480a0b 671$(GLOBEXE) : perlglob$(o)
08aa1457
PP
672.IF "$(CCTYPE)" == "BORLAND"
673 $(CC) -c -w -v -tWM -I$(CCINCDIR) perlglob.c
d56e6723
GS
674 $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \
675 $(CCLIBDIR)\32BIT\wildargs$(o),$@,,import32.lib cw32mt.lib,
676.ELIF "$(CCTYPE)" == "GCC"
677 $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES)
08aa1457 678.ELSE
dc050285 679 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
d56e6723 680 perlglob$(o) setargv$(o)
08aa1457
PP
681.ENDIF
682
d56e6723 683perlglob$(o) : perlglob.c
08aa1457 684
08aa1457
PP
685config.w32 : $(CFGSH_TMPL)
686 copy $(CFGSH_TMPL) config.w32
687
852c2e52 688.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
08aa1457
PP
689 -del /f config.h
690 copy $(CFGH_TMPL) config.h
691
692..\config.sh : config.w32 $(MINIPERL) config_sh.PL
924b3ec4
GS
693 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
694
695# this target is for when changes to the main config.sh happen
696# edit config.{b,v,g}c and make this target once for each supported
697# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
698regen_config_h:
699 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
700 -cd .. && del /f perl.exe
701 cd .. && perl configpm
702 -del /f $(CFGH_TMPL)
703 -mkdir ..\lib\CORE
e5a95ffb 704 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
924b3ec4 705 rename config.h $(CFGH_TMPL)
08aa1457
PP
706
707$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
708 cd .. && miniperl configpm
709 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
d07c2202
GS
710 $(XCOPY) ..\*.h $(COREDIR)\*.*
711 $(XCOPY) *.h $(COREDIR)\*.*
15e52e56 712 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
d07c2202 713 $(RCOPY) include $(COREDIR)\*.*
e5a95ffb
GS
714 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
715 || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
08aa1457 716
eb480a0b 717$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
08aa1457
PP
718.IF "$(CCTYPE)" == "BORLAND"
719 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
eb480a0b 720 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
d56e6723
GS
721.ELIF "$(CCTYPE)" == "GCC"
722 $(LINK32) -v -o $@ $(LINK_FLAGS) \
eb480a0b 723 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
08aa1457
PP
724.ELSE
725 $(LINK32) -subsystem:console -out:$@ \
eb480a0b 726 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
08aa1457
PP
727.ENDIF
728
eb480a0b
GS
729$(MINIDIR) :
730 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
731
852c2e52 732$(MINICORE_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
733 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c
734
852c2e52 735$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
736 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
737
852c2e52
GS
738# 1. we don't want to rebuild miniperl.exe when config.h changes
739# 2. we don't want to rebuild miniperl.exe with non-default config.h
740$(MINI_OBJ) : $(CORE_NOCFG_H)
741
eb480a0b
GS
742$(WIN32_OBJ) : $(CORE_H)
743$(CORE_OBJ) : $(CORE_H)
eb480a0b
GS
744$(DLL_OBJ) : $(CORE_H)
745$(PERL95_OBJ) : $(CORE_H)
746$(X2P_OBJ) : $(CORE_H)
08aa1457 747
d55594ae 748perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
eb480a0b 749 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \
910dfcc8 750 CCTYPE=$(CCTYPE) > perldll.def
08aa1457 751
eb480a0b 752$(PERLDLL): perldll.def $(PERLDLL_OBJ)
08aa1457
PP
753.IF "$(CCTYPE)" == "BORLAND"
754 $(LINK32) -Tpd -ap $(LINK_FLAGS) \
eb480a0b 755 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
08aa1457
PP
756 $@,\n \
757 $(LIBFILES)\n \
758 perldll.def\n)
759 $(IMPLIB) $*.lib $@
d56e6723 760.ELIF "$(CCTYPE)" == "GCC"
3730b96e 761 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
eb480a0b 762 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
d56e6723
GS
763 dlltool --output-lib $(PERLIMPLIB) \
764 --dllname perl.dll \
765 --def perldll.def \
766 --base-file perl.base \
767 --output-exp perl.exp
3730b96e 768 $(LINK32) -mdll -o $@ $(LINK_FLAGS) \
eb480a0b
GS
769 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
770 perl.exp $(LKPOST))
08aa1457
PP
771.ELSE
772 $(LINK32) -dll -def:perldll.def -out:$@ \
eb480a0b 773 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\))
08aa1457 774.ENDIF
d07c2202 775 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
08aa1457
PP
776
777perl.def : $(MINIPERL) makeperldef.pl
778 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
779
780$(MINIMOD) : $(MINIPERL) ..\minimod.pl
781 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
782
eb480a0b
GS
783..\x2p\a2p$(o) : ..\x2p\a2p.c
784 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
785
786..\x2p\hash$(o) : ..\x2p\hash.c
787 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
788
789..\x2p\str$(o) : ..\x2p\str.c
790 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
791
792..\x2p\util$(o) : ..\x2p\util.c
793 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
794
795..\x2p\walk$(o) : ..\x2p\walk.c
796 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
797
798$(X2P) : $(MINIPERL) $(X2P_OBJ)
d07c2202
GS
799 $(MINIPERL) ..\x2p\find2perl.PL
800 $(MINIPERL) ..\x2p\s2p.PL
801.IF "$(CCTYPE)" == "BORLAND"
802 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
803 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
804.ELIF "$(CCTYPE)" == "GCC"
805 $(LINK32) -v -o $@ $(LINK_FLAGS) \
806 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
807.ELSE
808 $(LINK32) -subsystem:console -out:$@ \
422938c9 809 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
d07c2202
GS
810.ENDIF
811
08aa1457
PP
812perlmain.c : runperl.c
813 copy runperl.c perlmain.c
814
d56e6723 815perlmain$(o) : perlmain.c
8957be0a 816 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
08aa1457 817
eb480a0b 818$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
08aa1457
PP
819.IF "$(CCTYPE)" == "BORLAND"
820 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
8957be0a
GS
821 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
822 $(@:s,\,\\),\n \
08aa1457 823 $(PERLIMPLIB) $(LIBFILES)\n)
d56e6723
GS
824.ELIF "$(CCTYPE)" == "GCC"
825 $(LINK32) -o $@ $(LINK_FLAGS) \
eb480a0b 826 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
08aa1457 827.ELSE
d56e6723 828 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
eb480a0b 829 $(PERLEXE_OBJ) $(PERLIMPLIB)
08aa1457
PP
830.ENDIF
831 copy splittree.pl ..
eb480a0b 832 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
833
834.IF "$(CCTYPE)" != "BORLAND"
d56e6723 835.IF "$(CCTYPE)" != "GCC"
e7083a8c 836.IF "$(USE_PERLCRT)" == ""
08aa1457
PP
837
838perl95.c : runperl.c
839 copy runperl.c perl95.c
840
d56e6723 841perl95$(o) : perl95.c
eb480a0b 842 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c
08aa1457 843
d56e6723 844win32sckmt$(o) : win32sck.c
eb480a0b
GS
845 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
846 $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
fb73857a 847
d56e6723 848win32mt$(o) : win32.c
eb480a0b
GS
849 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
850 $(OBJOUT_FLAG)win32mt$(o) win32.c
fb73857a 851
ac4c12e7
GS
852DynaLoadmt$(o) : $(DYNALOADER).c
853 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
854 $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c
fb73857a
PP
855
856$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
eb480a0b 857 $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
e7083a8c 858 $(LIBBASEFILES) $(PERL95_OBJ) $(PERLIMPLIB) libcmt.lib
08aa1457
PP
859
860.ENDIF
d56e6723 861.ENDIF
e7083a8c 862.ENDIF
08aa1457
PP
863
864$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
eb480a0b 865 if not exist $(AUTODIR) mkdir $(AUTODIR)
bfab39a2 866 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
08aa1457
PP
867 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
868 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
869 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
870
064a70d4
GS
871.IF "$(OBJECT)" == "-DPERL_OBJECT"
872
58a50f62
GS
873PerlCAPI.cpp : $(MINIPERL)
874 $(MINIPERL) GenCAPI.pl $(COREDIR)
875
876PerlCAPI$(o) : PerlCAPI.cpp
064a70d4
GS
877.IF "$(CCTYPE)" == "BORLAND"
878 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
879.ELIF "$(CCTYPE)" == "GCC"
880 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
881.ELSE
d17537aa 882 $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \
58a50f62 883 $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
064a70d4 884.ENDIF
58a50f62
GS
885
886$(CAPILIB) : PerlCAPI.cpp PerlCAPI$(o)
064a70d4
GS
887.IF "$(CCTYPE)" == "BORLAND"
888 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +PerlCAPI$(o)
889.ELSE
890 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) PerlCAPI$(o)
891.ENDIF
892
893.ENDIF
58a50f62 894
08aa1457
PP
895$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
896 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
897
823edd99
GS
898$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
899 cd $(EXTDIR)\Data\$(*B) && \
900 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
901 cd $(EXTDIR)\Data\$(*B) && $(MAKE)
902
15e52e56
GS
903$(RE_DLL): $(PERLEXE) $(RE).xs
904 cd $(EXTDIR)\$(*B) && \
905 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
906 cd $(EXTDIR)\$(*B) && $(MAKE)
907
2a321948
GS
908$(B_DLL): $(PERLEXE) $(B).xs
909 cd $(EXTDIR)\$(*B) && \
910 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
911 cd $(EXTDIR)\$(*B) && $(MAKE)
912
a98bd6f4
GS
913$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
914 cd $(EXTDIR)\$(*B) && \
915 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
916 cd $(EXTDIR)\$(*B) && $(MAKE)
917
5d925967
GS
918$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
919 cd $(EXTDIR)\$(*B) && \
920 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
921 cd $(EXTDIR)\$(*B) && $(MAKE)
922
6dead956
GS
923$(POSIX_DLL): $(PERLEXE) $(POSIX).xs
924 cd $(EXTDIR)\$(*B) && \
925 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
926 cd $(EXTDIR)\$(*B) && $(MAKE)
927
5d925967 928$(IO_DLL): $(PERLEXE) $(IO).xs
08aa1457
PP
929 cd $(EXTDIR)\$(*B) && \
930 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
931 cd $(EXTDIR)\$(*B) && $(MAKE)
932
933$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
934 cd $(EXTDIR)\$(*B) && \
935 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
936 cd $(EXTDIR)\$(*B) && $(MAKE)
937
938$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
939 cd $(EXTDIR)\$(*B) && \
940 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
941 cd $(EXTDIR)\$(*B) && $(MAKE)
942
943$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
944 cd $(EXTDIR)\$(*B) && \
945 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
946 cd $(EXTDIR)\$(*B) && $(MAKE)
947
5d925967 948$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
08aa1457
PP
949 cd $(EXTDIR)\$(*B) && \
950 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
951 cd $(EXTDIR)\$(*B) && $(MAKE)
952
eab60bb1
GS
953$(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
954 cd $(EXTDIR)\$(*B) && \
955 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
956 cd $(EXTDIR)\$(*B) && $(MAKE)
957
08aa1457
PP
958doc: $(PERLEXE)
959 copy ..\README.win32 ..\pod\perlwin32.pod
d07c2202 960 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
b3b61bd8 961 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
08aa1457
PP
962 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
963
4a71ed0c 964utils: $(PERLEXE) $(X2P)
08aa1457 965 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
4a71ed0c
GS
966 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
967 $(PERLEXE) $(PL2BAT) $(UTILS)
08aa1457
PP
968
969distclean: clean
dc050285 970 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
eda5ff31 971 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
08aa1457 972 -del /f *.def *.map
eab60bb1
GS
973 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
974 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
eb480a0b
GS
975 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
976 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
977 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
978 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
979 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
15e52e56 980 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
823edd99 981 -del /f $(LIBDIR)\Data\Dumper.pm
eb480a0b
GS
982 -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
983 -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
984 -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
823edd99 985 -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
08aa1457
PP
986 -del /f $(PODDIR)\*.html
987 -del /f $(PODDIR)\*.bat
eb480a0b
GS
988 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct *.bat
989 -cd ..\x2p && del /f find2perl s2p *.bat
d444a431 990 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
eb480a0b 991 -del /f $(CONFIGPM)
d444a431
TB
992.IF "$(PERL95EXE)" != ""
993 -del /f perl95.c
994.ENDIF
995 -del /f bin\*.bat
eda5ff31 996 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.bs Makefile *$(o) pm_to_blib
eb480a0b 997 -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
d07c2202 998 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
08aa1457 999
4a71ed0c 1000install : all installbare installhtml
6dead956 1001
4a71ed0c 1002installbare : utils
d07c2202 1003 $(PERLEXE) ..\installperl
08aa1457
PP
1004.IF "$(PERL95EXE)" != ""
1005 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
1006.ENDIF
1007 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
e5a95ffb 1008 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
4a71ed0c 1009 $(XCOPY) bin\network.pl $(INST_LIB)\*.*
6dead956
GS
1010
1011installhtml : doc
08aa1457
PP
1012 $(RCOPY) html\*.* $(INST_HTML)\*.*
1013
1014inst_lib : $(CONFIGPM)
1015 copy splittree.pl ..
eb480a0b 1016 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
1017 $(RCOPY) ..\lib $(INST_LIB)\*.*
1018
dfb634a9 1019minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
08aa1457
PP
1020 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1021.IF "$(CCTYPE)" == "BORLAND"
1022 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1023.ELSE
1024 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1025.ENDIF
1026 attrib -r ..\t\*.*
1027 copy test ..\t
1028 cd ..\t && \
1029 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1030
dfb634a9 1031test-prep : all utils
08aa1457
PP
1032 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1033 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1034.IF "$(CCTYPE)" == "BORLAND"
1035 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1036.ELSE
1037 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1038.ENDIF
32f822de
GS
1039
1040test : test-prep
08aa1457
PP
1041 cd ..\t && $(PERLEXE) -I..\lib harness
1042
32f822de
GS
1043test-notty : test-prep
1044 set PERL_SKIP_TTY_TEST=1 && \
1045 cd ..\t && $(PERLEXE) -I.\lib harness
1046
08aa1457 1047clean :
d56e6723 1048 -@erase miniperlmain$(o)
08aa1457 1049 -@erase $(MINIPERL)
d56e6723
GS
1050 -@erase perlglob$(o)
1051 -@erase perlmain$(o)
51aa15f3 1052 -@erase PerlCAPI.cpp
08aa1457
PP
1053 -@erase config.w32
1054 -@erase /f config.h
1055 -@erase $(GLOBEXE)
1056 -@erase $(PERLEXE)
1057 -@erase $(PERLDLL)
1058 -@erase $(CORE_OBJ)
eb480a0b 1059 -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
08aa1457
PP
1060 -@erase $(WIN32_OBJ)
1061 -@erase $(DLL_OBJ)
d07c2202 1062 -@erase $(X2P_OBJ)
eda5ff31 1063 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp
d444a431 1064 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
d07c2202 1065 -@erase ..\x2p\*.exe ..\x2p\*.bat
08aa1457
PP
1066 -@erase *.ilk
1067 -@erase *.pdb