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