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