This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
change#3449 wasn't doing enough
[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#
ba7a42cf 36INST_VER *= \5.00557
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 124# Some versions of Visual C don't define MSVCDIR in the environment,
80252599
GS
125# so you may have to set CCHOME explicitly (spaces in the path name should
126# not be quoted)
a8deba26 127#
4a52a3da 128CCHOME *= C:\bc5
95883bf3 129#CCHOME *= $(MSVCDIR)
4a52a3da 130#CCHOME *= D:\packages\mingw32
d56e6723
GS
131CCINCDIR *= $(CCHOME)\include
132CCLIBDIR *= $(CCHOME)\lib
08aa1457
PP
133
134#
e02fdbd2
GS
135# additional compiler flags can be specified here.
136#
137# Adding -DPERL_POLLUTE enables support for old symbols, at the expense of
138# extreme pollution. You most probably want this if you're compiling modules
139# from CPAN, or other such serious uses of this experimental perl release.
140# We don't enable this by default because we want the modules to get fixed
141# instead of clinging to shortcuts like this one.
142#
143#BUILDOPT *= -DPERL_POLLUTE
144
145#
80252599
GS
146# specify semicolon-separated list of extra directories that modules will
147# look for libraries (spaces in path names need not be quoted)
fa4efe8e
GS
148#
149EXTRALIBDIRS *=
150
151#
08aa1457
PP
152# set this to point to cmd.exe (only needed if you use some
153# alternate shell that doesn't grok cmd.exe style commands)
e7083a8c 154#
d56e6723 155#SHELL *= g:\winnt\system32\cmd.exe
08aa1457
PP
156
157#
158# set this to your email address (perl will guess a value from
159# from your loginname and your hostname, which may not be right)
e7083a8c 160#
eb480a0b 161#EMAIL *=
08aa1457 162
e7083a8c
DL
163##
164## Build configuration ends.
165##
166
08aa1457
PP
167##################### CHANGE THESE ONLY IF YOU MUST #####################
168
26618a56 169.IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
eb480a0b 170D_CRYPT = undef
26618a56 171.ELSE
eb480a0b
GS
172D_CRYPT = define
173CRYPT_FLAG = -DHAVE_DES_FCRYPT
26618a56
GS
174.ENDIF
175
eb480a0b
GS
176.IF "$(OBJECT)" != ""
177PERL_MALLOC != undef
e2f80c04 178USE_THREADS != undef
b86a2fa7 179USE_MULTI != undef
1c1c7f20
GS
180.ENDIF
181
eb480a0b
GS
182PERL_MALLOC *= undef
183
184USE_THREADS *= undef
b86a2fa7 185USE_MULTI *= undef
eb480a0b 186
d07c2202
GS
187.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
188
189PROCESSOR_ARCHITECTURE *= x86
190
b83ac84c
GS
191.IF "$(OBJECT)" != ""
192ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
193.ELIF "$(USE_THREADS)" == "define"
d07c2202 194ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
924b3ec4
GS
195.ELSE
196ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
d07c2202
GS
197.ENDIF
198
199ARCHDIR = ..\lib\$(ARCHNAME)
200COREDIR = ..\lib\CORE
eb480a0b 201AUTODIR = ..\lib\auto
d07c2202 202
08aa1457
PP
203#
204# Programs to compile, build .lib files and link
205#
206
207.USESHELL :
208
209.IF "$(CCTYPE)" == "BORLAND"
210
eb480a0b
GS
211CC = bcc32
212LINK32 = tlink32
064a70d4 213LIB32 = tlib /P128
eb480a0b 214IMPLIB = implib -c
08aa1457
PP
215
216#
217# Options
218#
eb480a0b 219RUNTIME = -D_RTLDLL
80252599 220INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
eb480a0b
GS
221#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
222DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
223LOCDEFS = -DPERLDLL -DPERL_CORE
224SUBSYS = console
225CXX_FLAG = -P
08aa1457 226
eb480a0b
GS
227LIBC = cw32mti.lib
228LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib
08aa1457
PP
229
230.IF "$(CFG)" == "Debug"
eb480a0b
GS
231OPTIMIZE = -v $(RUNTIME) -DDEBUGGING
232LINK_DBG = -v
08aa1457 233.ELSE
6a6688c3 234OPTIMIZE = -O2 $(RUNTIME)
eb480a0b 235LINK_DBG =
08aa1457
PP
236.ENDIF
237
22c35a8c 238CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
eb480a0b 239 $(PCHFLAGS) $(OPTIMIZE)
80252599 240LINK_FLAGS = $(LINK_DBG) -L"$(CCLIBDIR)"
eb480a0b
GS
241OBJOUT_FLAG = -o
242EXEOUT_FLAG = -e
064a70d4 243LIBOUT_FLAG =
d56e6723
GS
244
245.ELIF "$(CCTYPE)" == "GCC"
246
3b657871
GS
247CC = gcc
248LINK32 = gcc
064a70d4 249LIB32 = ar rc
eb480a0b 250IMPLIB = dlltool
d56e6723
GS
251
252o = .o
eda5ff31 253a = .a
d56e6723
GS
254
255#
256# Options
257#
eb480a0b 258RUNTIME =
9036c72f 259INCLUDES = -I$(COREDIR) -I.\include -I. -I..
eb480a0b
GS
260DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
261LOCDEFS = -DPERLDLL -DPERL_CORE
262SUBSYS = console
263CXX_FLAG = -xc++
d56e6723 264
eb480a0b 265LIBC = -lcrtdll
db15561c
GS
266LIBFILES = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 \
267 -lmingw32 -lgcc -lmoldname $(LIBC) -lkernel32
d56e6723
GS
268
269.IF "$(CFG)" == "Debug"
eb480a0b
GS
270OPTIMIZE = -g -O2 $(RUNTIME) -DDEBUGGING
271LINK_DBG = -g
d56e6723 272.ELSE
eb480a0b
GS
273OPTIMIZE = -g -O2 $(RUNTIME)
274LINK_DBG =
d56e6723
GS
275.ENDIF
276
eb480a0b 277CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
80252599 278LINK_FLAGS = $(LINK_DBG) -L"$(CCLIBDIR)"
eb480a0b
GS
279OBJOUT_FLAG = -o
280EXEOUT_FLAG = -o
064a70d4 281LIBOUT_FLAG =
08aa1457
PP
282
283.ELSE
284
eb480a0b
GS
285CC = cl.exe
286LINK32 = link.exe
287LIB32 = $(LINK32) -lib
288
08aa1457
PP
289#
290# Options
291#
eb480a0b 292
af883608 293RUNTIME = -MD
9036c72f 294INCLUDES = -I$(COREDIR) -I.\include -I. -I..
eb480a0b 295#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
b3e5c95e 296DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(BUILDOPT) $(CRYPT_FLAG)
eb480a0b
GS
297LOCDEFS = -DPERLDLL -DPERL_CORE
298SUBSYS = console
299CXX_FLAG = -TP -GX
08aa1457 300
e7083a8c
DL
301.IF "$(USE_PERLCRT)" == ""
302.IF "$(CFG)" == "Debug"
303PERLCRTLIBC = msvcrtd.lib
304.ELSE
305PERLCRTLIBC = msvcrt.lib
306.ENDIF
307.ELSE
308.IF "$(CFG)" == "Debug"
309PERLCRTLIBC = PerlCRTD.lib
310.ELSE
311PERLCRTLIBC = PerlCRT.lib
312.ENDIF
313.ENDIF
314
08aa1457 315.IF "$(RUNTIME)" == "-MD"
e7083a8c 316LIBC = $(PERLCRTLIBC)
08aa1457 317.ELSE
eb480a0b 318LIBC = libcmt.lib
08aa1457
PP
319.ENDIF
320
321.IF "$(CFG)" == "Debug"
322.IF "$(CCTYPE)" == "MSVC20"
eb480a0b 323OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING
08aa1457 324.ELSE
3dfd1da1 325OPTIMIZE = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING
08aa1457 326.ENDIF
eb480a0b 327LINK_DBG = -debug -pdb:none
08aa1457 328.ELSE
74593e1f
GS
329.IF "$(CFG)" == "Optimize"
330OPTIMIZE = -O2 $(RUNTIME) -DNDEBUG
08aa1457 331.ELSE
af883608 332OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
08aa1457 333.ENDIF
eb480a0b 334LINK_DBG = -release
08aa1457
PP
335.ENDIF
336
e7083a8c 337LIBBASEFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \
eb480a0b
GS
338 winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
339 oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
340 version.lib odbc32.lib odbccp32.lib
08aa1457 341
e7083a8c
DL
342# we add LIBC here, since we may be using PerlCRT.dll
343LIBFILES = $(LIBBASEFILES) $(LIBC)
344
eb480a0b
GS
345CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
346 $(PCHFLAGS) $(OPTIMIZE)
e7083a8c 347LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
eb480a0b
GS
348OBJOUT_FLAG = -Fo
349EXEOUT_FLAG = -Fe
064a70d4 350LIBOUT_FLAG = /out:
08aa1457
PP
351
352.ENDIF
353
eb480a0b
GS
354.IF "$(OBJECT)" != ""
355OPTIMIZE += $(CXX_FLAG)
356.ENDIF
357
358CFLAGS_O = $(CFLAGS) $(OBJECT)
359
08aa1457
PP
360#################### do not edit below this line #######################
361############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
362
d56e6723 363o *= .obj
eda5ff31 364a *= .lib
d56e6723 365
eb480a0b
GS
366LKPRE = INPUT (
367LKPOST = )
368
08aa1457
PP
369#
370# Rules
371#
08aa1457 372
eda5ff31 373.SUFFIXES : .c $(o) .dll $(a) .exe
d56e6723
GS
374
375.c$(o):
eb480a0b 376 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
d07c2202
GS
377
378.y.c:
379 $(NOOP)
08aa1457 380
d56e6723 381$(o).dll:
08aa1457 382.IF "$(CCTYPE)" == "BORLAND"
d56e6723 383 $(LINK32) -Tpd -ap $(LINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
08aa1457 384 $(IMPLIB) $(*B).lib $@
d56e6723
GS
385.ELIF "$(CCTYPE)" == "GCC"
386 $(LINK32) -o $@ $(LINK_FLAGS) $< $(LIBFILES)
eda5ff31 387 $(IMPLIB) -def $(*B).def $(*B).a $@
08aa1457 388.ELSE
08aa1457 389 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
dc050285 390 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
08aa1457
PP
391.ENDIF
392
393#
e5a95ffb
GS
394INST_BIN = $(INST_TOP)$(INST_VER)\bin\$(ARCHNAME)
395INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
396INST_LIB = $(INST_TOP)$(INST_VER)\lib
eb480a0b
GS
397INST_POD = $(INST_LIB)\pod
398INST_HTML = $(INST_POD)\html
399LIBDIR = ..\lib
400EXTDIR = ..\ext
401PODDIR = ..\pod
402EXTUTILSDIR = $(LIBDIR)\extutils
08aa1457
PP
403
404#
405# various targets
eb480a0b
GS
406MINIPERL = ..\miniperl.exe
407MINIDIR = .\mini
408PERLEXE = ..\perl.exe
409GLOBEXE = ..\perlglob.exe
410CONFIGPM = ..\lib\Config.pm
411MINIMOD = ..\lib\ExtUtils\Miniperl.pm
412X2P = ..\x2p\a2p.exe
413
414PL2BAT = bin\pl2bat.pl
415GLOBBAT = bin\perlglob.bat
08aa1457 416
4a71ed0c
GS
417UTILS = \
418 ..\utils\h2ph \
419 ..\utils\splain \
420 ..\utils\perlbug \
421 ..\utils\pl2pm \
422 ..\utils\c2ph \
423 ..\utils\h2xs \
424 ..\utils\perldoc \
425 ..\utils\pstruct \
426 ..\utils\perlcc \
427 ..\pod\checkpods \
428 ..\pod\pod2html \
429 ..\pod\pod2latex \
430 ..\pod\pod2man \
431 ..\pod\pod2text \
360aca43
GS
432 ..\pod\pod2usage \
433 ..\pod\podchecker \
434 ..\pod\podselect \
4a71ed0c
GS
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 \
b295d113 627 Data/Dumper Devel/Peek ByteLoader
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
a6c40364 645BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
eb480a0b
GS
646
647SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
648FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
649OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
650SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
651IO_DLL = $(AUTODIR)\IO\IO.dll
652POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
653ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
654THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
655B_DLL = $(AUTODIR)\B\B.dll
823edd99 656DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
3967c732 657PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
15e52e56 658RE_DLL = $(AUTODIR)\re\re.dll
b295d113 659BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
eb480a0b 660
eab60bb1
GS
661ERRNO_PM = $(LIBDIR)\Errno.pm
662
ac4c12e7 663EXTENSION_C = \
eb480a0b
GS
664 $(SOCKET).c \
665 $(FCNTL).c \
666 $(OPCODE).c \
667 $(SDBM_FILE).c \
668 $(IO).c \
669 $(POSIX).c \
670 $(ATTRS).c \
671 $(THREAD).c \
15e52e56 672 $(RE).c \
823edd99 673 $(DUMPER).c \
3967c732 674 $(PEEK).c \
b295d113
TH
675 $(B).c \
676 $(BYTELOADER).c
eb480a0b 677
ac4c12e7 678EXTENSION_DLL = \
eb480a0b
GS
679 $(SOCKET_DLL) \
680 $(FCNTL_DLL) \
681 $(OPCODE_DLL) \
682 $(SDBM_FILE_DLL)\
683 $(IO_DLL) \
684 $(POSIX_DLL) \
51aa15f3 685 $(ATTRS_DLL) \
823edd99 686 $(DUMPER_DLL) \
3967c732 687 $(PEEK_DLL) \
b295d113
TH
688 $(B_DLL) \
689 $(BYTELOADER_DLL)
26ca90b6 690
eab60bb1
GS
691EXTENSION_PM = \
692 $(ERRNO_PM)
693
15e52e56 694# re.dll doesn't build with PERL_OBJECT yet
26ca90b6
GS
695.IF "$(OBJECT)" == ""
696EXTENSION_DLL += \
15e52e56
GS
697 $(THREAD_DLL) \
698 $(RE_DLL)
26ca90b6 699.ENDIF
eb480a0b
GS
700
701POD2HTML = $(PODDIR)\pod2html
702POD2MAN = $(PODDIR)\pod2man
703POD2LATEX = $(PODDIR)\pod2latex
704POD2TEXT = $(PODDIR)\pod2text
705
706CFG_VARS = \
707 "INST_DRV=$(INST_DRV)" \
708 "INST_TOP=$(INST_TOP)" \
e5a95ffb 709 "INST_VER=$(INST_VER)" \
eb480a0b
GS
710 "archname=$(ARCHNAME)" \
711 "cc=$(CC)" \
80252599 712 "ccflags=$(OPTIMIZE:s/"/\"/) $(DEFINES) $(OBJECT)" \
eb480a0b
GS
713 "cf_email=$(EMAIL)" \
714 "d_crypt=$(D_CRYPT)" \
715 "d_mymalloc=$(PERL_MALLOC)" \
716 "libs=$(LIBFILES:f)" \
80252599 717 "incpath=$(CCINCDIR:s/"/\"/)" \
eda5ff31 718 "libperl=$(PERLIMPLIB:f)" \
80252599 719 "libpth=$(CCLIBDIR:s/"/\"/);$(EXTRALIBDIRS:s/"/\"/)" \
eb480a0b
GS
720 "libc=$(LIBC)" \
721 "make=dmake" \
eda5ff31
GS
722 "_o=$(o)" "obj_ext=$(o)" \
723 "_a=$(a)" "lib_ext=$(a)" \
eb480a0b
GS
724 "static_ext=$(STATIC_EXT)" \
725 "dynamic_ext=$(DYNAMIC_EXT)" \
eab60bb1 726 "nonxs_ext=$(NONXS_EXT)" \
eb480a0b 727 "usethreads=$(USE_THREADS)" \
b86a2fa7 728 "usemultiplicity=$(USE_MULTI)" \
80252599
GS
729 "LINK_FLAGS=$(LINK_FLAGS:s/"/\"/)" \
730 "optimize=$(OPTIMIZE:s/"/\"/)"
924b3ec4 731
08aa1457
PP
732#
733# Top targets
734#
735
852c2e52 736all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
eab60bb1 737 $(CAPILIB) $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
08aa1457 738
d56e6723 739$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
08aa1457
PP
740
741#------------------------------------------------------------
742
eb480a0b 743$(GLOBEXE) : perlglob$(o)
08aa1457 744.IF "$(CCTYPE)" == "BORLAND"
80252599 745 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
d56e6723 746 $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \
80252599 747 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
d56e6723
GS
748.ELIF "$(CCTYPE)" == "GCC"
749 $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES)
08aa1457 750.ELSE
dc050285 751 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
d56e6723 752 perlglob$(o) setargv$(o)
08aa1457
PP
753.ENDIF
754
d56e6723 755perlglob$(o) : perlglob.c
08aa1457 756
08aa1457
PP
757config.w32 : $(CFGSH_TMPL)
758 copy $(CFGSH_TMPL) config.w32
759
852c2e52 760.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
08aa1457
PP
761 -del /f config.h
762 copy $(CFGH_TMPL) config.h
763
764..\config.sh : config.w32 $(MINIPERL) config_sh.PL
924b3ec4
GS
765 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
766
767# this target is for when changes to the main config.sh happen
768# edit config.{b,v,g}c and make this target once for each supported
769# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
770regen_config_h:
771 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
772 -cd .. && del /f perl.exe
773 cd .. && perl configpm
774 -del /f $(CFGH_TMPL)
80252599 775 -mkdir $(COREDIR)
e5a95ffb 776 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
924b3ec4 777 rename config.h $(CFGH_TMPL)
08aa1457
PP
778
779$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
780 cd .. && miniperl configpm
781 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
d07c2202
GS
782 $(XCOPY) ..\*.h $(COREDIR)\*.*
783 $(XCOPY) *.h $(COREDIR)\*.*
15e52e56 784 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
d07c2202 785 $(RCOPY) include $(COREDIR)\*.*
e5a95ffb
GS
786 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
787 || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
08aa1457 788
eb480a0b 789$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
08aa1457
PP
790.IF "$(CCTYPE)" == "BORLAND"
791 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
eb480a0b 792 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
d56e6723
GS
793.ELIF "$(CCTYPE)" == "GCC"
794 $(LINK32) -v -o $@ $(LINK_FLAGS) \
eb480a0b 795 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
08aa1457
PP
796.ELSE
797 $(LINK32) -subsystem:console -out:$@ \
eb480a0b 798 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
08aa1457
PP
799.ENDIF
800
eb480a0b
GS
801$(MINIDIR) :
802 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
803
852c2e52 804$(MINICORE_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
805 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c
806
852c2e52 807$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
808 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
809
852c2e52
GS
810# 1. we don't want to rebuild miniperl.exe when config.h changes
811# 2. we don't want to rebuild miniperl.exe with non-default config.h
812$(MINI_OBJ) : $(CORE_NOCFG_H)
813
eb480a0b
GS
814$(WIN32_OBJ) : $(CORE_H)
815$(CORE_OBJ) : $(CORE_H)
eb480a0b
GS
816$(DLL_OBJ) : $(CORE_H)
817$(PERL95_OBJ) : $(CORE_H)
818$(X2P_OBJ) : $(CORE_H)
08aa1457 819
22c35a8c 820perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym makedef.pl
eb480a0b 821 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \
910dfcc8 822 CCTYPE=$(CCTYPE) > perldll.def
08aa1457 823
eb480a0b 824$(PERLDLL): perldll.def $(PERLDLL_OBJ)
08aa1457
PP
825.IF "$(CCTYPE)" == "BORLAND"
826 $(LINK32) -Tpd -ap $(LINK_FLAGS) \
eb480a0b 827 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
08aa1457
PP
828 $@,\n \
829 $(LIBFILES)\n \
830 perldll.def\n)
831 $(IMPLIB) $*.lib $@
d56e6723 832.ELIF "$(CCTYPE)" == "GCC"
3730b96e 833 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
eb480a0b 834 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
d56e6723
GS
835 dlltool --output-lib $(PERLIMPLIB) \
836 --dllname perl.dll \
837 --def perldll.def \
838 --base-file perl.base \
839 --output-exp perl.exp
3730b96e 840 $(LINK32) -mdll -o $@ $(LINK_FLAGS) \
eb480a0b
GS
841 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
842 perl.exp $(LKPOST))
08aa1457
PP
843.ELSE
844 $(LINK32) -dll -def:perldll.def -out:$@ \
eb480a0b 845 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\))
08aa1457 846.ENDIF
d07c2202 847 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
08aa1457
PP
848
849perl.def : $(MINIPERL) makeperldef.pl
850 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
851
852$(MINIMOD) : $(MINIPERL) ..\minimod.pl
853 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
854
eb480a0b
GS
855..\x2p\a2p$(o) : ..\x2p\a2p.c
856 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
857
858..\x2p\hash$(o) : ..\x2p\hash.c
859 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
860
861..\x2p\str$(o) : ..\x2p\str.c
862 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
863
864..\x2p\util$(o) : ..\x2p\util.c
865 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
866
867..\x2p\walk$(o) : ..\x2p\walk.c
868 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
869
870$(X2P) : $(MINIPERL) $(X2P_OBJ)
d07c2202
GS
871 $(MINIPERL) ..\x2p\find2perl.PL
872 $(MINIPERL) ..\x2p\s2p.PL
873.IF "$(CCTYPE)" == "BORLAND"
874 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
875 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
876.ELIF "$(CCTYPE)" == "GCC"
877 $(LINK32) -v -o $@ $(LINK_FLAGS) \
878 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
879.ELSE
880 $(LINK32) -subsystem:console -out:$@ \
422938c9 881 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
d07c2202
GS
882.ENDIF
883
08aa1457
PP
884perlmain.c : runperl.c
885 copy runperl.c perlmain.c
886
d56e6723 887perlmain$(o) : perlmain.c
8957be0a 888 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
08aa1457 889
eb480a0b 890$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
08aa1457
PP
891.IF "$(CCTYPE)" == "BORLAND"
892 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
8957be0a
GS
893 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
894 $(@:s,\,\\),\n \
08aa1457 895 $(PERLIMPLIB) $(LIBFILES)\n)
d56e6723
GS
896.ELIF "$(CCTYPE)" == "GCC"
897 $(LINK32) -o $@ $(LINK_FLAGS) \
eb480a0b 898 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
08aa1457 899.ELSE
d56e6723 900 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
baed7233 901 $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB)
08aa1457
PP
902.ENDIF
903 copy splittree.pl ..
eb480a0b 904 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
905
906.IF "$(CCTYPE)" != "BORLAND"
d56e6723 907.IF "$(CCTYPE)" != "GCC"
e7083a8c 908.IF "$(USE_PERLCRT)" == ""
08aa1457
PP
909
910perl95.c : runperl.c
911 copy runperl.c perl95.c
912
d56e6723 913perl95$(o) : perl95.c
eb480a0b 914 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c
08aa1457 915
d56e6723 916win32sckmt$(o) : win32sck.c
eb480a0b
GS
917 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
918 $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
fb73857a 919
d56e6723 920win32mt$(o) : win32.c
eb480a0b
GS
921 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
922 $(OBJOUT_FLAG)win32mt$(o) win32.c
fb73857a 923
ac4c12e7
GS
924DynaLoadmt$(o) : $(DYNALOADER).c
925 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
926 $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c
fb73857a
PP
927
928$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
eb480a0b 929 $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
baed7233
DL
930 $(LIBBASEFILES) $(PERL95_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) \
931 libcmt.lib
08aa1457
PP
932
933.ENDIF
d56e6723 934.ENDIF
e7083a8c 935.ENDIF
08aa1457
PP
936
937$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
eb480a0b 938 if not exist $(AUTODIR) mkdir $(AUTODIR)
bfab39a2 939 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
08aa1457
PP
940 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
941 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
942 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
943
064a70d4
GS
944.IF "$(OBJECT)" == "-DPERL_OBJECT"
945
6de196ee 946perlCAPI.cpp : $(MINIPERL)
58a50f62
GS
947 $(MINIPERL) GenCAPI.pl $(COREDIR)
948
6de196ee 949perlCAPI$(o) : perlCAPI.cpp
064a70d4 950.IF "$(CCTYPE)" == "BORLAND"
6de196ee 951 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
064a70d4 952.ELIF "$(CCTYPE)" == "GCC"
6de196ee 953 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
064a70d4 954.ELSE
d17537aa 955 $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \
6de196ee 956 $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
064a70d4 957.ENDIF
58a50f62 958
6de196ee 959$(CAPILIB) : perlCAPI.cpp perlCAPI$(o)
064a70d4 960.IF "$(CCTYPE)" == "BORLAND"
6de196ee 961 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +perlCAPI$(o)
064a70d4 962.ELSE
6de196ee 963 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) perlCAPI$(o)
064a70d4
GS
964.ENDIF
965
966.ENDIF
58a50f62 967
08aa1457
PP
968$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
969 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
970
823edd99
GS
971$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
972 cd $(EXTDIR)\Data\$(*B) && \
973 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
974 cd $(EXTDIR)\Data\$(*B) && $(MAKE)
975
35ef4773 976$(PEEK_DLL): $(PERLEXE) $(PEEK).xs
3967c732
JD
977 cd $(EXTDIR)\Devel\$(*B) && \
978 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
979 cd $(EXTDIR)\Devel\$(*B) && $(MAKE)
980
15e52e56
GS
981$(RE_DLL): $(PERLEXE) $(RE).xs
982 cd $(EXTDIR)\$(*B) && \
983 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
984 cd $(EXTDIR)\$(*B) && $(MAKE)
985
2a321948
GS
986$(B_DLL): $(PERLEXE) $(B).xs
987 cd $(EXTDIR)\$(*B) && \
988 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
989 cd $(EXTDIR)\$(*B) && $(MAKE)
990
a98bd6f4
GS
991$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
992 cd $(EXTDIR)\$(*B) && \
993 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
994 cd $(EXTDIR)\$(*B) && $(MAKE)
995
5d925967
GS
996$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
997 cd $(EXTDIR)\$(*B) && \
998 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
999 cd $(EXTDIR)\$(*B) && $(MAKE)
1000
6dead956
GS
1001$(POSIX_DLL): $(PERLEXE) $(POSIX).xs
1002 cd $(EXTDIR)\$(*B) && \
1003 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1004 cd $(EXTDIR)\$(*B) && $(MAKE)
1005
5d925967 1006$(IO_DLL): $(PERLEXE) $(IO).xs
08aa1457
PP
1007 cd $(EXTDIR)\$(*B) && \
1008 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1009 cd $(EXTDIR)\$(*B) && $(MAKE)
1010
1011$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
1012 cd $(EXTDIR)\$(*B) && \
1013 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1014 cd $(EXTDIR)\$(*B) && $(MAKE)
1015
1016$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
1017 cd $(EXTDIR)\$(*B) && \
1018 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1019 cd $(EXTDIR)\$(*B) && $(MAKE)
1020
1021$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
1022 cd $(EXTDIR)\$(*B) && \
1023 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1024 cd $(EXTDIR)\$(*B) && $(MAKE)
1025
5d925967 1026$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
08aa1457
PP
1027 cd $(EXTDIR)\$(*B) && \
1028 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1029 cd $(EXTDIR)\$(*B) && $(MAKE)
1030
b295d113
TH
1031$(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs
1032 cd $(EXTDIR)\$(*B) && \
1033 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1034 cd $(EXTDIR)\$(*B) && $(MAKE)
1035
eab60bb1
GS
1036$(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
1037 cd $(EXTDIR)\$(*B) && \
1038 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1039 cd $(EXTDIR)\$(*B) && $(MAKE)
1040
08aa1457 1041doc: $(PERLEXE)
d07c2202 1042 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
b3b61bd8 1043 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
08aa1457
PP
1044 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1045
4a71ed0c 1046utils: $(PERLEXE) $(X2P)
08aa1457 1047 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
66aa1127 1048 copy ..\README.win32 ..\pod\perlwin32.pod
4a71ed0c
GS
1049 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1050 $(PERLEXE) $(PL2BAT) $(UTILS)
08aa1457
PP
1051
1052distclean: clean
dc050285 1053 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
eda5ff31 1054 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
08aa1457 1055 -del /f *.def *.map
eab60bb1
GS
1056 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1057 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
eb480a0b
GS
1058 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1059 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1060 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1061 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1062 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
15e52e56 1063 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
b295d113 1064 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
3967c732 1065 -del /f $(LIBDIR)\Devel\Peek.pm
eb480a0b
GS
1066 -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1067 -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1068 -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
823edd99 1069 -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
08aa1457
PP
1070 -del /f $(PODDIR)\*.html
1071 -del /f $(PODDIR)\*.bat
22c35a8c
GS
1072 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
1073 pstruct *.bat
eb480a0b 1074 -cd ..\x2p && del /f find2perl s2p *.bat
d444a431 1075 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
eb480a0b 1076 -del /f $(CONFIGPM)
d444a431
TB
1077.IF "$(PERL95EXE)" != ""
1078 -del /f perl95.c
1079.ENDIF
1080 -del /f bin\*.bat
22c35a8c
GS
1081 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \
1082 pm_to_blib
eb480a0b 1083 -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
d07c2202 1084 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
08aa1457 1085
4a71ed0c 1086install : all installbare installhtml
6dead956 1087
4a71ed0c 1088installbare : utils
d07c2202 1089 $(PERLEXE) ..\installperl
08aa1457
PP
1090.IF "$(PERL95EXE)" != ""
1091 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
1092.ENDIF
1093 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
e5a95ffb 1094 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
6dead956
GS
1095
1096installhtml : doc
08aa1457
PP
1097 $(RCOPY) html\*.* $(INST_HTML)\*.*
1098
1099inst_lib : $(CONFIGPM)
1100 copy splittree.pl ..
eb480a0b 1101 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
1102 $(RCOPY) ..\lib $(INST_LIB)\*.*
1103
dfb634a9 1104minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
08aa1457
PP
1105 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1106.IF "$(CCTYPE)" == "BORLAND"
1107 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1108.ELSE
1109 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1110.ENDIF
1111 attrib -r ..\t\*.*
1112 copy test ..\t
1113 cd ..\t && \
1114 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1115
dfb634a9 1116test-prep : all utils
08aa1457
PP
1117 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1118 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1119.IF "$(CCTYPE)" == "BORLAND"
1120 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1121.ELSE
1122 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1123.ENDIF
32f822de
GS
1124
1125test : test-prep
08aa1457
PP
1126 cd ..\t && $(PERLEXE) -I..\lib harness
1127
32f822de
GS
1128test-notty : test-prep
1129 set PERL_SKIP_TTY_TEST=1 && \
1130 cd ..\t && $(PERLEXE) -I.\lib harness
1131
08aa1457 1132clean :
d56e6723 1133 -@erase miniperlmain$(o)
08aa1457 1134 -@erase $(MINIPERL)
d56e6723
GS
1135 -@erase perlglob$(o)
1136 -@erase perlmain$(o)
6de196ee 1137 -@erase perlCAPI.cpp
08aa1457
PP
1138 -@erase config.w32
1139 -@erase /f config.h
1140 -@erase $(GLOBEXE)
1141 -@erase $(PERLEXE)
1142 -@erase $(PERLDLL)
1143 -@erase $(CORE_OBJ)
eb480a0b 1144 -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
08aa1457
PP
1145 -@erase $(WIN32_OBJ)
1146 -@erase $(DLL_OBJ)
d07c2202 1147 -@erase $(X2P_OBJ)
eda5ff31 1148 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp
d444a431 1149 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
d07c2202 1150 -@erase ..\x2p\*.exe ..\x2p\*.bat
08aa1457
PP
1151 -@erase *.ilk
1152 -@erase *.pdb