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