Implement crlf layer - not ready for merge.
[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#
7d4dff66 53#USE_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#
60#USE_ITHREADS *= define
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#
67#USE_IMP_SYS *= define
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
92#
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 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 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.
293DELAYLOAD *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
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)"
335#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
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
349LINK_DBG =
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
357LIBOUT_FLAG =
358
359.ELIF "$(CCTYPE)" == "GCC"
360
361CC = gcc
362LINK32 = gcc
363LIB32 = ar rc
364IMPLIB = dlltool
365RSC = rc
366
367o = .o
368a = .a
369
370#
371# Options
372#
373
374INCLUDES = -I$(COREDIR) -I.\include -I. -I..
375DEFINES = -DWIN32 $(CRYPT_FLAG)
376LOCDEFS = -DPERLDLL -DPERL_CORE
377SUBSYS = console
378CXX_FLAG = -xc++
379
380LIBC = -lmsvcrt
381
382# same libs as MSVC
383LIBFILES = $(CRYPT_LIB) $(LIBC) \
384 -lmoldname -lkernel32 -luser32 -lgdi32 \
385 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
386 -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \
387 -lwinmm -lversion -lodbc32
388
389.IF "$(CFG)" == "Debug"
99efab12 390OPTIMIZE = -g -O2 -DDEBUGGING
a9226780 391LINK_DBG = -g
392.ELSE
393OPTIMIZE = -g -O2
99efab12 394LINK_DBG = -g
a9226780 395.ENDIF
396
397CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
398LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
399OBJOUT_FLAG = -o
400EXEOUT_FLAG = -o
401LIBOUT_FLAG =
402
403# NOTE: we assume that GCC uses MSVCRT.DLL
404BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX
405
406.ELSE
407
408CC = cl
409LINK32 = link
410LIB32 = $(LINK32) -lib
411RSC = rc
412
413#
414# Options
415#
416
417INCLUDES = -I$(COREDIR) -I.\include -I. -I..
418#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
419DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
420LOCDEFS = -DPERLDLL -DPERL_CORE
421SUBSYS = console
422CXX_FLAG = -TP -GX
423
424.IF "$(USE_PERLCRT)" != "define"
425LIBC = msvcrt.lib
426.ELSE
427LIBC = PerlCRT.lib
428.ENDIF
429
430PERLEXE_RES =
431PERLDLL_RES =
432
433.IF "$(CFG)" == "Debug"
434.IF "$(CCTYPE)" == "MSVC20"
435OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
436.ELSE
437OPTIMIZE = -Od -MD -Zi -DDEBUGGING
438.ENDIF
439LINK_DBG = -debug -pdb:none
440.ELSE
441.IF "$(CFG)" == "Optimize"
442# -O1 yields smaller code, which turns out to be faster than -O2
443#OPTIMIZE = -O2 -MD -DNDEBUG
444OPTIMIZE = -O1 -MD -DNDEBUG
445.ELSE
446OPTIMIZE = -Od -MD -DNDEBUG
447.ENDIF
448LINK_DBG = -release
449.ENDIF
450
451LIBBASEFILES = $(CRYPT_LIB) \
452 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
453 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
454 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
455 version.lib odbc32.lib odbccp32.lib
456
457# we add LIBC here, since we may be using PerlCRT.dll
458LIBFILES = $(LIBBASEFILES) $(LIBC)
459
460CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
461 $(PCHFLAGS) $(OPTIMIZE)
462LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
463 -libpath:"$(INST_COREDIR)" \
464 -machine:$(PROCESSOR_ARCHITECTURE)
465OBJOUT_FLAG = -Fo
466EXEOUT_FLAG = -Fe
467LIBOUT_FLAG = /out:
468
469.IF "$(USE_PERLCRT)" != "define"
470BUILDOPT += -DPERL_MSVCRT_READFIX
471.ENDIF
472
473.ENDIF
474
475.IF "$(USE_OBJECT)" == "define"
476OPTIMIZE += $(CXX_FLAG)
477BUILDOPT += -DPERL_OBJECT
478.ENDIF
479
480CFLAGS_O = $(CFLAGS) $(BUILDOPT)
481
482# used to allow local linking flags that are not propogated into Config.pm,
483# currently unused
484# -- BKS, 12-12-1999
485PRIV_LINK_FLAGS *=
486BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
487
488#################### do not edit below this line #######################
489############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
490
491o *= .obj
492a *= .lib
493
494LKPRE = INPUT (
495LKPOST = )
496
497#
498# Rules
499#
500
501.SUFFIXES : .c $(o) .dll $(a) .exe .rc .res
502
503.c$(o):
504 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
505
506.y.c:
507 $(NOOP)
508
509$(o).dll:
510.IF "$(CCTYPE)" == "BORLAND"
511 $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
512 $(IMPLIB) $(*B).lib $@
513.ELIF "$(CCTYPE)" == "GCC"
514 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
515 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
516.ELSE
517 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
518 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
519.ENDIF
520
521.rc.res:
522 $(RSC) -i.. $<
523
524#
525# various targets
526MINIPERL = ..\miniperl.exe
527MINIDIR = .\mini
528PERLEXE = ..\perl.exe
529WPERLEXE = ..\wperl.exe
530GLOBEXE = ..\perlglob.exe
531CONFIGPM = ..\lib\Config.pm
532MINIMOD = ..\lib\ExtUtils\Miniperl.pm
533X2P = ..\x2p\a2p.exe
534
535PL2BAT = bin\pl2bat.pl
536GLOBBAT = bin\perlglob.bat
537
538UTILS = \
539 ..\utils\h2ph \
540 ..\utils\splain \
541 ..\utils\dprofpp \
542 ..\utils\perlbug \
543 ..\utils\pl2pm \
544 ..\utils\c2ph \
545 ..\utils\h2xs \
546 ..\utils\perldoc \
547 ..\utils\perlcc \
548 ..\pod\checkpods \
549 ..\pod\pod2html \
550 ..\pod\pod2latex \
551 ..\pod\pod2man \
552 ..\pod\pod2text \
553 ..\pod\pod2usage \
554 ..\pod\podchecker \
555 ..\pod\podselect \
556 ..\x2p\find2perl \
557 ..\x2p\s2p \
558 bin\exetype.pl \
559 bin\runperl.pl \
560 bin\pl2bat.pl \
561 bin\perlglob.pl \
562 bin\search.pl
563
564.IF "$(CCTYPE)" == "BORLAND"
565
566CFGSH_TMPL = config.bc
567CFGH_TMPL = config_H.bc
568
569.ELIF "$(CCTYPE)" == "GCC"
570
571CFGSH_TMPL = config.gc
572CFGH_TMPL = config_H.gc
3789aae2 573PERLIMPLIB = ..\libperl57$(a)
a9226780 574
575.ELSE
576
577CFGSH_TMPL = config.vc
578CFGH_TMPL = config_H.vc
579
580.ENDIF
581
7d4dff66 582# makedef.pl must be updated if this changes, and this should normally
583# only change when there is an incompatible revision of the public API.
584# XXX so why did we change it from perl56 to perl57?
3789aae2 585PERLIMPLIB *= ..\perl57$(a)
586PERLDLL = ..\perl57.dll
a9226780 587
588XCOPY = xcopy /f /r /i /d
589RCOPY = xcopy /f /r /i /e /d
590NOOP = @echo
591
592#
593# filenames given to xsubpp must have forward slashes (since it puts
594# full pathnames in #line strings)
595XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
596 -C++ -prototypes
597
598MICROCORE_SRC = \
599 ..\av.c \
600 ..\deb.c \
601 ..\doio.c \
602 ..\doop.c \
603 ..\dump.c \
604 ..\globals.c \
605 ..\gv.c \
606 ..\hv.c \
607 ..\mg.c \
608 ..\op.c \
609 ..\perl.c \
610 ..\perlapi.c \
611 ..\perly.c \
612 ..\pp.c \
613 ..\pp_ctl.c \
614 ..\pp_hot.c \
615 ..\pp_sys.c \
616 ..\regcomp.c \
617 ..\regexec.c \
618 ..\run.c \
619 ..\scope.c \
620 ..\sv.c \
621 ..\taint.c \
622 ..\toke.c \
623 ..\universal.c \
624 ..\utf8.c \
625 ..\util.c \
626 ..\xsutils.c
627
628EXTRACORE_SRC += perllib.c
629
630.IF "$(PERL_MALLOC)" == "define"
631EXTRACORE_SRC += ..\malloc.c
632.ENDIF
633
634.IF "$(USE_OBJECT)" != "define"
635EXTRACORE_SRC += ..\perlio.c
636.ENDIF
637
638WIN32_SRC = \
639 .\win32.c \
640 .\win32sck.c \
641 .\win32thread.c
642
643.IF "$(CRYPT_SRC)" != ""
644WIN32_SRC += .\$(CRYPT_SRC)
645.ENDIF
646
647DLL_SRC = $(DYNALOADER).c
648
649X2P_SRC = \
650 ..\x2p\a2p.c \
651 ..\x2p\hash.c \
652 ..\x2p\str.c \
653 ..\x2p\util.c \
654 ..\x2p\walk.c
655
656CORE_NOCFG_H = \
657 ..\av.h \
658 ..\cop.h \
659 ..\cv.h \
660 ..\dosish.h \
661 ..\embed.h \
662 ..\form.h \
663 ..\gv.h \
664 ..\handy.h \
665 ..\hv.h \
666 ..\iperlsys.h \
667 ..\mg.h \
668 ..\nostdio.h \
669 ..\op.h \
670 ..\opcode.h \
671 ..\perl.h \
672 ..\perlapi.h \
673 ..\perlsdio.h \
674 ..\perlsfio.h \
675 ..\perly.h \
676 ..\pp.h \
677 ..\proto.h \
678 ..\regexp.h \
679 ..\scope.h \
680 ..\sv.h \
681 ..\thread.h \
682 ..\unixish.h \
683 ..\utf8.h \
684 ..\util.h \
685 ..\warnings.h \
686 ..\XSUB.h \
687 ..\EXTERN.h \
688 ..\perlvars.h \
689 ..\intrpvar.h \
690 ..\thrdvar.h \
691 .\include\dirent.h \
692 .\include\netdb.h \
693 .\include\sys\socket.h \
694 .\win32.h
695
696CORE_H = $(CORE_NOCFG_H) .\config.h
697
698MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
699CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
700WIN32_OBJ = $(WIN32_SRC:db:+$(o))
701MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
702MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
703MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
704DLL_OBJ = $(DLL_SRC:db:+$(o))
705X2P_OBJ = $(X2P_SRC:db:+$(o))
706
707PERLDLL_OBJ = $(CORE_OBJ)
708PERLEXE_OBJ = perlmain$(o)
709
710PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
711
712.IF "$(USE_SETARGV)" != ""
713SETARGV_OBJ = setargv$(o)
714.ENDIF
715
716DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
717 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
d9b8e8ae 718 Sys/Hostname Storable Filter/Util Encode
a9226780 719STATIC_EXT = DynaLoader
720NONXS_EXT = Errno
721
722DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
723SOCKET = $(EXTDIR)\Socket\Socket
724FCNTL = $(EXTDIR)\Fcntl\Fcntl
725OPCODE = $(EXTDIR)\Opcode\Opcode
726SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
727IO = $(EXTDIR)\IO\IO
728POSIX = $(EXTDIR)\POSIX\POSIX
729ATTRS = $(EXTDIR)\attrs\attrs
730THREAD = $(EXTDIR)\Thread\Thread
731B = $(EXTDIR)\B\B
732RE = $(EXTDIR)\re\re
733DUMPER = $(EXTDIR)\Data\Dumper\Dumper
734ERRNO = $(EXTDIR)\Errno\Errno
735PEEK = $(EXTDIR)\Devel\Peek\Peek
736BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
737DPROF = $(EXTDIR)\Devel\DProf\DProf
738GLOB = $(EXTDIR)\File\Glob\Glob
739HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
740STORABLE = $(EXTDIR)\Storable\Storable
a3ee43e0 741FILTER = $(EXTDIR)\Filter\Util\Call
d9b8e8ae 742ENCODE = $(EXTDIR)\Encode\Encode
a9226780 743
744SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
745FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
746OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
747SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
748IO_DLL = $(AUTODIR)\IO\IO.dll
749POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
750ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
751THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
752B_DLL = $(AUTODIR)\B\B.dll
753DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
754PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
755RE_DLL = $(AUTODIR)\re\re.dll
756BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
757DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
758GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
759HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
760STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
d9b8e8ae 761FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
762ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
a9226780 763
764ERRNO_PM = $(LIBDIR)\Errno.pm
765
766EXTENSION_C = \
767 $(SOCKET).c \
768 $(FCNTL).c \
769 $(OPCODE).c \
770 $(SDBM_FILE).c \
771 $(IO).c \
772 $(POSIX).c \
773 $(ATTRS).c \
774 $(THREAD).c \
775 $(RE).c \
776 $(DUMPER).c \
777 $(PEEK).c \
778 $(B).c \
779 $(BYTELOADER).c \
780 $(DPROF).c \
781 $(GLOB).c \
782 $(HOSTNAME).c \
a3ee43e0 783 $(STORABLE).c \
d9b8e8ae 784 $(FILTER).c \
785 $(ENCODE).c
a9226780 786
787EXTENSION_DLL = \
788 $(SOCKET_DLL) \
789 $(FCNTL_DLL) \
790 $(OPCODE_DLL) \
791 $(SDBM_FILE_DLL)\
792 $(IO_DLL) \
793 $(POSIX_DLL) \
794 $(ATTRS_DLL) \
795 $(DUMPER_DLL) \
796 $(PEEK_DLL) \
797 $(B_DLL) \
798 $(RE_DLL) \
799 $(THREAD_DLL) \
800 $(BYTELOADER_DLL) \
801 $(DPROF_DLL) \
802 $(GLOB_DLL) \
803 $(HOSTNAME_DLL) \
a3ee43e0 804 $(STORABLE_DLL) \
d9b8e8ae 805 $(FILTER_DLL) \
806 $(ENCODE_DLL)
a9226780 807
808EXTENSION_PM = \
809 $(ERRNO_PM)
810
811POD2HTML = $(PODDIR)\pod2html
812POD2MAN = $(PODDIR)\pod2man
813POD2LATEX = $(PODDIR)\pod2latex
814POD2TEXT = $(PODDIR)\pod2text
815
816# vars must be separated by "\t+~\t+", since we're using the tempfile
817# version of config_sh.pl (we were overflowing someone's buffer by
818# trying to fit them all on the command line)
819# -- BKS 10-17-1999
820CFG_VARS = \
821 INST_DRV=$(INST_DRV) ~ \
822 INST_TOP=$(INST_TOP:s/\/\\/) ~ \
823 INST_VER=$(INST_VER:s/\/\\/) ~ \
824 INST_ARCH=$(INST_ARCH) ~ \
825 archname=$(ARCHNAME) ~ \
826 cc=$(CC) ~ \
fd826df2 827 ld=$(LINK32) ~ \
a9226780 828 ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
829 cf_email=$(EMAIL) ~ \
830 d_crypt=$(D_CRYPT) ~ \
831 d_mymalloc=$(PERL_MALLOC) ~ \
832 libs=$(LIBFILES:f) ~ \
833 incpath=$(CCINCDIR:s/\/\\/) ~ \
834 libperl=$(PERLIMPLIB:f) ~ \
835 libpth=$(CCLIBDIR:s/\/\\/);$(EXTRALIBDIRS:s/\/\\/) ~ \
836 libc=$(LIBC) ~ \
837 make=dmake ~ \
838 _o=$(o) obj_ext=$(o) ~ \
839 _a=$(a) lib_ext=$(a) ~ \
840 static_ext=$(STATIC_EXT) ~ \
841 dynamic_ext=$(DYNAMIC_EXT) ~ \
842 nonxs_ext=$(NONXS_EXT) ~ \
843 use5005threads=$(USE_5005THREADS) ~ \
844 useithreads=$(USE_ITHREADS) ~ \
845 usethreads=$(USE_5005THREADS) ~ \
846 usemultiplicity=$(USE_MULTI) ~ \
847 LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \
848 optimize=$(OPTIMIZE)
849
850#
851# set up targets varying between Win95 and WinNT builds
852#
853
854.IF "$(IS_WIN95)" == "define"
855MK2 = .\makefile.95
856RIGHTMAKE = __switch_makefiles
857NOOP = @rem
858.ELSE
859MK2 = __not_needed
d9b8e8ae 860RIGHTMAKE =
a9226780 861.ENDIF
862
863#
864# Top targets
865#
866
867all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
868 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
869 $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
870
871$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
872
873#----------------------------------------------------------------
874
875#-------------------- BEGIN Win95 SPECIFIC ----------------------
876
877# this target is a jump-off point for Win95
878# 1. it switches to the Win95-specific makefile if it exists
879# (__do_switch_makefiles)
880# 2. it prints a message when the Win95-specific one finishes (__done)
881# 3. it then kills this makefile by trying to make __no_such_target
882
883__switch_makefiles: __do_switch_makefiles __done __no_such_target
884
885__do_switch_makefiles:
886.IF "$(NOTFIRST)" != "true"
887 if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true
888.ELSE
889 $(NOOP)
890.ENDIF
891
892.IF "$(NOTFIRST)" != "true"
893__done:
894 @echo Build process complete. Ignore any errors after this message.
895 @echo Run "dmake test" to test and "dmake install" to install
896
897.ELSE
898# dummy targets for Win95-specific makefile
899
900__done:
901 $(NOOP)
902
903__no_such_target:
904 $(NOOP)
905
906.ENDIF
907
908# This target is used to generate the new makefile (.\makefile.95) for Win95
909
910.\makefile.95: .\makefile.mk
911 $(MINIPERL) genmk95.pl makefile.mk $(MK2)
912
913#--------------------- END Win95 SPECIFIC ---------------------
914
915# a blank target for when builds don't need to do certain things
916# this target added for Win95 port but used to keep the WinNT port able to
917# use this file
918__not_needed:
919 $(NOOP)
920
921$(GLOBEXE) : perlglob$(o)
922.IF "$(CCTYPE)" == "BORLAND"
923 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
924 $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \
925 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
926.ELIF "$(CCTYPE)" == "GCC"
927 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
928.ELSE
929 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
930 perlglob$(o) setargv$(o)
931.ENDIF
932
933perlglob$(o) : perlglob.c
934
935config.w32 : $(CFGSH_TMPL)
936 copy $(CFGSH_TMPL) config.w32
937
938.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
939 -del /f config.h
940 copy $(CFGH_TMPL) config.h
941
942..\config.sh : config.w32 $(MINIPERL) config_sh.PL
943 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
944 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
945
946# this target is for when changes to the main config.sh happen
947# edit config.{b,v,g}c and make this target once for each supported
948# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
949regen_config_h:
950 perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
951 $(CFGSH_TMPL) > ..\config.sh
952 -cd .. && del /f perl.exe
953 cd .. && perl configpm
954 -del /f $(CFGH_TMPL)
955 -mkdir $(COREDIR)
956 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
957 rename config.h $(CFGH_TMPL)
958
959$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
960 cd .. && miniperl configpm
961 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
962 $(XCOPY) ..\*.h $(COREDIR)\*.*
963 $(XCOPY) *.h $(COREDIR)\*.*
964 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
965 $(RCOPY) include $(COREDIR)\*.*
966 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
967 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
968
969$(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS)
970.IF "$(CCTYPE)" == "BORLAND"
971 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
972 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
973.ELIF "$(CCTYPE)" == "GCC"
974 $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \
975 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
976.ELSE
977 $(LINK32) -subsystem:console -out:$@ \
978 @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
979.ENDIF
980
981$(MINIDIR) :
982 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
983
984$(MINICORE_OBJ) : $(CORE_NOCFG_H)
985 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*B).c
986
987$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
988 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
989
990# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
991# rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
992# unless the .IF is true), so instead we use a .ELSE with the default.
993# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
994
995perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
996.IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
997 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
998.ELSE
999 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
1000.ENDIF
1001
1002# 1. we don't want to rebuild miniperl.exe when config.h changes
1003# 2. we don't want to rebuild miniperl.exe with non-default config.h
1004$(MINI_OBJ) : $(CORE_NOCFG_H)
1005
1006$(WIN32_OBJ) : $(CORE_H)
1007$(CORE_OBJ) : $(CORE_H)
1008$(DLL_OBJ) : $(CORE_H)
1009$(X2P_OBJ) : $(CORE_H)
1010
1011perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
1012 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1013 $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
1014
1015$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
1016.IF "$(CCTYPE)" == "BORLAND"
1017 $(LINK32) -Tpd -ap $(BLINK_FLAGS) \
1018 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
1019 $@,\n \
1020 $(LIBFILES)\n \
1021 perldll.def\n)
1022 $(IMPLIB) $*.lib $@
1023.ELIF "$(CCTYPE)" == "GCC"
1024 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
1025 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
1026 dlltool --output-lib $(PERLIMPLIB) \
1027 --dllname $(PERLDLL:b).dll \
1028 --def perldll.def \
1029 --base-file perl.base \
1030 --output-exp perl.exp
1031 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1032 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
1033 perl.exp $(LKPOST))
1034.ELSE
1035 $(LINK32) -dll -def:perldll.def -out:$@ \
1036 @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \
1037 $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\))
1038.ENDIF
1039 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1040
1041$(MINIMOD) : $(MINIPERL) ..\minimod.pl
1042 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
1043
1044..\x2p\a2p$(o) : ..\x2p\a2p.c
1045 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
1046
1047..\x2p\hash$(o) : ..\x2p\hash.c
1048 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
1049
1050..\x2p\str$(o) : ..\x2p\str.c
1051 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
1052
1053..\x2p\util$(o) : ..\x2p\util.c
1054 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1055
1056..\x2p\walk$(o) : ..\x2p\walk.c
1057 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1058
1059$(X2P) : $(MINIPERL) $(X2P_OBJ)
1060 $(MINIPERL) ..\x2p\find2perl.PL
1061 $(MINIPERL) ..\x2p\s2p.PL
1062.IF "$(CCTYPE)" == "BORLAND"
1063 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1064 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
1065.ELIF "$(CCTYPE)" == "GCC"
1066 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1067 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
1068.ELSE
1069 $(LINK32) -subsystem:console -out:$@ \
1070 @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
1071.ENDIF
1072
1073perlmain.c : runperl.c
1074 copy runperl.c perlmain.c
1075
1076perlmain$(o) : perlmain.c
1077 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
1078
1079$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1080.IF "$(CCTYPE)" == "BORLAND"
1081 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1082 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
1083 $(@:s,\,\\),\n \
1084 $(PERLIMPLIB) $(LIBFILES)\n)
1085.ELIF "$(CCTYPE)" == "GCC"
1086 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1087 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
1088.ELSE
1089 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1090 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
1091.ENDIF
1092 copy $(PERLEXE) $(WPERLEXE)
1093 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1094 copy splittree.pl ..
1095 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1096
1097$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
1098 if not exist $(AUTODIR) mkdir $(AUTODIR)
1099 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
1100 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
1101 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
1102 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
1103 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
1104 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
1105
1106$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
1107 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
1108
1109$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
1110 cd $(EXTDIR)\Data\$(*B) && \
1111 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1112 cd $(EXTDIR)\Data\$(*B) && $(MAKE)
1113
1114$(DPROF_DLL): $(PERLEXE) $(DPROF).xs
1115 cd $(EXTDIR)\Devel\$(*B) && \
1116 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1117 cd $(EXTDIR)\Devel\$(*B) && $(MAKE)
1118
1119$(GLOB_DLL): $(PERLEXE) $(GLOB).xs
1120 cd $(EXTDIR)\File\$(*B) && \
1121 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1122 cd $(EXTDIR)\File\$(*B) && $(MAKE)
1123
1124$(PEEK_DLL): $(PERLEXE) $(PEEK).xs
1125 cd $(EXTDIR)\Devel\$(*B) && \
1126 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1127 cd $(EXTDIR)\Devel\$(*B) && $(MAKE)
1128
1129$(RE_DLL): $(PERLEXE) $(RE).xs
1130 cd $(EXTDIR)\$(*B) && \
1131 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1132 cd $(EXTDIR)\$(*B) && $(MAKE)
1133
1134$(B_DLL): $(PERLEXE) $(B).xs
1135 cd $(EXTDIR)\$(*B) && \
1136 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1137 cd $(EXTDIR)\$(*B) && $(MAKE)
1138
1139$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
1140 cd $(EXTDIR)\$(*B) && \
1141 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1142 cd $(EXTDIR)\$(*B) && $(MAKE)
1143
1144$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
1145 cd $(EXTDIR)\$(*B) && \
1146 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1147 cd $(EXTDIR)\$(*B) && $(MAKE)
1148
1149$(POSIX_DLL): $(PERLEXE) $(POSIX).xs
1150 cd $(EXTDIR)\$(*B) && \
1151 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1152 cd $(EXTDIR)\$(*B) && $(MAKE)
1153
1154$(IO_DLL): $(PERLEXE) $(IO).xs
1155 cd $(EXTDIR)\$(*B) && \
1156 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1157 cd $(EXTDIR)\$(*B) && $(MAKE)
1158
1159$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
1160 cd $(EXTDIR)\$(*B) && \
1161 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1162 cd $(EXTDIR)\$(*B) && $(MAKE)
1163
1164$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
1165 cd $(EXTDIR)\$(*B) && \
1166 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1167 cd $(EXTDIR)\$(*B) && $(MAKE)
1168
1169$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
1170 cd $(EXTDIR)\$(*B) && \
1171 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1172 cd $(EXTDIR)\$(*B) && $(MAKE)
1173
1174$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
1175 cd $(EXTDIR)\$(*B) && \
1176 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1177 cd $(EXTDIR)\$(*B) && $(MAKE)
1178
1179$(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs
1180 cd $(EXTDIR)\Sys\$(*B) && \
1181 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1182 cd $(EXTDIR)\Sys\$(*B) && $(MAKE)
1183
1184$(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs
1185 cd $(EXTDIR)\$(*B) && \
1186 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1187 cd $(EXTDIR)\$(*B) && $(MAKE)
1188
d9b8e8ae 1189$(ENCODE_DLL): $(PERLEXE) $(ENCODE).xs
1190 cd $(EXTDIR)\$(*B) && \
1191 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1192 cd $(EXTDIR)\$(*B) && $(MAKE)
1193
a9226780 1194$(STORABLE_DLL): $(PERLEXE) $(STORABLE).xs
1195 cd $(EXTDIR)\$(*B) && \
1196 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1197 cd $(EXTDIR)\$(*B) && $(MAKE)
1198
a3ee43e0 1199$(FILTER_DLL): $(PERLEXE) $(FILTER).xs
1200 cd $(EXTDIR)\Filter\Util && \
1201 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1202 cd $(EXTDIR)\Filter\Util && $(MAKE)
1203
a9226780 1204$(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL
1205 cd $(EXTDIR)\$(*B) && \
1206 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1207 cd $(EXTDIR)\$(*B) && $(MAKE)
1208
1209doc: $(PERLEXE)
1210 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1211 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1212 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1213
1214utils: $(PERLEXE) $(X2P)
1215 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1216 copy ..\README.amiga ..\pod\perlamiga.pod
1217 copy ..\README.cygwin ..\pod\perlcygwin.pod
1218 copy ..\README.dos ..\pod\perldos.pod
1219 copy ..\README.hpux ..\pod\perlhpux.pod
1220 copy ..\README.machten ..\pod\perlmachten.pod
1221 copy ..\README.os2 ..\pod\perlos2.pod
1222 copy ..\README.os2 ..\pod\perlos2.pod
1223 copy ..\vms\perlvms.pod ..\pod\perlvms.pod
1224 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1225 cd ..\lib && $(PERLEXE) lib_pm.PL
1226 $(PERLEXE) $(PL2BAT) $(UTILS)
1227
1228distclean: clean
1229 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1230 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
1231 -del /f *.def *.map
1232 -del /f $(EXTENSION_DLL) $(EXTENSION_PM)
1233 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1234 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1235 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1236 -del /f $(LIBDIR)\XSLoader.pm
1237 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1238 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1239 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1240 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1241 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1242 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1243 -del /f $(LIBDIR)\File\Glob.pm
1244 -del /f $(LIBDIR)\Storable.pm
a3ee43e0 1245 -del /f $(LIBDIR)\Filter\Util\Call.pm
a9226780 1246 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1247 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1248 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
1249 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
a3ee43e0 1250 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter || rmdir /s $(LIBDIR)\Filter
a9226780 1251 -del /f $(PODDIR)\*.html
1252 -del /f $(PODDIR)\*.bat
1253 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
1254 dprofpp *.bat
1255 -cd ..\x2p && del /f find2perl s2p *.bat
1256 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1257 -del /f $(CONFIGPM)
1258 -del /f bin\*.bat
1259 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \
1260 pm_to_blib
1261 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
1262 -if exist $(COREDIR) rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
1263
1264install : all installbare installhtml
1265
1266installbare : $(RIGHTMAKE) utils
1267 $(PERLEXE) ..\installperl
1268 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1269 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1270 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1271
1272installhtml : doc
1273 $(RCOPY) html\*.* $(INST_HTML)\*.*
1274
1275inst_lib : $(CONFIGPM)
1276 copy splittree.pl ..
1277 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1278 $(RCOPY) ..\lib $(INST_LIB)\*.*
1279
1280minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1281 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1282.IF "$(CCTYPE)" == "BORLAND"
1283 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1284.ELSE
1285 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1286.ENDIF
1287 attrib -r ..\t\*.*
1288 copy test ..\t
1289 cd ..\t && \
1290 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1291
1292test-prep : all utils
1293 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1294 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1295.IF "$(CCTYPE)" == "BORLAND"
1296 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1297.ELSE
1298 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1299.ENDIF
1300
1301test : $(RIGHTMAKE) test-prep
1302 cd ..\t && $(PERLEXE) -I..\lib harness
1303
1304test-notty : test-prep
1305 set PERL_SKIP_TTY_TEST=1 && \
1306 cd ..\t && $(PERLEXE) -I.\lib harness
1307
1308test-wide : test-prep
1309 set HARNESS_PERL_SWITCHES=-C && \
1310 cd ..\t && $(PERLEXE) -I..\lib harness
1311
1312test-wide-notty : test-prep
1313 set PERL_SKIP_TTY_TEST=1 && \
1314 set HARNESS_PERL_SWITCHES=-C && \
1315 cd ..\t && $(PERLEXE) -I..\lib harness
1316
1317clean :
1318 -@erase miniperlmain$(o)
1319 -@erase $(MINIPERL)
1320 -@erase perlglob$(o)
1321 -@erase perlmain$(o)
1322 -@erase config.w32
1323 -@erase /f config.h
1324 -@erase $(GLOBEXE)
1325 -@erase $(PERLEXE)
1326 -@erase $(WPERLEXE)
1327 -@erase $(PERLDLL)
1328 -@erase $(CORE_OBJ)
1329 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
1330 -@erase $(WIN32_OBJ)
1331 -@erase $(DLL_OBJ)
1332 -@erase $(X2P_OBJ)
1333 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1334 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1335 -@erase ..\x2p\*.exe ..\x2p\*.bat
1336 -@erase *.ilk
1337 -@erase *.pdb
1338
1339# Handy way to run perlbug -ok without having to install and run the
1340# installed perlbug. We don't re-run the tests here - we trust the user.
1341# Please *don't* use this unless all tests pass.
1342# If you want to report test failures, use "dmake nok" instead.
1343ok: utils
1344 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1345
1346okfile: utils
1347 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1348
1349nok: utils
1350 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1351
1352nokfile: utils
1353 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok