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