This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
UNOP opclass test in B.xs
[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#
0b2be3f5 32INST_VER *= \5.00470
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
15e52e56 563DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re
eb480a0b 564STATIC_EXT = DynaLoader
eab60bb1 565NONXS_EXT = Errno
eb480a0b
GS
566
567DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
568SOCKET = $(EXTDIR)\Socket\Socket
569FCNTL = $(EXTDIR)\Fcntl\Fcntl
570OPCODE = $(EXTDIR)\Opcode\Opcode
571SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
572IO = $(EXTDIR)\IO\IO
573POSIX = $(EXTDIR)\POSIX\POSIX
574ATTRS = $(EXTDIR)\attrs\attrs
575THREAD = $(EXTDIR)\Thread\Thread
576B = $(EXTDIR)\B\B
15e52e56 577RE = $(EXTDIR)\re\re
eab60bb1 578ERRNO = $(EXTDIR)\Errno\Errno
eb480a0b
GS
579
580SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
581FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
582OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
583SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
584IO_DLL = $(AUTODIR)\IO\IO.dll
585POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
586ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
587THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
588B_DLL = $(AUTODIR)\B\B.dll
15e52e56 589RE_DLL = $(AUTODIR)\re\re.dll
eb480a0b 590
eab60bb1
GS
591ERRNO_PM = $(LIBDIR)\Errno.pm
592
ac4c12e7 593EXTENSION_C = \
eb480a0b
GS
594 $(SOCKET).c \
595 $(FCNTL).c \
596 $(OPCODE).c \
597 $(SDBM_FILE).c \
598 $(IO).c \
599 $(POSIX).c \
600 $(ATTRS).c \
601 $(THREAD).c \
15e52e56 602 $(RE).c \
eb480a0b
GS
603 $(B).c
604
ac4c12e7 605EXTENSION_DLL = \
eb480a0b
GS
606 $(SOCKET_DLL) \
607 $(FCNTL_DLL) \
608 $(OPCODE_DLL) \
609 $(SDBM_FILE_DLL)\
610 $(IO_DLL) \
611 $(POSIX_DLL) \
51aa15f3
GS
612 $(ATTRS_DLL) \
613 $(B_DLL)
26ca90b6 614
eab60bb1
GS
615EXTENSION_PM = \
616 $(ERRNO_PM)
617
15e52e56 618# re.dll doesn't build with PERL_OBJECT yet
26ca90b6
GS
619.IF "$(OBJECT)" == ""
620EXTENSION_DLL += \
15e52e56
GS
621 $(THREAD_DLL) \
622 $(RE_DLL)
26ca90b6 623.ENDIF
eb480a0b
GS
624
625POD2HTML = $(PODDIR)\pod2html
626POD2MAN = $(PODDIR)\pod2man
627POD2LATEX = $(PODDIR)\pod2latex
628POD2TEXT = $(PODDIR)\pod2text
629
630CFG_VARS = \
631 "INST_DRV=$(INST_DRV)" \
632 "INST_TOP=$(INST_TOP)" \
e5a95ffb 633 "INST_VER=$(INST_VER)" \
eb480a0b
GS
634 "archname=$(ARCHNAME)" \
635 "cc=$(CC)" \
ac4c12e7 636 "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)" \
eb480a0b
GS
637 "cf_email=$(EMAIL)" \
638 "d_crypt=$(D_CRYPT)" \
639 "d_mymalloc=$(PERL_MALLOC)" \
640 "libs=$(LIBFILES:f)" \
641 "incpath=$(CCINCDIR)" \
eda5ff31 642 "libperl=$(PERLIMPLIB:f)" \
fa4efe8e 643 "libpth=$(strip $(CCLIBDIR) $(EXTRALIBDIRS) $(LIBFILES:d))" \
eb480a0b
GS
644 "libc=$(LIBC)" \
645 "make=dmake" \
eda5ff31
GS
646 "_o=$(o)" "obj_ext=$(o)" \
647 "_a=$(a)" "lib_ext=$(a)" \
eb480a0b
GS
648 "static_ext=$(STATIC_EXT)" \
649 "dynamic_ext=$(DYNAMIC_EXT)" \
eab60bb1 650 "nonxs_ext=$(NONXS_EXT)" \
eb480a0b
GS
651 "usethreads=$(USE_THREADS)" \
652 "LINK_FLAGS=$(LINK_FLAGS)" \
653 "optimize=$(OPTIMIZE)"
924b3ec4 654
08aa1457
PP
655#
656# Top targets
657#
658
852c2e52 659all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
eab60bb1 660 $(CAPILIB) $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
08aa1457 661
d56e6723 662$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
08aa1457
PP
663
664#------------------------------------------------------------
665
eb480a0b 666$(GLOBEXE) : perlglob$(o)
08aa1457
PP
667.IF "$(CCTYPE)" == "BORLAND"
668 $(CC) -c -w -v -tWM -I$(CCINCDIR) perlglob.c
d56e6723
GS
669 $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \
670 $(CCLIBDIR)\32BIT\wildargs$(o),$@,,import32.lib cw32mt.lib,
671.ELIF "$(CCTYPE)" == "GCC"
672 $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES)
08aa1457 673.ELSE
dc050285 674 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
d56e6723 675 perlglob$(o) setargv$(o)
08aa1457
PP
676.ENDIF
677
d56e6723 678perlglob$(o) : perlglob.c
08aa1457 679
08aa1457
PP
680config.w32 : $(CFGSH_TMPL)
681 copy $(CFGSH_TMPL) config.w32
682
852c2e52 683.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
08aa1457
PP
684 -del /f config.h
685 copy $(CFGH_TMPL) config.h
686
687..\config.sh : config.w32 $(MINIPERL) config_sh.PL
924b3ec4
GS
688 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
689
690# this target is for when changes to the main config.sh happen
691# edit config.{b,v,g}c and make this target once for each supported
692# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
693regen_config_h:
694 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
695 -cd .. && del /f perl.exe
696 cd .. && perl configpm
697 -del /f $(CFGH_TMPL)
698 -mkdir ..\lib\CORE
e5a95ffb 699 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
924b3ec4 700 rename config.h $(CFGH_TMPL)
08aa1457
PP
701
702$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
703 cd .. && miniperl configpm
704 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
d07c2202
GS
705 $(XCOPY) ..\*.h $(COREDIR)\*.*
706 $(XCOPY) *.h $(COREDIR)\*.*
15e52e56 707 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
d07c2202 708 $(RCOPY) include $(COREDIR)\*.*
e5a95ffb
GS
709 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
710 || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
08aa1457 711
eb480a0b 712$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
08aa1457
PP
713.IF "$(CCTYPE)" == "BORLAND"
714 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
eb480a0b 715 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
d56e6723
GS
716.ELIF "$(CCTYPE)" == "GCC"
717 $(LINK32) -v -o $@ $(LINK_FLAGS) \
eb480a0b 718 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
08aa1457
PP
719.ELSE
720 $(LINK32) -subsystem:console -out:$@ \
eb480a0b 721 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
08aa1457
PP
722.ENDIF
723
eb480a0b
GS
724$(MINIDIR) :
725 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
726
852c2e52 727$(MINICORE_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
728 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c
729
852c2e52 730$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
731 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
732
852c2e52
GS
733# 1. we don't want to rebuild miniperl.exe when config.h changes
734# 2. we don't want to rebuild miniperl.exe with non-default config.h
735$(MINI_OBJ) : $(CORE_NOCFG_H)
736
eb480a0b
GS
737$(WIN32_OBJ) : $(CORE_H)
738$(CORE_OBJ) : $(CORE_H)
eb480a0b
GS
739$(DLL_OBJ) : $(CORE_H)
740$(PERL95_OBJ) : $(CORE_H)
741$(X2P_OBJ) : $(CORE_H)
08aa1457 742
d55594ae 743perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
eb480a0b 744 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \
910dfcc8 745 CCTYPE=$(CCTYPE) > perldll.def
08aa1457 746
eb480a0b 747$(PERLDLL): perldll.def $(PERLDLL_OBJ)
08aa1457
PP
748.IF "$(CCTYPE)" == "BORLAND"
749 $(LINK32) -Tpd -ap $(LINK_FLAGS) \
eb480a0b 750 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
08aa1457
PP
751 $@,\n \
752 $(LIBFILES)\n \
753 perldll.def\n)
754 $(IMPLIB) $*.lib $@
d56e6723 755.ELIF "$(CCTYPE)" == "GCC"
3730b96e 756 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
eb480a0b 757 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
d56e6723
GS
758 dlltool --output-lib $(PERLIMPLIB) \
759 --dllname perl.dll \
760 --def perldll.def \
761 --base-file perl.base \
762 --output-exp perl.exp
3730b96e 763 $(LINK32) -mdll -o $@ $(LINK_FLAGS) \
eb480a0b
GS
764 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
765 perl.exp $(LKPOST))
08aa1457
PP
766.ELSE
767 $(LINK32) -dll -def:perldll.def -out:$@ \
eb480a0b 768 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\))
08aa1457 769.ENDIF
d07c2202 770 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
08aa1457
PP
771
772perl.def : $(MINIPERL) makeperldef.pl
773 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
774
775$(MINIMOD) : $(MINIPERL) ..\minimod.pl
776 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
777
eb480a0b
GS
778..\x2p\a2p$(o) : ..\x2p\a2p.c
779 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
780
781..\x2p\hash$(o) : ..\x2p\hash.c
782 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
783
784..\x2p\str$(o) : ..\x2p\str.c
785 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
786
787..\x2p\util$(o) : ..\x2p\util.c
788 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
789
790..\x2p\walk$(o) : ..\x2p\walk.c
791 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
792
793$(X2P) : $(MINIPERL) $(X2P_OBJ)
d07c2202
GS
794 $(MINIPERL) ..\x2p\find2perl.PL
795 $(MINIPERL) ..\x2p\s2p.PL
796.IF "$(CCTYPE)" == "BORLAND"
797 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
798 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
799.ELIF "$(CCTYPE)" == "GCC"
800 $(LINK32) -v -o $@ $(LINK_FLAGS) \
801 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
802.ELSE
803 $(LINK32) -subsystem:console -out:$@ \
422938c9 804 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
d07c2202
GS
805.ENDIF
806
08aa1457
PP
807perlmain.c : runperl.c
808 copy runperl.c perlmain.c
809
d56e6723 810perlmain$(o) : perlmain.c
8957be0a 811 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
08aa1457 812
eb480a0b 813$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
08aa1457
PP
814.IF "$(CCTYPE)" == "BORLAND"
815 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
8957be0a
GS
816 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
817 $(@:s,\,\\),\n \
08aa1457 818 $(PERLIMPLIB) $(LIBFILES)\n)
d56e6723
GS
819.ELIF "$(CCTYPE)" == "GCC"
820 $(LINK32) -o $@ $(LINK_FLAGS) \
eb480a0b 821 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
08aa1457 822.ELSE
d56e6723 823 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
eb480a0b 824 $(PERLEXE_OBJ) $(PERLIMPLIB)
08aa1457
PP
825.ENDIF
826 copy splittree.pl ..
eb480a0b 827 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
828
829.IF "$(CCTYPE)" != "BORLAND"
d56e6723 830.IF "$(CCTYPE)" != "GCC"
e7083a8c 831.IF "$(USE_PERLCRT)" == ""
08aa1457
PP
832
833perl95.c : runperl.c
834 copy runperl.c perl95.c
835
d56e6723 836perl95$(o) : perl95.c
eb480a0b 837 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c
08aa1457 838
d56e6723 839win32sckmt$(o) : win32sck.c
eb480a0b
GS
840 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
841 $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
fb73857a 842
d56e6723 843win32mt$(o) : win32.c
eb480a0b
GS
844 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
845 $(OBJOUT_FLAG)win32mt$(o) win32.c
fb73857a 846
ac4c12e7
GS
847DynaLoadmt$(o) : $(DYNALOADER).c
848 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
849 $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c
fb73857a
PP
850
851$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
eb480a0b 852 $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
e7083a8c 853 $(LIBBASEFILES) $(PERL95_OBJ) $(PERLIMPLIB) libcmt.lib
08aa1457
PP
854
855.ENDIF
d56e6723 856.ENDIF
e7083a8c 857.ENDIF
08aa1457
PP
858
859$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
eb480a0b 860 if not exist $(AUTODIR) mkdir $(AUTODIR)
bfab39a2 861 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
08aa1457
PP
862 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
863 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
864 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
865
064a70d4
GS
866.IF "$(OBJECT)" == "-DPERL_OBJECT"
867
58a50f62
GS
868PerlCAPI.cpp : $(MINIPERL)
869 $(MINIPERL) GenCAPI.pl $(COREDIR)
870
871PerlCAPI$(o) : PerlCAPI.cpp
064a70d4
GS
872.IF "$(CCTYPE)" == "BORLAND"
873 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
874.ELIF "$(CCTYPE)" == "GCC"
875 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
876.ELSE
d17537aa 877 $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \
58a50f62 878 $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
064a70d4 879.ENDIF
58a50f62
GS
880
881$(CAPILIB) : PerlCAPI.cpp PerlCAPI$(o)
064a70d4
GS
882.IF "$(CCTYPE)" == "BORLAND"
883 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +PerlCAPI$(o)
884.ELSE
885 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) PerlCAPI$(o)
886.ENDIF
887
888.ENDIF
58a50f62 889
08aa1457
PP
890$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
891 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
892
15e52e56
GS
893$(RE_DLL): $(PERLEXE) $(RE).xs
894 cd $(EXTDIR)\$(*B) && \
895 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
896 cd $(EXTDIR)\$(*B) && $(MAKE)
897
2a321948
GS
898$(B_DLL): $(PERLEXE) $(B).xs
899 cd $(EXTDIR)\$(*B) && \
900 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
901 cd $(EXTDIR)\$(*B) && $(MAKE)
902
a98bd6f4
GS
903$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
904 cd $(EXTDIR)\$(*B) && \
905 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
906 cd $(EXTDIR)\$(*B) && $(MAKE)
907
5d925967
GS
908$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
909 cd $(EXTDIR)\$(*B) && \
910 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
911 cd $(EXTDIR)\$(*B) && $(MAKE)
912
6dead956
GS
913$(POSIX_DLL): $(PERLEXE) $(POSIX).xs
914 cd $(EXTDIR)\$(*B) && \
915 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
916 cd $(EXTDIR)\$(*B) && $(MAKE)
917
5d925967 918$(IO_DLL): $(PERLEXE) $(IO).xs
08aa1457
PP
919 cd $(EXTDIR)\$(*B) && \
920 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
921 cd $(EXTDIR)\$(*B) && $(MAKE)
922
923$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
924 cd $(EXTDIR)\$(*B) && \
925 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
926 cd $(EXTDIR)\$(*B) && $(MAKE)
927
928$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
929 cd $(EXTDIR)\$(*B) && \
930 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
931 cd $(EXTDIR)\$(*B) && $(MAKE)
932
933$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
934 cd $(EXTDIR)\$(*B) && \
935 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
936 cd $(EXTDIR)\$(*B) && $(MAKE)
937
5d925967 938$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
08aa1457
PP
939 cd $(EXTDIR)\$(*B) && \
940 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
941 cd $(EXTDIR)\$(*B) && $(MAKE)
942
eab60bb1
GS
943$(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
944 cd $(EXTDIR)\$(*B) && \
945 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
946 cd $(EXTDIR)\$(*B) && $(MAKE)
947
08aa1457
PP
948doc: $(PERLEXE)
949 copy ..\README.win32 ..\pod\perlwin32.pod
d07c2202 950 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
b3b61bd8 951 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
08aa1457
PP
952 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
953
4a71ed0c 954utils: $(PERLEXE) $(X2P)
08aa1457 955 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
4a71ed0c
GS
956 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
957 $(PERLEXE) $(PL2BAT) $(UTILS)
08aa1457
PP
958
959distclean: clean
dc050285 960 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
eda5ff31 961 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
08aa1457 962 -del /f *.def *.map
eab60bb1
GS
963 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
964 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
eb480a0b
GS
965 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
966 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
967 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
968 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
969 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
15e52e56 970 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
eb480a0b
GS
971 -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
972 -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
973 -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
08aa1457
PP
974 -del /f $(PODDIR)\*.html
975 -del /f $(PODDIR)\*.bat
eb480a0b
GS
976 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct *.bat
977 -cd ..\x2p && del /f find2perl s2p *.bat
d444a431 978 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
eb480a0b 979 -del /f $(CONFIGPM)
d444a431
TB
980.IF "$(PERL95EXE)" != ""
981 -del /f perl95.c
982.ENDIF
983 -del /f bin\*.bat
eda5ff31 984 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.bs Makefile *$(o) pm_to_blib
eb480a0b 985 -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
d07c2202 986 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
08aa1457 987
4a71ed0c 988install : all installbare installhtml
6dead956 989
4a71ed0c 990installbare : utils
d07c2202 991 $(PERLEXE) ..\installperl
08aa1457
PP
992.IF "$(PERL95EXE)" != ""
993 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
994.ENDIF
995 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
e5a95ffb 996 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
4a71ed0c 997 $(XCOPY) bin\network.pl $(INST_LIB)\*.*
6dead956
GS
998
999installhtml : doc
08aa1457
PP
1000 $(RCOPY) html\*.* $(INST_HTML)\*.*
1001
1002inst_lib : $(CONFIGPM)
1003 copy splittree.pl ..
eb480a0b 1004 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
1005 $(RCOPY) ..\lib $(INST_LIB)\*.*
1006
dfb634a9 1007minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
08aa1457
PP
1008 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1009.IF "$(CCTYPE)" == "BORLAND"
1010 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1011.ELSE
1012 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1013.ENDIF
1014 attrib -r ..\t\*.*
1015 copy test ..\t
1016 cd ..\t && \
1017 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1018
dfb634a9 1019test-prep : all utils
08aa1457
PP
1020 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1021 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1022.IF "$(CCTYPE)" == "BORLAND"
1023 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1024.ELSE
1025 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1026.ENDIF
32f822de
GS
1027
1028test : test-prep
08aa1457
PP
1029 cd ..\t && $(PERLEXE) -I..\lib harness
1030
32f822de
GS
1031test-notty : test-prep
1032 set PERL_SKIP_TTY_TEST=1 && \
1033 cd ..\t && $(PERLEXE) -I.\lib harness
1034
08aa1457 1035clean :
d56e6723 1036 -@erase miniperlmain$(o)
08aa1457 1037 -@erase $(MINIPERL)
d56e6723
GS
1038 -@erase perlglob$(o)
1039 -@erase perlmain$(o)
51aa15f3 1040 -@erase PerlCAPI.cpp
08aa1457
PP
1041 -@erase config.w32
1042 -@erase /f config.h
1043 -@erase $(GLOBEXE)
1044 -@erase $(PERLEXE)
1045 -@erase $(PERLDLL)
1046 -@erase $(CORE_OBJ)
eb480a0b 1047 -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
08aa1457
PP
1048 -@erase $(WIN32_OBJ)
1049 -@erase $(DLL_OBJ)
d07c2202 1050 -@erase $(X2P_OBJ)
eda5ff31 1051 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp
d444a431 1052 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
d07c2202 1053 -@erase ..\x2p\*.exe ..\x2p\*.bat
08aa1457
PP
1054 -@erase *.ilk
1055 -@erase *.pdb