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