This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
update win32/config* stuff, Changes
[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#
c4d53692 36INST_VER *= \5.00555
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 \
432 ..\x2p\find2perl \
433 ..\x2p\s2p \
4a71ed0c
GS
434 bin\runperl.pl \
435 bin\pl2bat.pl \
436 bin\perlglob.pl \
437 bin\search.pl
438
08aa1457
PP
439.IF "$(CCTYPE)" == "BORLAND"
440
eb480a0b
GS
441CFGSH_TMPL = config.bc
442CFGH_TMPL = config_H.bc
d56e6723
GS
443
444.ELIF "$(CCTYPE)" == "GCC"
445
eb480a0b
GS
446CFGSH_TMPL = config.gc
447CFGH_TMPL = config_H.gc
db15561c
GS
448.IF "$(OBJECT)" == "-DPERL_OBJECT"
449PERLIMPLIB = ..\libperlcore$(a)
450.ELSE
451PERLIMPLIB = ..\libperl$(a)
452.ENDIF
08aa1457
PP
453
454.ELSE
455
eb480a0b
GS
456CFGSH_TMPL = config.vc
457CFGH_TMPL = config_H.vc
e7083a8c 458.IF "$(USE_PERLCRT)" == ""
eb480a0b 459PERL95EXE = ..\perl95.exe
e7083a8c 460.ENDIF
08aa1457
PP
461
462.ENDIF
463
eda5ff31
GS
464.IF "$(OBJECT)" == "-DPERL_OBJECT"
465PERLIMPLIB *= ..\perlcore$(a)
466PERLDLL = ..\perlcore.dll
6de196ee 467CAPILIB = $(COREDIR)\perlCAPI$(a)
eda5ff31
GS
468.ELSE
469PERLIMPLIB *= ..\perl$(a)
470PERLDLL = ..\perl.dll
471CAPILIB =
472.ENDIF
473
eb480a0b
GS
474XCOPY = xcopy /f /r /i /d
475RCOPY = xcopy /f /r /i /e /d
476NOOP = @echo
08aa1457 477
eb480a0b
GS
478#
479# filenames given to xsubpp must have forward slashes (since it puts
480# full pathnames in #line strings)
481XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
482 -C++ -prototypes
483
852c2e52 484MICROCORE_SRC = \
eb480a0b
GS
485 ..\av.c \
486 ..\byterun.c \
487 ..\deb.c \
488 ..\doio.c \
489 ..\doop.c \
490 ..\dump.c \
491 ..\globals.c \
492 ..\gv.c \
493 ..\hv.c \
494 ..\mg.c \
495 ..\op.c \
496 ..\perl.c \
497 ..\perly.c \
498 ..\pp.c \
499 ..\pp_ctl.c \
500 ..\pp_hot.c \
501 ..\pp_sys.c \
502 ..\regcomp.c \
503 ..\regexec.c \
504 ..\run.c \
505 ..\scope.c \
506 ..\sv.c \
507 ..\taint.c \
508 ..\toke.c \
509 ..\universal.c \
a176fa2a 510 ..\utf8.c \
eb480a0b
GS
511 ..\util.c
512
1c1c7f20 513.IF "$(PERL_MALLOC)" == "define"
852c2e52 514EXTRACORE_SRC += ..\malloc.c
1c1c7f20
GS
515.ENDIF
516
eb480a0b 517.IF "$(OBJECT)" == ""
852c2e52 518EXTRACORE_SRC += ..\perlio.c
eb480a0b
GS
519.ENDIF
520
521WIN32_SRC = \
522 .\win32.c \
523 .\win32sck.c
524
525.IF "$(USE_THREADS)" == "define"
526WIN32_SRC += .\win32thread.c
527.ENDIF
528
8d9b2e3c
GS
529.IF "$(CRYPT_SRC)" != ""
530WIN32_SRC += .\$(CRYPT_SRC)
531.ENDIF
532
eb480a0b
GS
533PERL95_SRC = \
534 perl95.c \
535 win32mt.c \
536 win32sckmt.c
537
a1dd9325 538.IF "$(CRYPT_SRC)" != ""
8d9b2e3c 539PERL95_SRC += .\$(CRYPT_SRC)
a1dd9325
GS
540.ENDIF
541
eb480a0b
GS
542DLL_SRC = $(DYNALOADER).c
543
544
545.IF "$(OBJECT)" == ""
546DLL_SRC += perllib.c
547.ENDIF
548
549X2P_SRC = \
550 ..\x2p\a2p.c \
551 ..\x2p\hash.c \
552 ..\x2p\str.c \
553 ..\x2p\util.c \
554 ..\x2p\walk.c
555
852c2e52 556CORE_NOCFG_H = \
eb480a0b
GS
557 ..\av.h \
558 ..\byterun.h \
559 ..\bytecode.h \
560 ..\cop.h \
561 ..\cv.h \
562 ..\dosish.h \
563 ..\embed.h \
564 ..\form.h \
565 ..\gv.h \
566 ..\handy.h \
567 ..\hv.h \
0f4eea8f 568 ..\iperlsys.h \
eb480a0b
GS
569 ..\mg.h \
570 ..\nostdio.h \
571 ..\op.h \
572 ..\opcode.h \
573 ..\perl.h \
eb480a0b
GS
574 ..\perlsdio.h \
575 ..\perlsfio.h \
576 ..\perly.h \
577 ..\pp.h \
578 ..\proto.h \
579 ..\regexp.h \
580 ..\scope.h \
581 ..\sv.h \
582 ..\thread.h \
583 ..\unixish.h \
a176fa2a 584 ..\utf8.h \
eb480a0b 585 ..\util.h \
dfe13c55 586 ..\warning.h \
eb480a0b 587 ..\XSUB.h \
eb480a0b
GS
588 ..\EXTERN.h \
589 ..\perlvars.h \
590 ..\intrpvar.h \
591 ..\thrdvar.h \
592 .\include\dirent.h \
593 .\include\netdb.h \
594 .\include\sys\socket.h \
595 .\win32.h
596
852c2e52
GS
597CORE_H = $(CORE_NOCFG_H) .\config.h
598
599MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
600CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
eb480a0b 601WIN32_OBJ = $(WIN32_SRC:db:+$(o))
5fd76c3e 602MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
eb480a0b
GS
603MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
604MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
af883608 605PERL95_OBJ = $(PERL95_SRC:db:+$(o))
eb480a0b
GS
606DLL_OBJ = $(DLL_SRC:db:+$(o))
607X2P_OBJ = $(X2P_SRC:db:+$(o))
608
eb480a0b
GS
609PERLDLL_OBJ = $(CORE_OBJ)
610PERLEXE_OBJ = perlmain$(o)
611
612.IF "$(OBJECT)" == ""
613PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
614.ELSE
615PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
af883608 616PERL95_OBJ += DynaLoadmt$(o)
eb480a0b
GS
617.ENDIF
618
baed7233
DL
619.IF "$(USE_SETARGV)" != ""
620SETARGV_OBJ = setargv$(o)
621.ENDIF
622
823edd99 623DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
3967c732 624 Data/Dumper Devel/Peek
eb480a0b 625STATIC_EXT = DynaLoader
eab60bb1 626NONXS_EXT = Errno
eb480a0b
GS
627
628DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
629SOCKET = $(EXTDIR)\Socket\Socket
630FCNTL = $(EXTDIR)\Fcntl\Fcntl
631OPCODE = $(EXTDIR)\Opcode\Opcode
632SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
633IO = $(EXTDIR)\IO\IO
634POSIX = $(EXTDIR)\POSIX\POSIX
635ATTRS = $(EXTDIR)\attrs\attrs
636THREAD = $(EXTDIR)\Thread\Thread
637B = $(EXTDIR)\B\B
15e52e56 638RE = $(EXTDIR)\re\re
823edd99 639DUMPER = $(EXTDIR)\Data\Dumper\Dumper
eab60bb1 640ERRNO = $(EXTDIR)\Errno\Errno
3967c732 641PEEK = $(EXTDIR)\Devel\Peek\Peek
eb480a0b
GS
642
643SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
644FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
645OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
646SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
647IO_DLL = $(AUTODIR)\IO\IO.dll
648POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
649ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
650THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
651B_DLL = $(AUTODIR)\B\B.dll
823edd99 652DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
3967c732 653PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
15e52e56 654RE_DLL = $(AUTODIR)\re\re.dll
eb480a0b 655
eab60bb1
GS
656ERRNO_PM = $(LIBDIR)\Errno.pm
657
ac4c12e7 658EXTENSION_C = \
eb480a0b
GS
659 $(SOCKET).c \
660 $(FCNTL).c \
661 $(OPCODE).c \
662 $(SDBM_FILE).c \
663 $(IO).c \
664 $(POSIX).c \
665 $(ATTRS).c \
666 $(THREAD).c \
15e52e56 667 $(RE).c \
823edd99 668 $(DUMPER).c \
3967c732 669 $(PEEK).c \
eb480a0b
GS
670 $(B).c
671
ac4c12e7 672EXTENSION_DLL = \
eb480a0b
GS
673 $(SOCKET_DLL) \
674 $(FCNTL_DLL) \
675 $(OPCODE_DLL) \
676 $(SDBM_FILE_DLL)\
677 $(IO_DLL) \
678 $(POSIX_DLL) \
51aa15f3 679 $(ATTRS_DLL) \
823edd99 680 $(DUMPER_DLL) \
3967c732 681 $(PEEK_DLL) \
51aa15f3 682 $(B_DLL)
26ca90b6 683
eab60bb1
GS
684EXTENSION_PM = \
685 $(ERRNO_PM)
686
15e52e56 687# re.dll doesn't build with PERL_OBJECT yet
26ca90b6
GS
688.IF "$(OBJECT)" == ""
689EXTENSION_DLL += \
15e52e56
GS
690 $(THREAD_DLL) \
691 $(RE_DLL)
26ca90b6 692.ENDIF
eb480a0b
GS
693
694POD2HTML = $(PODDIR)\pod2html
695POD2MAN = $(PODDIR)\pod2man
696POD2LATEX = $(PODDIR)\pod2latex
697POD2TEXT = $(PODDIR)\pod2text
698
699CFG_VARS = \
700 "INST_DRV=$(INST_DRV)" \
701 "INST_TOP=$(INST_TOP)" \
e5a95ffb 702 "INST_VER=$(INST_VER)" \
eb480a0b
GS
703 "archname=$(ARCHNAME)" \
704 "cc=$(CC)" \
80252599 705 "ccflags=$(OPTIMIZE:s/"/\"/) $(DEFINES) $(OBJECT)" \
eb480a0b
GS
706 "cf_email=$(EMAIL)" \
707 "d_crypt=$(D_CRYPT)" \
708 "d_mymalloc=$(PERL_MALLOC)" \
709 "libs=$(LIBFILES:f)" \
80252599 710 "incpath=$(CCINCDIR:s/"/\"/)" \
eda5ff31 711 "libperl=$(PERLIMPLIB:f)" \
80252599 712 "libpth=$(CCLIBDIR:s/"/\"/);$(EXTRALIBDIRS:s/"/\"/)" \
eb480a0b
GS
713 "libc=$(LIBC)" \
714 "make=dmake" \
eda5ff31
GS
715 "_o=$(o)" "obj_ext=$(o)" \
716 "_a=$(a)" "lib_ext=$(a)" \
eb480a0b
GS
717 "static_ext=$(STATIC_EXT)" \
718 "dynamic_ext=$(DYNAMIC_EXT)" \
eab60bb1 719 "nonxs_ext=$(NONXS_EXT)" \
eb480a0b 720 "usethreads=$(USE_THREADS)" \
b86a2fa7 721 "usemultiplicity=$(USE_MULTI)" \
80252599
GS
722 "LINK_FLAGS=$(LINK_FLAGS:s/"/\"/)" \
723 "optimize=$(OPTIMIZE:s/"/\"/)"
924b3ec4 724
08aa1457
PP
725#
726# Top targets
727#
728
852c2e52 729all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
eab60bb1 730 $(CAPILIB) $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
08aa1457 731
d56e6723 732$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
08aa1457
PP
733
734#------------------------------------------------------------
735
eb480a0b 736$(GLOBEXE) : perlglob$(o)
08aa1457 737.IF "$(CCTYPE)" == "BORLAND"
80252599 738 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
d56e6723 739 $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \
80252599 740 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
d56e6723
GS
741.ELIF "$(CCTYPE)" == "GCC"
742 $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES)
08aa1457 743.ELSE
dc050285 744 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
d56e6723 745 perlglob$(o) setargv$(o)
08aa1457
PP
746.ENDIF
747
d56e6723 748perlglob$(o) : perlglob.c
08aa1457 749
08aa1457
PP
750config.w32 : $(CFGSH_TMPL)
751 copy $(CFGSH_TMPL) config.w32
752
852c2e52 753.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
08aa1457
PP
754 -del /f config.h
755 copy $(CFGH_TMPL) config.h
756
757..\config.sh : config.w32 $(MINIPERL) config_sh.PL
924b3ec4
GS
758 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
759
760# this target is for when changes to the main config.sh happen
761# edit config.{b,v,g}c and make this target once for each supported
762# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
763regen_config_h:
764 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
765 -cd .. && del /f perl.exe
766 cd .. && perl configpm
767 -del /f $(CFGH_TMPL)
80252599 768 -mkdir $(COREDIR)
e5a95ffb 769 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
924b3ec4 770 rename config.h $(CFGH_TMPL)
08aa1457
PP
771
772$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
773 cd .. && miniperl configpm
774 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
d07c2202
GS
775 $(XCOPY) ..\*.h $(COREDIR)\*.*
776 $(XCOPY) *.h $(COREDIR)\*.*
15e52e56 777 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
d07c2202 778 $(RCOPY) include $(COREDIR)\*.*
e5a95ffb
GS
779 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
780 || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
08aa1457 781
eb480a0b 782$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
08aa1457
PP
783.IF "$(CCTYPE)" == "BORLAND"
784 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
eb480a0b 785 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
d56e6723
GS
786.ELIF "$(CCTYPE)" == "GCC"
787 $(LINK32) -v -o $@ $(LINK_FLAGS) \
eb480a0b 788 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
08aa1457
PP
789.ELSE
790 $(LINK32) -subsystem:console -out:$@ \
eb480a0b 791 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
08aa1457
PP
792.ENDIF
793
eb480a0b
GS
794$(MINIDIR) :
795 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
796
852c2e52 797$(MINICORE_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
798 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c
799
852c2e52 800$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
801 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
802
852c2e52
GS
803# 1. we don't want to rebuild miniperl.exe when config.h changes
804# 2. we don't want to rebuild miniperl.exe with non-default config.h
805$(MINI_OBJ) : $(CORE_NOCFG_H)
806
eb480a0b
GS
807$(WIN32_OBJ) : $(CORE_H)
808$(CORE_OBJ) : $(CORE_H)
eb480a0b
GS
809$(DLL_OBJ) : $(CORE_H)
810$(PERL95_OBJ) : $(CORE_H)
811$(X2P_OBJ) : $(CORE_H)
08aa1457 812
22c35a8c 813perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym makedef.pl
eb480a0b 814 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \
910dfcc8 815 CCTYPE=$(CCTYPE) > perldll.def
08aa1457 816
eb480a0b 817$(PERLDLL): perldll.def $(PERLDLL_OBJ)
08aa1457
PP
818.IF "$(CCTYPE)" == "BORLAND"
819 $(LINK32) -Tpd -ap $(LINK_FLAGS) \
eb480a0b 820 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
08aa1457
PP
821 $@,\n \
822 $(LIBFILES)\n \
823 perldll.def\n)
824 $(IMPLIB) $*.lib $@
d56e6723 825.ELIF "$(CCTYPE)" == "GCC"
3730b96e 826 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
eb480a0b 827 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
d56e6723
GS
828 dlltool --output-lib $(PERLIMPLIB) \
829 --dllname perl.dll \
830 --def perldll.def \
831 --base-file perl.base \
832 --output-exp perl.exp
3730b96e 833 $(LINK32) -mdll -o $@ $(LINK_FLAGS) \
eb480a0b
GS
834 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
835 perl.exp $(LKPOST))
08aa1457
PP
836.ELSE
837 $(LINK32) -dll -def:perldll.def -out:$@ \
eb480a0b 838 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\))
08aa1457 839.ENDIF
d07c2202 840 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
08aa1457
PP
841
842perl.def : $(MINIPERL) makeperldef.pl
843 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
844
845$(MINIMOD) : $(MINIPERL) ..\minimod.pl
846 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
847
eb480a0b
GS
848..\x2p\a2p$(o) : ..\x2p\a2p.c
849 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
850
851..\x2p\hash$(o) : ..\x2p\hash.c
852 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
853
854..\x2p\str$(o) : ..\x2p\str.c
855 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
856
857..\x2p\util$(o) : ..\x2p\util.c
858 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
859
860..\x2p\walk$(o) : ..\x2p\walk.c
861 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
862
863$(X2P) : $(MINIPERL) $(X2P_OBJ)
d07c2202
GS
864 $(MINIPERL) ..\x2p\find2perl.PL
865 $(MINIPERL) ..\x2p\s2p.PL
866.IF "$(CCTYPE)" == "BORLAND"
867 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
868 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
869.ELIF "$(CCTYPE)" == "GCC"
870 $(LINK32) -v -o $@ $(LINK_FLAGS) \
871 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
872.ELSE
873 $(LINK32) -subsystem:console -out:$@ \
422938c9 874 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
d07c2202
GS
875.ENDIF
876
08aa1457
PP
877perlmain.c : runperl.c
878 copy runperl.c perlmain.c
879
d56e6723 880perlmain$(o) : perlmain.c
8957be0a 881 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
08aa1457 882
eb480a0b 883$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
08aa1457
PP
884.IF "$(CCTYPE)" == "BORLAND"
885 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
8957be0a
GS
886 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
887 $(@:s,\,\\),\n \
08aa1457 888 $(PERLIMPLIB) $(LIBFILES)\n)
d56e6723
GS
889.ELIF "$(CCTYPE)" == "GCC"
890 $(LINK32) -o $@ $(LINK_FLAGS) \
eb480a0b 891 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
08aa1457 892.ELSE
d56e6723 893 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
baed7233 894 $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB)
08aa1457
PP
895.ENDIF
896 copy splittree.pl ..
eb480a0b 897 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
898
899.IF "$(CCTYPE)" != "BORLAND"
d56e6723 900.IF "$(CCTYPE)" != "GCC"
e7083a8c 901.IF "$(USE_PERLCRT)" == ""
08aa1457
PP
902
903perl95.c : runperl.c
904 copy runperl.c perl95.c
905
d56e6723 906perl95$(o) : perl95.c
eb480a0b 907 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c
08aa1457 908
d56e6723 909win32sckmt$(o) : win32sck.c
eb480a0b
GS
910 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
911 $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
fb73857a 912
d56e6723 913win32mt$(o) : win32.c
eb480a0b
GS
914 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
915 $(OBJOUT_FLAG)win32mt$(o) win32.c
fb73857a 916
ac4c12e7
GS
917DynaLoadmt$(o) : $(DYNALOADER).c
918 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
919 $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c
fb73857a
PP
920
921$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
eb480a0b 922 $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
baed7233
DL
923 $(LIBBASEFILES) $(PERL95_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) \
924 libcmt.lib
08aa1457
PP
925
926.ENDIF
d56e6723 927.ENDIF
e7083a8c 928.ENDIF
08aa1457
PP
929
930$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
eb480a0b 931 if not exist $(AUTODIR) mkdir $(AUTODIR)
bfab39a2 932 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
08aa1457
PP
933 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
934 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
935 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
936
064a70d4
GS
937.IF "$(OBJECT)" == "-DPERL_OBJECT"
938
6de196ee 939perlCAPI.cpp : $(MINIPERL)
58a50f62
GS
940 $(MINIPERL) GenCAPI.pl $(COREDIR)
941
6de196ee 942perlCAPI$(o) : perlCAPI.cpp
064a70d4 943.IF "$(CCTYPE)" == "BORLAND"
6de196ee 944 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
064a70d4 945.ELIF "$(CCTYPE)" == "GCC"
6de196ee 946 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
064a70d4 947.ELSE
d17537aa 948 $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \
6de196ee 949 $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp
064a70d4 950.ENDIF
58a50f62 951
6de196ee 952$(CAPILIB) : perlCAPI.cpp perlCAPI$(o)
064a70d4 953.IF "$(CCTYPE)" == "BORLAND"
6de196ee 954 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +perlCAPI$(o)
064a70d4 955.ELSE
6de196ee 956 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) perlCAPI$(o)
064a70d4
GS
957.ENDIF
958
959.ENDIF
58a50f62 960
08aa1457
PP
961$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
962 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
963
823edd99
GS
964$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
965 cd $(EXTDIR)\Data\$(*B) && \
966 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
967 cd $(EXTDIR)\Data\$(*B) && $(MAKE)
968
35ef4773 969$(PEEK_DLL): $(PERLEXE) $(PEEK).xs
3967c732
JD
970 cd $(EXTDIR)\Devel\$(*B) && \
971 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
972 cd $(EXTDIR)\Devel\$(*B) && $(MAKE)
973
15e52e56
GS
974$(RE_DLL): $(PERLEXE) $(RE).xs
975 cd $(EXTDIR)\$(*B) && \
976 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
977 cd $(EXTDIR)\$(*B) && $(MAKE)
978
2a321948
GS
979$(B_DLL): $(PERLEXE) $(B).xs
980 cd $(EXTDIR)\$(*B) && \
981 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
982 cd $(EXTDIR)\$(*B) && $(MAKE)
983
a98bd6f4
GS
984$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
985 cd $(EXTDIR)\$(*B) && \
986 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
987 cd $(EXTDIR)\$(*B) && $(MAKE)
988
5d925967
GS
989$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
990 cd $(EXTDIR)\$(*B) && \
991 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
992 cd $(EXTDIR)\$(*B) && $(MAKE)
993
6dead956
GS
994$(POSIX_DLL): $(PERLEXE) $(POSIX).xs
995 cd $(EXTDIR)\$(*B) && \
996 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
997 cd $(EXTDIR)\$(*B) && $(MAKE)
998
5d925967 999$(IO_DLL): $(PERLEXE) $(IO).xs
08aa1457
PP
1000 cd $(EXTDIR)\$(*B) && \
1001 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1002 cd $(EXTDIR)\$(*B) && $(MAKE)
1003
1004$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
1005 cd $(EXTDIR)\$(*B) && \
1006 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1007 cd $(EXTDIR)\$(*B) && $(MAKE)
1008
1009$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
1010 cd $(EXTDIR)\$(*B) && \
1011 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1012 cd $(EXTDIR)\$(*B) && $(MAKE)
1013
1014$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
1015 cd $(EXTDIR)\$(*B) && \
1016 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1017 cd $(EXTDIR)\$(*B) && $(MAKE)
1018
5d925967 1019$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
08aa1457
PP
1020 cd $(EXTDIR)\$(*B) && \
1021 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1022 cd $(EXTDIR)\$(*B) && $(MAKE)
1023
eab60bb1
GS
1024$(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
1025 cd $(EXTDIR)\$(*B) && \
1026 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1027 cd $(EXTDIR)\$(*B) && $(MAKE)
1028
08aa1457 1029doc: $(PERLEXE)
d07c2202 1030 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
b3b61bd8 1031 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
08aa1457
PP
1032 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1033
4a71ed0c 1034utils: $(PERLEXE) $(X2P)
08aa1457 1035 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
66aa1127 1036 copy ..\README.win32 ..\pod\perlwin32.pod
4a71ed0c
GS
1037 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1038 $(PERLEXE) $(PL2BAT) $(UTILS)
08aa1457
PP
1039
1040distclean: clean
dc050285 1041 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
eda5ff31 1042 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
08aa1457 1043 -del /f *.def *.map
eab60bb1
GS
1044 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1045 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
eb480a0b
GS
1046 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1047 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1048 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1049 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1050 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
15e52e56 1051 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
823edd99 1052 -del /f $(LIBDIR)\Data\Dumper.pm
3967c732 1053 -del /f $(LIBDIR)\Devel\Peek.pm
eb480a0b
GS
1054 -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1055 -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1056 -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
823edd99 1057 -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
08aa1457
PP
1058 -del /f $(PODDIR)\*.html
1059 -del /f $(PODDIR)\*.bat
22c35a8c
GS
1060 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
1061 pstruct *.bat
eb480a0b 1062 -cd ..\x2p && del /f find2perl s2p *.bat
d444a431 1063 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
eb480a0b 1064 -del /f $(CONFIGPM)
d444a431
TB
1065.IF "$(PERL95EXE)" != ""
1066 -del /f perl95.c
1067.ENDIF
1068 -del /f bin\*.bat
22c35a8c
GS
1069 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \
1070 pm_to_blib
eb480a0b 1071 -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
d07c2202 1072 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
08aa1457 1073
4a71ed0c 1074install : all installbare installhtml
6dead956 1075
4a71ed0c 1076installbare : utils
d07c2202 1077 $(PERLEXE) ..\installperl
08aa1457
PP
1078.IF "$(PERL95EXE)" != ""
1079 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
1080.ENDIF
1081 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
e5a95ffb 1082 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
6dead956
GS
1083
1084installhtml : doc
08aa1457
PP
1085 $(RCOPY) html\*.* $(INST_HTML)\*.*
1086
1087inst_lib : $(CONFIGPM)
1088 copy splittree.pl ..
eb480a0b 1089 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
1090 $(RCOPY) ..\lib $(INST_LIB)\*.*
1091
dfb634a9 1092minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
08aa1457
PP
1093 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1094.IF "$(CCTYPE)" == "BORLAND"
1095 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1096.ELSE
1097 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1098.ENDIF
1099 attrib -r ..\t\*.*
1100 copy test ..\t
1101 cd ..\t && \
1102 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1103
dfb634a9 1104test-prep : all utils
08aa1457
PP
1105 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1106 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1107.IF "$(CCTYPE)" == "BORLAND"
1108 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1109.ELSE
1110 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1111.ENDIF
32f822de
GS
1112
1113test : test-prep
08aa1457
PP
1114 cd ..\t && $(PERLEXE) -I..\lib harness
1115
32f822de
GS
1116test-notty : test-prep
1117 set PERL_SKIP_TTY_TEST=1 && \
1118 cd ..\t && $(PERLEXE) -I.\lib harness
1119
08aa1457 1120clean :
d56e6723 1121 -@erase miniperlmain$(o)
08aa1457 1122 -@erase $(MINIPERL)
d56e6723
GS
1123 -@erase perlglob$(o)
1124 -@erase perlmain$(o)
6de196ee 1125 -@erase perlCAPI.cpp
08aa1457
PP
1126 -@erase config.w32
1127 -@erase /f config.h
1128 -@erase $(GLOBEXE)
1129 -@erase $(PERLEXE)
1130 -@erase $(PERLDLL)
1131 -@erase $(CORE_OBJ)
eb480a0b 1132 -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
08aa1457
PP
1133 -@erase $(WIN32_OBJ)
1134 -@erase $(DLL_OBJ)
d07c2202 1135 -@erase $(X2P_OBJ)
eda5ff31 1136 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp
d444a431 1137 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
d07c2202 1138 -@erase ..\x2p\*.exe ..\x2p\*.bat
08aa1457
PP
1139 -@erase *.ilk
1140 -@erase *.pdb