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