Integrate now-non-binary file.
[p5sagit/p5-mst-13.2.git] / win32 / makefile.mk
CommitLineData
a9226780 1#
2# Makefile to build perl on Windows NT using DMAKE.
3# Supported compilers:
4# Visual C++ 2.0 thro 6.0
5# Borland C++ 5.02
6# Mingw32 with gcc-2.95.2 or better **experimental**
7#
8# This is set up to build a perl.exe that runs off a shared library
3789aae2 9# (perl57.dll). Also makes individual DLLs for the XS extensions.
a9226780 10#
11
12##
13## Make sure you read README.win32 *before* you mess with anything here!
14##
15
16##
17## Build configuration. Edit the values below to suit your needs.
18##
19
20#
21# Set these to wherever you want "dmake install" to put your
22# newly built perl.
23#
24INST_DRV *= c:
25INST_TOP *= $(INST_DRV)\perl
26
27#
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.
35#
3789aae2 36INST_VER *= \5.7.0
a9226780 37
38#
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#
50# uncomment to enable multiple interpreters. This is need for fork()
51# emulation.
52#
adb71456 53USE_MULTI *= define
a9226780 54
55#
56# Beginnings of interpreter cloning/threads; still very incomplete.
57# This should be enabled to get the fork() emulation. This needs
58# USE_MULTI as well.
59#
adb71456 60USE_ITHREADS *= define
a9226780 61
62#
63# uncomment to enable the implicit "host" layer for all system calls
64# made by perl. This needs USE_MULTI above. This is also needed to
65# get fork().
66#
adb71456 67USE_IMP_SYS *= define
a9226780 68
69#
aa832f42 70# uncomment to enable the experimental PerlIO I/O subsystem.
71USE_PERLIO = define
72
73#
a9226780 74# WARNING! This option is deprecated and will eventually go away (enable
75# USE_ITHREADS instead).
76#
77# uncomment to enable threads-capabilities. This is incompatible with
78# USE_ITHREADS, and is only here for people who may have come to rely
79# on the experimental Thread support that was in 5.005.
80#
81#USE_5005THREADS *= define
82
83#
84# WARNING! This option is deprecated and will eventually go away (enable
85# USE_MULTI instead).
86#
87# uncomment next line if you want to use the PERL_OBJECT build option.
88# DO NOT ENABLE unless you have legacy code that relies on the C++
89# CPerlObj class that was available in 5.005. This cannot be enabled
90# if you ask for USE_5005THREADS above.
91#
92#USE_OBJECT *= define
93
94#
95# uncomment exactly one of the following
24c23ab4 96#
a9226780 97# Visual C++ 2.x
98#CCTYPE *= MSVC20
99# Visual C++ > 2.x and < 6.x
100#CCTYPE *= MSVC
101# Visual C++ >= 6.x
8c8a4ace 102CCTYPE *= MSVC60
a9226780 103# Borland 5.02 or later
104#CCTYPE *= BORLAND
105# mingw32+gcc-2.95.2 or better
8c8a4ace 106#CCTYPE *= GCC
a9226780 107
108#
109# uncomment this if you are compiling under Windows 95/98 and command.com
110# (not needed if you're running under 4DOS/NT 6.01 or later)
111#IS_WIN95 *= define
112
113#
114# uncomment next line if you want debug version of perl (big,slow)
115# If not enabled, we automatically try to use maximum optimization
116# with all compilers that are known to have a working optimizer.
117#
d9b8e8ae 118CFG *= Debug
a9226780 119
120#
121# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
122# It has patches that fix known bugs in older versions of MSVCRT.DLL.
123# This currently requires VC 5.0 with Service Pack 3 or later.
124# Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/
125# and follow the directions in the package to install.
126#
127# Not recommended if you have VC 6.x and you're not running Windows 9x.
128#
129#USE_PERLCRT *= define
130
131#
132# uncomment to enable linking with setargv.obj under the Visual C
133# compiler. Setting this options enables perl to expand wildcards in
134# arguments, but it may be harder to use alternate methods like
135# File::DosGlob that are more powerful. This option is supported only with
136# Visual C.
137#
138#USE_SETARGV *= define
139
140#
141# if you have the source for des_fcrypt(), uncomment this and make sure the
142# file exists (see README.win32). File should be located in the same
143# directory as this file.
144#
145#CRYPT_SRC *= fcrypt.c
146
147#
148# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
149# library, uncomment this, and make sure the library exists (see README.win32)
150# Specify the full pathname of the library.
151#
152#CRYPT_LIB *= fcrypt.lib
153
154#
155# set this if you wish to use perl's malloc
156# WARNING: Turning this on/off WILL break binary compatibility with extensions
157# you may have compiled with/without it. Be prepared to recompile all
158# extensions if you change the default. Currently, this cannot be enabled
159# if you ask for USE_IMP_SYS above.
160#
161#PERL_MALLOC *= define
162
163#
164# set the install locations of the compiler include/libraries
165# Running VCVARS32.BAT is *required* when using Visual C.
166# Some versions of Visual C don't define MSVCDIR in the environment,
167# so you may have to set CCHOME explicitly (spaces in the path name should
168# not be quoted)
169#
170#CCHOME *= c:\bc5
171#CCHOME *= $(MSVCDIR)
3789aae2 172CCHOME *= c:\gcc-2.95.2
a9226780 173CCINCDIR *= $(CCHOME)\include
174CCLIBDIR *= $(CCHOME)\lib
175
176#
177# Additional compiler flags can be specified here.
178#
179
180#
181# This should normally be disabled. Adding -DPERL_POLLUTE enables support
182# for old symbols by default, at the expense of extreme pollution. You most
183# probably just want to build modules that won't compile with
184# perl Makefile.PL POLLUTE=1
185# instead of enabling this. Please report such modules to the respective
186# authors.
187#
188#BUILDOPT += -DPERL_POLLUTE
189
190#
191# This should normally be disabled. Enabling it will disable the File::Glob
192# implementation of CORE::glob.
193#
194#BUILDOPT += -DPERL_EXTERNAL_GLOB
195
196#
197# This should normally be disabled. Enabling it causes perl to read scripts
198# in text mode (which is the 5.005 behavior) and will break ByteLoader.
199#BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
200
201#
202# specify semicolon-separated list of extra directories that modules will
203# look for libraries (spaces in path names need not be quoted)
204#
205EXTRALIBDIRS *=
206
207#
208# set this to point to cmd.exe (only needed if you use some
209# alternate shell that doesn't grok cmd.exe style commands)
210#
211#SHELL *= g:\winnt\system32\cmd.exe
212
213#
214# set this to your email address (perl will guess a value from
215# from your loginname and your hostname, which may not be right)
216#
217#EMAIL *=
218
219##
220## Build configuration ends.
221##
222
223##################### CHANGE THESE ONLY IF YOU MUST #####################
224
225.IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
226D_CRYPT = undef
227.ELSE
228D_CRYPT = define
229CRYPT_FLAG = -DHAVE_DES_FCRYPT
230.ENDIF
231
232.IF "$(USE_OBJECT)" == "define"
233PERL_MALLOC != undef
234USE_5005THREADS != undef
235USE_MULTI != undef
236USE_IMP_SYS != define
237.ENDIF
238
239PERL_MALLOC *= undef
240
241USE_5005THREADS *= undef
242
243.IF "$(USE_5005THREADS)" == "define"
244USE_ITHREADS != undef
245.ENDIF
246
247.IF "$(USE_IMP_SYS)" == "define"
248PERL_MALLOC != undef
249.ENDIF
250
251USE_MULTI *= undef
252USE_OBJECT *= undef
253USE_ITHREADS *= undef
254USE_IMP_SYS *= undef
aa832f42 255USE_PERLIO *= undef
a9226780 256USE_PERLCRT *= undef
257
258.IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef"
259USE_MULTI != define
260.ENDIF
261
262.IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef"
263USE_MULTI != define
264USE_5005THREADS != undef
265.ENDIF
266
267.IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
268BUILDOPT += -DPERL_IMPLICIT_CONTEXT
269.ENDIF
270
271.IF "$(USE_IMP_SYS)" != "undef"
272BUILDOPT += -DPERL_IMPLICIT_SYS
273.ENDIF
274
275.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
276
277PROCESSOR_ARCHITECTURE *= x86
278
279.IF "$(USE_OBJECT)" == "define"
280ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object
281.ELIF "$(USE_5005THREADS)" == "define"
282ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
283.ELIF "$(USE_MULTI)" == "define"
284ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
285.ELSE
aa832f42 286.IF "$(USE_PERLIO)" == "define"
287ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
288.ELSE
289ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
290.ENDIF
a9226780 291ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
292.ENDIF
293
294.IF "$(USE_ITHREADS)" == "define"
295ARCHNAME !:= $(ARCHNAME)-thread
296.ENDIF
297
298# Visual Studio 98 specific
299.IF "$(CCTYPE)" == "MSVC60"
300
301# VC 6.0 can load the socket dll on demand. Makes the test suite
302# run in about 10% less time.
24c23ab4 303DELAYLOAD *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
a9226780 304
8c8a4ace 305.IF "$(CFG)" == "Debug"
306.ELSE
a9226780 307# VC 6.0 seems capable of compiling perl correctly with optimizations
308# enabled. Anything earlier fails tests.
309CFG *= Optimize
310.ENDIF
8c8a4ace 311.ENDIF
a9226780 312
313ARCHDIR = ..\lib\$(ARCHNAME)
314COREDIR = ..\lib\CORE
315AUTODIR = ..\lib\auto
316LIBDIR = ..\lib
317EXTDIR = ..\ext
318PODDIR = ..\pod
319EXTUTILSDIR = $(LIBDIR)\ExtUtils
320
321#
322INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
323INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
324INST_LIB = $(INST_TOP)$(INST_VER)\lib
325INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
326INST_COREDIR = $(INST_ARCHLIB)\CORE
327INST_POD = $(INST_LIB)\pod
7c82de66 328INST_HTML = $(INST_TOP)$(INST_VER)\html
a9226780 329
330#
331# Programs to compile, build .lib files and link
332#
333
334.USESHELL :
335
336.IF "$(CCTYPE)" == "BORLAND"
337
338CC = bcc32
339LINK32 = tlink32
340LIB32 = tlib /P128
341IMPLIB = implib -c
342RSC = rc
343
344#
345# Options
346#
347INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
24c23ab4 348#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
a9226780 349DEFINES = -DWIN32 $(CRYPT_FLAG)
350LOCDEFS = -DPERLDLL -DPERL_CORE
351SUBSYS = console
352CXX_FLAG = -P
353
354LIBC = cw32mti.lib
355LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib
356
357.IF "$(CFG)" == "Debug"
358OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
359LINK_DBG = -v
360.ELSE
361OPTIMIZE = -O2 -D_RTLDLL
24c23ab4 362LINK_DBG =
a9226780 363.ENDIF
364
365CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
366 $(PCHFLAGS) $(OPTIMIZE)
367LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
368OBJOUT_FLAG = -o
369EXEOUT_FLAG = -e
24c23ab4 370LIBOUT_FLAG =
a9226780 371
372.ELIF "$(CCTYPE)" == "GCC"
373
374CC = gcc
375LINK32 = gcc
376LIB32 = ar rc
377IMPLIB = dlltool
378RSC = rc
379
adb71456 380i = .i
a9226780 381o = .o
382a = .a
383
384#
385# Options
386#
387
24c23ab4 388INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
a9226780 389DEFINES = -DWIN32 $(CRYPT_FLAG)
390LOCDEFS = -DPERLDLL -DPERL_CORE
391SUBSYS = console
392CXX_FLAG = -xc++
393
394LIBC = -lmsvcrt
395
396# same libs as MSVC
397LIBFILES = $(CRYPT_LIB) $(LIBC) \
398 -lmoldname -lkernel32 -luser32 -lgdi32 \
399 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
400 -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \
401 -lwinmm -lversion -lodbc32
402
403.IF "$(CFG)" == "Debug"
99efab12 404OPTIMIZE = -g -O2 -DDEBUGGING
a9226780 405LINK_DBG = -g
406.ELSE
407OPTIMIZE = -g -O2
24c23ab4 408LINK_DBG = -g
a9226780 409.ENDIF
410
411CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
412LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
413OBJOUT_FLAG = -o
414EXEOUT_FLAG = -o
24c23ab4 415LIBOUT_FLAG =
a9226780 416
417# NOTE: we assume that GCC uses MSVCRT.DLL
418BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX
419
420.ELSE
421
422CC = cl
423LINK32 = link
424LIB32 = $(LINK32) -lib
425RSC = rc
426
427#
428# Options
429#
430
431INCLUDES = -I$(COREDIR) -I.\include -I. -I..
24c23ab4 432#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
a9226780 433DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
434LOCDEFS = -DPERLDLL -DPERL_CORE
435SUBSYS = console
436CXX_FLAG = -TP -GX
437
438.IF "$(USE_PERLCRT)" != "define"
439LIBC = msvcrt.lib
440.ELSE
441LIBC = PerlCRT.lib
442.ENDIF
443
444PERLEXE_RES =
445PERLDLL_RES =
446
447.IF "$(CFG)" == "Debug"
448.IF "$(CCTYPE)" == "MSVC20"
449OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
be696b0a 450LINK_DBG = -debug -pdb:none
a9226780 451.ELSE
be696b0a 452# -Zi requires .pdb file(s)
453#OPTIMIZE = -Od -MD -Zi -DDEBUGGING
f70490b9 454#LINK_DBG = -debug
be696b0a 455OPTIMIZE = -O1 -MD -Z7 -DDEBUGGING
456LINK_DBG = -debug -debugtype:both -pdb:none
a9226780 457.ENDIF
a9226780 458.ELSE
459.IF "$(CFG)" == "Optimize"
460# -O1 yields smaller code, which turns out to be faster than -O2
461#OPTIMIZE = -O2 -MD -DNDEBUG
462OPTIMIZE = -O1 -MD -DNDEBUG
463.ELSE
464OPTIMIZE = -Od -MD -DNDEBUG
465.ENDIF
466LINK_DBG = -release
467.ENDIF
468
469LIBBASEFILES = $(CRYPT_LIB) \
470 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
471 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
472 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
473 version.lib odbc32.lib odbccp32.lib
474
475# we add LIBC here, since we may be using PerlCRT.dll
476LIBFILES = $(LIBBASEFILES) $(LIBC)
477
478CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
479 $(PCHFLAGS) $(OPTIMIZE)
480LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
481 -libpath:"$(INST_COREDIR)" \
482 -machine:$(PROCESSOR_ARCHITECTURE)
483OBJOUT_FLAG = -Fo
484EXEOUT_FLAG = -Fe
485LIBOUT_FLAG = /out:
486
487.IF "$(USE_PERLCRT)" != "define"
488BUILDOPT += -DPERL_MSVCRT_READFIX
489.ENDIF
490
491.ENDIF
492
493.IF "$(USE_OBJECT)" == "define"
494OPTIMIZE += $(CXX_FLAG)
495BUILDOPT += -DPERL_OBJECT
496.ENDIF
497
498CFLAGS_O = $(CFLAGS) $(BUILDOPT)
499
500# used to allow local linking flags that are not propogated into Config.pm,
501# currently unused
502# -- BKS, 12-12-1999
503PRIV_LINK_FLAGS *=
504BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
505
506#################### do not edit below this line #######################
507############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
508
509o *= .obj
510a *= .lib
511
512LKPRE = INPUT (
513LKPOST = )
514
515#
516# Rules
24c23ab4 517#
a9226780 518
adb71456 519.SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
a9226780 520
521.c$(o):
522 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
523
adb71456 524.c.i:
f70490b9 525 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
adb71456 526
a9226780 527.y.c:
528 $(NOOP)
529
530$(o).dll:
531.IF "$(CCTYPE)" == "BORLAND"
532 $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
533 $(IMPLIB) $(*B).lib $@
534.ELIF "$(CCTYPE)" == "GCC"
535 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
536 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
537.ELSE
538 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
24c23ab4 539 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
a9226780 540.ENDIF
541
542.rc.res:
543 $(RSC) -i.. $<
544
545#
546# various targets
547MINIPERL = ..\miniperl.exe
548MINIDIR = .\mini
549PERLEXE = ..\perl.exe
550WPERLEXE = ..\wperl.exe
551GLOBEXE = ..\perlglob.exe
552CONFIGPM = ..\lib\Config.pm
553MINIMOD = ..\lib\ExtUtils\Miniperl.pm
554X2P = ..\x2p\a2p.exe
555
24c23ab4 556# Nominate a target which causes extensions to be re-built
a77df51f 557# This used to be $(PERLEXE), but at worst it is the .dll that they depend
558# on and really only the interface - i.e. the .def file used to export symbols
559# from the .dll
560PERLDEP = perldll.def
561
562
a9226780 563PL2BAT = bin\pl2bat.pl
564GLOBBAT = bin\perlglob.bat
565
566UTILS = \
567 ..\utils\h2ph \
568 ..\utils\splain \
569 ..\utils\dprofpp \
570 ..\utils\perlbug \
571 ..\utils\pl2pm \
572 ..\utils\c2ph \
573 ..\utils\h2xs \
574 ..\utils\perldoc \
575 ..\utils\perlcc \
576 ..\pod\checkpods \
577 ..\pod\pod2html \
578 ..\pod\pod2latex \
579 ..\pod\pod2man \
580 ..\pod\pod2text \
581 ..\pod\pod2usage \
582 ..\pod\podchecker \
583 ..\pod\podselect \
584 ..\x2p\find2perl \
585 ..\x2p\s2p \
586 bin\exetype.pl \
587 bin\runperl.pl \
588 bin\pl2bat.pl \
589 bin\perlglob.pl \
590 bin\search.pl
591
592.IF "$(CCTYPE)" == "BORLAND"
593
594CFGSH_TMPL = config.bc
595CFGH_TMPL = config_H.bc
596
597.ELIF "$(CCTYPE)" == "GCC"
598
599CFGSH_TMPL = config.gc
600CFGH_TMPL = config_H.gc
3789aae2 601PERLIMPLIB = ..\libperl57$(a)
a9226780 602
603.ELSE
604
605CFGSH_TMPL = config.vc
606CFGH_TMPL = config_H.vc
607
608.ENDIF
609
7d4dff66 610# makedef.pl must be updated if this changes, and this should normally
611# only change when there is an incompatible revision of the public API.
612# XXX so why did we change it from perl56 to perl57?
3789aae2 613PERLIMPLIB *= ..\perl57$(a)
614PERLDLL = ..\perl57.dll
a9226780 615
616XCOPY = xcopy /f /r /i /d
617RCOPY = xcopy /f /r /i /e /d
618NOOP = @echo
619
620#
621# filenames given to xsubpp must have forward slashes (since it puts
622# full pathnames in #line strings)
623XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
624 -C++ -prototypes
625
626MICROCORE_SRC = \
627 ..\av.c \
628 ..\deb.c \
629 ..\doio.c \
630 ..\doop.c \
631 ..\dump.c \
632 ..\globals.c \
633 ..\gv.c \
634 ..\hv.c \
635 ..\mg.c \
636 ..\op.c \
637 ..\perl.c \
638 ..\perlapi.c \
639 ..\perly.c \
640 ..\pp.c \
641 ..\pp_ctl.c \
642 ..\pp_hot.c \
643 ..\pp_sys.c \
644 ..\regcomp.c \
645 ..\regexec.c \
646 ..\run.c \
647 ..\scope.c \
648 ..\sv.c \
649 ..\taint.c \
650 ..\toke.c \
651 ..\universal.c \
652 ..\utf8.c \
653 ..\util.c \
654 ..\xsutils.c
655
656EXTRACORE_SRC += perllib.c
657
658.IF "$(PERL_MALLOC)" == "define"
659EXTRACORE_SRC += ..\malloc.c
660.ENDIF
661
662.IF "$(USE_OBJECT)" != "define"
663EXTRACORE_SRC += ..\perlio.c
664.ENDIF
665
666WIN32_SRC = \
667 .\win32.c \
668 .\win32sck.c \
24c23ab4 669 .\win32thread.c
a9226780 670
671.IF "$(CRYPT_SRC)" != ""
672WIN32_SRC += .\$(CRYPT_SRC)
673.ENDIF
674
675DLL_SRC = $(DYNALOADER).c
676
677X2P_SRC = \
678 ..\x2p\a2p.c \
679 ..\x2p\hash.c \
680 ..\x2p\str.c \
681 ..\x2p\util.c \
682 ..\x2p\walk.c
683
684CORE_NOCFG_H = \
685 ..\av.h \
686 ..\cop.h \
687 ..\cv.h \
688 ..\dosish.h \
689 ..\embed.h \
690 ..\form.h \
691 ..\gv.h \
692 ..\handy.h \
693 ..\hv.h \
694 ..\iperlsys.h \
695 ..\mg.h \
696 ..\nostdio.h \
697 ..\op.h \
698 ..\opcode.h \
699 ..\perl.h \
700 ..\perlapi.h \
701 ..\perlsdio.h \
702 ..\perlsfio.h \
703 ..\perly.h \
704 ..\pp.h \
705 ..\proto.h \
706 ..\regexp.h \
707 ..\scope.h \
708 ..\sv.h \
709 ..\thread.h \
710 ..\unixish.h \
711 ..\utf8.h \
712 ..\util.h \
713 ..\warnings.h \
714 ..\XSUB.h \
715 ..\EXTERN.h \
716 ..\perlvars.h \
717 ..\intrpvar.h \
718 ..\thrdvar.h \
719 .\include\dirent.h \
720 .\include\netdb.h \
721 .\include\sys\socket.h \
722 .\win32.h
723
724CORE_H = $(CORE_NOCFG_H) .\config.h
725
726MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
727CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
728WIN32_OBJ = $(WIN32_SRC:db:+$(o))
729MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
730MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
731MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
732DLL_OBJ = $(DLL_SRC:db:+$(o))
733X2P_OBJ = $(X2P_SRC:db:+$(o))
734
735PERLDLL_OBJ = $(CORE_OBJ)
736PERLEXE_OBJ = perlmain$(o)
737
738PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
739
740.IF "$(USE_SETARGV)" != ""
741SETARGV_OBJ = setargv$(o)
742.ENDIF
743
744DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
745 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
f70490b9 746 Sys/Hostname Storable Filter/Util/Call Encode \
160d5bf4 747 Digest/MD5 PerlIO/Scalar MIME/Base64
a9226780 748STATIC_EXT = DynaLoader
749NONXS_EXT = Errno
750
751DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
752SOCKET = $(EXTDIR)\Socket\Socket
753FCNTL = $(EXTDIR)\Fcntl\Fcntl
754OPCODE = $(EXTDIR)\Opcode\Opcode
755SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
756IO = $(EXTDIR)\IO\IO
757POSIX = $(EXTDIR)\POSIX\POSIX
758ATTRS = $(EXTDIR)\attrs\attrs
759THREAD = $(EXTDIR)\Thread\Thread
760B = $(EXTDIR)\B\B
761RE = $(EXTDIR)\re\re
762DUMPER = $(EXTDIR)\Data\Dumper\Dumper
8c0134a8 763SCALAR = $(EXTDIR)\PerlIO\Scalar\Scalar
a9226780 764ERRNO = $(EXTDIR)\Errno\Errno
765PEEK = $(EXTDIR)\Devel\Peek\Peek
766BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
767DPROF = $(EXTDIR)\Devel\DProf\DProf
768GLOB = $(EXTDIR)\File\Glob\Glob
769HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
770STORABLE = $(EXTDIR)\Storable\Storable
5e506771 771FILTER = $(EXTDIR)\Filter\Util\Call\Call
24c23ab4 772ENCODE = $(EXTDIR)\Encode\Encode
f70490b9 773MD5 = $(EXTDIR)\Digest\MD5\MD5
160d5bf4 774MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
a9226780 775
776SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
777FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
778OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
779SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
780IO_DLL = $(AUTODIR)\IO\IO.dll
781POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
782ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
783THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
784B_DLL = $(AUTODIR)\B\B.dll
785DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
8c0134a8 786SCALAR_DLL = $(AUTODIR)\PerlIO\Scalar\Scalar.dll
a9226780 787PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
788RE_DLL = $(AUTODIR)\re\re.dll
789BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
790DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
791GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
792HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
793STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
d9b8e8ae 794FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
795ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
f70490b9 796MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
160d5bf4 797MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
a9226780 798
799ERRNO_PM = $(LIBDIR)\Errno.pm
800
801EXTENSION_C = \
802 $(SOCKET).c \
803 $(FCNTL).c \
804 $(OPCODE).c \
805 $(SDBM_FILE).c \
806 $(IO).c \
807 $(POSIX).c \
808 $(ATTRS).c \
809 $(THREAD).c \
810 $(RE).c \
811 $(DUMPER).c \
7975e2ef 812 $(SCALAR).c \
a9226780 813 $(PEEK).c \
814 $(B).c \
815 $(BYTELOADER).c \
816 $(DPROF).c \
817 $(GLOB).c \
818 $(HOSTNAME).c \
a3ee43e0 819 $(STORABLE).c \
d9b8e8ae 820 $(FILTER).c \
f70490b9 821 $(ENCODE).c \
160d5bf4 822 $(MD5).c \
823 $(MIMEBASE64).c
a9226780 824
825EXTENSION_DLL = \
826 $(SOCKET_DLL) \
827 $(FCNTL_DLL) \
828 $(OPCODE_DLL) \
829 $(SDBM_FILE_DLL)\
830 $(IO_DLL) \
831 $(POSIX_DLL) \
832 $(ATTRS_DLL) \
833 $(DUMPER_DLL) \
8c0134a8 834 $(SCALAR_DLL) \
a9226780 835 $(PEEK_DLL) \
836 $(B_DLL) \
837 $(RE_DLL) \
838 $(THREAD_DLL) \
839 $(BYTELOADER_DLL) \
840 $(DPROF_DLL) \
841 $(GLOB_DLL) \
842 $(HOSTNAME_DLL) \
a3ee43e0 843 $(STORABLE_DLL) \
d9b8e8ae 844 $(FILTER_DLL) \
f70490b9 845 $(ENCODE_DLL) \
160d5bf4 846 $(MD5_DLL) \
847 $(MIMEBASE64_DLL)
a9226780 848
849EXTENSION_PM = \
850 $(ERRNO_PM)
851
852POD2HTML = $(PODDIR)\pod2html
853POD2MAN = $(PODDIR)\pod2man
854POD2LATEX = $(PODDIR)\pod2latex
855POD2TEXT = $(PODDIR)\pod2text
856
857# vars must be separated by "\t+~\t+", since we're using the tempfile
858# version of config_sh.pl (we were overflowing someone's buffer by
859# trying to fit them all on the command line)
860# -- BKS 10-17-1999
861CFG_VARS = \
862 INST_DRV=$(INST_DRV) ~ \
863 INST_TOP=$(INST_TOP:s/\/\\/) ~ \
864 INST_VER=$(INST_VER:s/\/\\/) ~ \
865 INST_ARCH=$(INST_ARCH) ~ \
866 archname=$(ARCHNAME) ~ \
867 cc=$(CC) ~ \
fd826df2 868 ld=$(LINK32) ~ \
a9226780 869 ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
870 cf_email=$(EMAIL) ~ \
871 d_crypt=$(D_CRYPT) ~ \
872 d_mymalloc=$(PERL_MALLOC) ~ \
873 libs=$(LIBFILES:f) ~ \
874 incpath=$(CCINCDIR:s/\/\\/) ~ \
875 libperl=$(PERLIMPLIB:f) ~ \
876 libpth=$(CCLIBDIR:s/\/\\/);$(EXTRALIBDIRS:s/\/\\/) ~ \
877 libc=$(LIBC) ~ \
878 make=dmake ~ \
879 _o=$(o) obj_ext=$(o) ~ \
880 _a=$(a) lib_ext=$(a) ~ \
881 static_ext=$(STATIC_EXT) ~ \
882 dynamic_ext=$(DYNAMIC_EXT) ~ \
883 nonxs_ext=$(NONXS_EXT) ~ \
884 use5005threads=$(USE_5005THREADS) ~ \
885 useithreads=$(USE_ITHREADS) ~ \
886 usethreads=$(USE_5005THREADS) ~ \
887 usemultiplicity=$(USE_MULTI) ~ \
aa832f42 888 useperlio=$(USE_PERLIO) ~ \
a9226780 889 LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \
890 optimize=$(OPTIMIZE)
891
892#
893# set up targets varying between Win95 and WinNT builds
894#
895
896.IF "$(IS_WIN95)" == "define"
897MK2 = .\makefile.95
898RIGHTMAKE = __switch_makefiles
899NOOP = @rem
900.ELSE
901MK2 = __not_needed
24c23ab4 902RIGHTMAKE =
a9226780 903.ENDIF
904
905#
906# Top targets
907#
908
909all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
910 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
911 $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
912
913$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
914
915#----------------------------------------------------------------
916
917#-------------------- BEGIN Win95 SPECIFIC ----------------------
918
919# this target is a jump-off point for Win95
920# 1. it switches to the Win95-specific makefile if it exists
921# (__do_switch_makefiles)
922# 2. it prints a message when the Win95-specific one finishes (__done)
923# 3. it then kills this makefile by trying to make __no_such_target
924
925__switch_makefiles: __do_switch_makefiles __done __no_such_target
926
927__do_switch_makefiles:
928.IF "$(NOTFIRST)" != "true"
929 if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true
930.ELSE
931 $(NOOP)
932.ENDIF
933
934.IF "$(NOTFIRST)" != "true"
935__done:
936 @echo Build process complete. Ignore any errors after this message.
937 @echo Run "dmake test" to test and "dmake install" to install
938
939.ELSE
940# dummy targets for Win95-specific makefile
941
942__done:
943 $(NOOP)
944
945__no_such_target:
946 $(NOOP)
947
948.ENDIF
949
950# This target is used to generate the new makefile (.\makefile.95) for Win95
951
952.\makefile.95: .\makefile.mk
953 $(MINIPERL) genmk95.pl makefile.mk $(MK2)
954
955#--------------------- END Win95 SPECIFIC ---------------------
956
957# a blank target for when builds don't need to do certain things
24c23ab4 958# this target added for Win95 port but used to keep the WinNT port able to
a9226780 959# use this file
960__not_needed:
961 $(NOOP)
962
963$(GLOBEXE) : perlglob$(o)
964.IF "$(CCTYPE)" == "BORLAND"
965 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
966 $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \
967 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
968.ELIF "$(CCTYPE)" == "GCC"
969 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
970.ELSE
971 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
24c23ab4 972 perlglob$(o) setargv$(o)
a9226780 973.ENDIF
974
975perlglob$(o) : perlglob.c
976
977config.w32 : $(CFGSH_TMPL)
978 copy $(CFGSH_TMPL) config.w32
979
980.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
981 -del /f config.h
982 copy $(CFGH_TMPL) config.h
983
984..\config.sh : config.w32 $(MINIPERL) config_sh.PL
985 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
986 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
987
988# this target is for when changes to the main config.sh happen
989# edit config.{b,v,g}c and make this target once for each supported
990# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
991regen_config_h:
992 perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
993 $(CFGSH_TMPL) > ..\config.sh
994 -cd .. && del /f perl.exe
995 cd .. && perl configpm
996 -del /f $(CFGH_TMPL)
997 -mkdir $(COREDIR)
998 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
999 rename config.h $(CFGH_TMPL)
1000
1001$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
1002 cd .. && miniperl configpm
1003 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
1004 $(XCOPY) ..\*.h $(COREDIR)\*.*
1005 $(XCOPY) *.h $(COREDIR)\*.*
1006 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
1007 $(RCOPY) include $(COREDIR)\*.*
1008 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
1009 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
1010
1011$(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS)
1012.IF "$(CCTYPE)" == "BORLAND"
1013 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1014 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
1015.ELIF "$(CCTYPE)" == "GCC"
1016 $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \
24c23ab4 1017 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
a9226780 1018.ELSE
1019 $(LINK32) -subsystem:console -out:$@ \
1020 @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
1021.ENDIF
1022
1023$(MINIDIR) :
1024 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1025
1026$(MINICORE_OBJ) : $(CORE_NOCFG_H)
1027 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*B).c
1028
1029$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1030 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
1031
1032# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1033# rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1034# unless the .IF is true), so instead we use a .ELSE with the default.
1035# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1036
1037perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
1038.IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
1039 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1040.ELSE
1041 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
1042.ENDIF
1043
1044# 1. we don't want to rebuild miniperl.exe when config.h changes
1045# 2. we don't want to rebuild miniperl.exe with non-default config.h
1046$(MINI_OBJ) : $(CORE_NOCFG_H)
1047
1048$(WIN32_OBJ) : $(CORE_H)
1049$(CORE_OBJ) : $(CORE_H)
1050$(DLL_OBJ) : $(CORE_H)
1051$(X2P_OBJ) : $(CORE_H)
1052
1053perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
1054 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1055 $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
1056
1057$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
1058.IF "$(CCTYPE)" == "BORLAND"
1059 $(LINK32) -Tpd -ap $(BLINK_FLAGS) \
1060 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
1061 $@,\n \
1062 $(LIBFILES)\n \
1063 perldll.def\n)
1064 $(IMPLIB) $*.lib $@
1065.ELIF "$(CCTYPE)" == "GCC"
1066 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
1067 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
1068 dlltool --output-lib $(PERLIMPLIB) \
1069 --dllname $(PERLDLL:b).dll \
1070 --def perldll.def \
1071 --base-file perl.base \
1072 --output-exp perl.exp
1073 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1074 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
1075 perl.exp $(LKPOST))
1076.ELSE
1077 $(LINK32) -dll -def:perldll.def -out:$@ \
1078 @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \
1079 $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\))
1080.ENDIF
1081 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1082
1083$(MINIMOD) : $(MINIPERL) ..\minimod.pl
1084 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
1085
1086..\x2p\a2p$(o) : ..\x2p\a2p.c
1087 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
1088
1089..\x2p\hash$(o) : ..\x2p\hash.c
1090 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
1091
1092..\x2p\str$(o) : ..\x2p\str.c
1093 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
1094
1095..\x2p\util$(o) : ..\x2p\util.c
1096 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1097
1098..\x2p\walk$(o) : ..\x2p\walk.c
1099 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1100
1101$(X2P) : $(MINIPERL) $(X2P_OBJ)
1102 $(MINIPERL) ..\x2p\find2perl.PL
1103 $(MINIPERL) ..\x2p\s2p.PL
1104.IF "$(CCTYPE)" == "BORLAND"
1105 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1106 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
1107.ELIF "$(CCTYPE)" == "GCC"
1108 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1109 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
1110.ELSE
1111 $(LINK32) -subsystem:console -out:$@ \
1112 @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
1113.ENDIF
1114
24c23ab4 1115perlmain.c : runperl.c
a9226780 1116 copy runperl.c perlmain.c
1117
1118perlmain$(o) : perlmain.c
1119 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
1120
1121$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1122.IF "$(CCTYPE)" == "BORLAND"
1123 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1124 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
1125 $(@:s,\,\\),\n \
1126 $(PERLIMPLIB) $(LIBFILES)\n)
1127.ELIF "$(CCTYPE)" == "GCC"
1128 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1129 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
1130.ELSE
1131 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1132 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
1133.ENDIF
1134 copy $(PERLEXE) $(WPERLEXE)
1135 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
24c23ab4 1136 copy splittree.pl ..
a9226780 1137 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1138
1139$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
1140 if not exist $(AUTODIR) mkdir $(AUTODIR)
1141 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
1142 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
1143 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
1144 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
1145 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
1146 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
1147
1148$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
1149 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
1150
a77df51f 1151$(DUMPER_DLL): $(PERLDEP) $(DUMPER).xs
a9226780 1152 cd $(EXTDIR)\Data\$(*B) && \
1153 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1154 cd $(EXTDIR)\Data\$(*B) && $(MAKE)
1155
8c0134a8 1156$(SCALAR_DLL): $(PERLDEP) $(SCALAR).xs
1157 cd $(EXTDIR)\PerlIO\$(*B) && \
1158 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1159 cd $(EXTDIR)\PerlIO\$(*B) && $(MAKE)
1160
a77df51f 1161$(DPROF_DLL): $(PERLDEP) $(DPROF).xs
a9226780 1162 cd $(EXTDIR)\Devel\$(*B) && \
1163 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1164 cd $(EXTDIR)\Devel\$(*B) && $(MAKE)
1165
a77df51f 1166$(GLOB_DLL): $(PERLDEP) $(GLOB).xs
a9226780 1167 cd $(EXTDIR)\File\$(*B) && \
1168 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1169 cd $(EXTDIR)\File\$(*B) && $(MAKE)
1170
a77df51f 1171$(PEEK_DLL): $(PERLDEP) $(PEEK).xs
a9226780 1172 cd $(EXTDIR)\Devel\$(*B) && \
1173 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1174 cd $(EXTDIR)\Devel\$(*B) && $(MAKE)
1175
a77df51f 1176$(RE_DLL): $(PERLDEP) $(RE).xs
a9226780 1177 cd $(EXTDIR)\$(*B) && \
1178 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1179 cd $(EXTDIR)\$(*B) && $(MAKE)
1180
a77df51f 1181$(B_DLL): $(PERLDEP) $(B).xs
a9226780 1182 cd $(EXTDIR)\$(*B) && \
1183 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1184 cd $(EXTDIR)\$(*B) && $(MAKE)
1185
a77df51f 1186$(THREAD_DLL): $(PERLDEP) $(THREAD).xs
a9226780 1187 cd $(EXTDIR)\$(*B) && \
1188 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1189 cd $(EXTDIR)\$(*B) && $(MAKE)
1190
a77df51f 1191$(ATTRS_DLL): $(PERLDEP) $(ATTRS).xs
a9226780 1192 cd $(EXTDIR)\$(*B) && \
1193 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1194 cd $(EXTDIR)\$(*B) && $(MAKE)
1195
a77df51f 1196$(POSIX_DLL): $(PERLDEP) $(POSIX).xs
a9226780 1197 cd $(EXTDIR)\$(*B) && \
1198 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1199 cd $(EXTDIR)\$(*B) && $(MAKE)
1200
a77df51f 1201$(IO_DLL): $(PERLDEP) $(IO).xs
a9226780 1202 cd $(EXTDIR)\$(*B) && \
1203 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1204 cd $(EXTDIR)\$(*B) && $(MAKE)
1205
a77df51f 1206$(SDBM_FILE_DLL) : $(PERLDEP) $(SDBM_FILE).xs
a9226780 1207 cd $(EXTDIR)\$(*B) && \
1208 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1209 cd $(EXTDIR)\$(*B) && $(MAKE)
1210
a77df51f 1211$(FCNTL_DLL): $(PERLDEP) $(FCNTL).xs
a9226780 1212 cd $(EXTDIR)\$(*B) && \
1213 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1214 cd $(EXTDIR)\$(*B) && $(MAKE)
1215
a77df51f 1216$(OPCODE_DLL): $(PERLDEP) $(OPCODE).xs
a9226780 1217 cd $(EXTDIR)\$(*B) && \
1218 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1219 cd $(EXTDIR)\$(*B) && $(MAKE)
1220
a77df51f 1221$(SOCKET_DLL): $(PERLDEP) $(SOCKET).xs
a9226780 1222 cd $(EXTDIR)\$(*B) && \
1223 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1224 cd $(EXTDIR)\$(*B) && $(MAKE)
1225
a77df51f 1226$(HOSTNAME_DLL): $(PERLDEP) $(HOSTNAME).xs
a9226780 1227 cd $(EXTDIR)\Sys\$(*B) && \
1228 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1229 cd $(EXTDIR)\Sys\$(*B) && $(MAKE)
1230
a77df51f 1231$(BYTELOADER_DLL): $(PERLDEP) $(BYTELOADER).xs
a9226780 1232 cd $(EXTDIR)\$(*B) && \
1233 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1234 cd $(EXTDIR)\$(*B) && $(MAKE)
1235
a77df51f 1236$(ENCODE_DLL): $(PERLDEP) $(ENCODE).xs
d9b8e8ae 1237 cd $(EXTDIR)\$(*B) && \
1238 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1239 cd $(EXTDIR)\$(*B) && $(MAKE)
1240
a77df51f 1241$(STORABLE_DLL): $(PERLDEP) $(STORABLE).xs
a9226780 1242 cd $(EXTDIR)\$(*B) && \
1243 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1244 cd $(EXTDIR)\$(*B) && $(MAKE)
1245
a77df51f 1246$(FILTER_DLL): $(PERLDEP) $(FILTER).xs
5e506771 1247 cd $(EXTDIR)\Filter\Util\Call && \
0727cc21 1248 ..\..\..\..\miniperl -I..\..\..\..\lib Makefile.PL INSTALLDIRS=perl
5e506771 1249 cd $(EXTDIR)\Filter\Util\Call && $(MAKE)
a3ee43e0 1250
160d5bf4 1251$(MD5_DLL): $(PERLDEP) $(MD5).xs
f70490b9 1252 cd $(EXTDIR)\Digest\MD5 && \
1253 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1254 cd $(EXTDIR)\Digest\MD5 && $(MAKE)
1255
160d5bf4 1256$(MIMEBASE64_DLL): $(PERLDEP) $(MIMEBASE64).xs
1257 cd $(EXTDIR)\Digest\Mime\Base64 && \
1258 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1259 cd $(EXTDIR)\Digest\MIMEBASE64 && $(MAKE)
1260
a77df51f 1261$(ERRNO_PM): $(PERLDEP) $(ERRNO)_pm.PL
a9226780 1262 cd $(EXTDIR)\$(*B) && \
1263 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1264 cd $(EXTDIR)\$(*B) && $(MAKE)
1265
1266doc: $(PERLEXE)
1267 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1268 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1269 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1270
1271utils: $(PERLEXE) $(X2P)
1272 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
b5ec9dce 1273 copy ..\README.aix ..\pod\perlaix.pod
a9226780 1274 copy ..\README.amiga ..\pod\perlamiga.pod
1275 copy ..\README.cygwin ..\pod\perlcygwin.pod
1276 copy ..\README.dos ..\pod\perldos.pod
b5ec9dce 1277 copy ..\README.epoc ..\pod\perlepoc.pod
a9226780 1278 copy ..\README.hpux ..\pod\perlhpux.pod
1279 copy ..\README.machten ..\pod\perlmachten.pod
1280 copy ..\README.os2 ..\pod\perlos2.pod
b5ec9dce 1281 copy ..\README.os390 ..\pod\perlos390.pod
dc5c060f 1282 copy ..\README.vmesa ..\pod\perlvmesa.pod
1283 copy ..\README.bs2000 ..\pod\perlbs2000.pod
b5ec9dce 1284 copy ..\README.solaris ..\pod\perlsolaris.pod
a9226780 1285 copy ..\vms\perlvms.pod ..\pod\perlvms.pod
b5ec9dce 1286 copy ..\README.vos ..\pod\perlvos.pod
1287 copy ..\README.win32 ..\pod\perlwin32.pod
a9226780 1288 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1289 cd ..\lib && $(PERLEXE) lib_pm.PL
1290 $(PERLEXE) $(PL2BAT) $(UTILS)
1291
1292distclean: clean
1293 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1294 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
1295 -del /f *.def *.map
1296 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1297 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1298 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1299 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1300 -del /f $(LIBDIR)\XSLoader.pm
1301 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1302 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1303 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1304 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1305 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
8c0134a8 1306 -del /f $(LIBDIR)\PerlIO\Scalar.pm
a9226780 1307 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1308 -del /f $(LIBDIR)\File\Glob.pm
1309 -del /f $(LIBDIR)\Storable.pm
5e506771 1310 -del /f $(LIBDIR)\Filter\Util\Call\Call.pm
f70490b9 1311 -del /f $(LIBDIR)\Digest\MD5.pm
160d5bf4 1312 -del /f $(LIBDIR)\MIME\Base64\Base64.pm
1313 -del /f $(LIBDIR)\MIME\Base64\QuotedPrint.pm
a9226780 1314 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1315 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1316 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
1317 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
5e506771 1318 -if exist $(LIBDIR)\Filter\Util\Call rmdir /s /q $(LIBDIR)\Filter\Util\Call || rmdir /s $(LIBDIR)\Filter
1319 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util || rmdir /s $(LIBDIR)\Filter
160d5bf4 1320 -if exist $(LIBDIR)\Digest\MD5 rmdir /s /q $(LIBDIR)\Digest\MD5 || rmdir /s $(LIBDIR)\Digest\MD5
f70490b9 1321 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest || rmdir /s $(LIBDIR)\Digest
160d5bf4 1322 -if exist $(LIBDIR)\MIME\Base64 rmdir /s /q $(LIBDIR)\MIME\Base64 || rmdir /s $(LIBDIR)\MIME\Base64
1323 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME || rmdir /s $(LIBDIR)\MIME
a9226780 1324 -del /f $(PODDIR)\*.html
1325 -del /f $(PODDIR)\*.bat
1326 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
1327 dprofpp *.bat
1328 -cd ..\x2p && del /f find2perl s2p *.bat
1329 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1330 -del /f $(CONFIGPM)
1331 -del /f bin\*.bat
1332 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \
1333 pm_to_blib
1334 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
1335 -if exist $(COREDIR) rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
1336
1337install : all installbare installhtml
1338
1339installbare : $(RIGHTMAKE) utils
1340 $(PERLEXE) ..\installperl
1341 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1342 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1343 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1344
1345installhtml : doc
1346 $(RCOPY) html\*.* $(INST_HTML)\*.*
1347
1348inst_lib : $(CONFIGPM)
24c23ab4 1349 copy splittree.pl ..
a9226780 1350 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1351 $(RCOPY) ..\lib $(INST_LIB)\*.*
1352
1353minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1354 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1355.IF "$(CCTYPE)" == "BORLAND"
1356 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1357.ELSE
1358 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1359.ENDIF
1360 attrib -r ..\t\*.*
1361 copy test ..\t
1362 cd ..\t && \
1363 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1364
1365test-prep : all utils
1366 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1367 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1368.IF "$(CCTYPE)" == "BORLAND"
1369 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1370.ELSE
1371 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1372.ENDIF
1373
1374test : $(RIGHTMAKE) test-prep
1375 cd ..\t && $(PERLEXE) -I..\lib harness
1376
1377test-notty : test-prep
1378 set PERL_SKIP_TTY_TEST=1 && \
1379 cd ..\t && $(PERLEXE) -I.\lib harness
1380
1381test-wide : test-prep
1382 set HARNESS_PERL_SWITCHES=-C && \
1383 cd ..\t && $(PERLEXE) -I..\lib harness
1384
1385test-wide-notty : test-prep
1386 set PERL_SKIP_TTY_TEST=1 && \
1387 set HARNESS_PERL_SWITCHES=-C && \
1388 cd ..\t && $(PERLEXE) -I..\lib harness
1389
24c23ab4 1390clean :
a9226780 1391 -@erase miniperlmain$(o)
1392 -@erase $(MINIPERL)
1393 -@erase perlglob$(o)
1394 -@erase perlmain$(o)
1395 -@erase config.w32
1396 -@erase /f config.h
1397 -@erase $(GLOBEXE)
1398 -@erase $(PERLEXE)
1399 -@erase $(WPERLEXE)
1400 -@erase $(PERLDLL)
1401 -@erase $(CORE_OBJ)
1402 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
1403 -@erase $(WIN32_OBJ)
1404 -@erase $(DLL_OBJ)
1405 -@erase $(X2P_OBJ)
1406 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1407 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1408 -@erase ..\x2p\*.exe ..\x2p\*.bat
1409 -@erase *.ilk
1410 -@erase *.pdb
1411
1412# Handy way to run perlbug -ok without having to install and run the
1413# installed perlbug. We don't re-run the tests here - we trust the user.
1414# Please *don't* use this unless all tests pass.
1415# If you want to report test failures, use "dmake nok" instead.
1416ok: utils
1417 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1418
1419okfile: utils
1420 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
24c23ab4 1421
a9226780 1422nok: utils
1423 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
24c23ab4 1424
a9226780 1425nokfile: utils
1426 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok