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