Windows 64-bit support:
[p5sagit/p5-mst-13.2.git] / win32 / Makefile
1 #
2 # Makefile to build perl on Windows NT using Microsoft NMAKE.
3 # Supported compilers:
4 #       Visual C++ 2.0 through 6.0 (and possibly newer versions)
5 #       MS Platform SDK 64-bit compiler and tools **experimental**
6 #
7 # This is set up to build a perl.exe that runs off a shared library
8 # (perl58.dll).  Also makes individual DLLs for the XS extensions.
9 #
10
11 ##
12 ## Make sure you read README.win32 *before* you mess with anything here!
13 ##
14
15 ##
16 ## Build configuration.  Edit the values below to suit your needs.
17 ##
18
19 #
20 # Set these to wherever you want "nmake install" to put your
21 # newly built perl.
22 #
23 INST_DRV        = c:
24 INST_TOP        = $(INST_DRV)\perl
25
26 #
27 # Comment this out if you DON'T want your perl installation to be versioned.
28 # This means that the new installation will overwrite any files from the
29 # old installation at the same INST_TOP location.  Leaving it enabled is
30 # the safest route, as perl adds the extra version directory to all the
31 # locations it installs files to.  If you disable it, an alternative
32 # versioned installation can be obtained by setting INST_TOP above to a
33 # path that includes an arbitrary version string.
34 #
35 #INST_VER = \5.7.3
36
37 #
38 # Comment this out if you DON'T want your perl installation to have
39 # architecture specific components.  This means that architecture-
40 # specific files will be installed along with the architecture-neutral
41 # files.  Leaving it enabled is safer and more flexible, in case you
42 # want to build multiple flavors of perl and install them together in
43 # the same location.  Commenting it out gives you a simpler
44 # installation that is easier to understand for beginners.
45 #
46 #INST_ARCH = \$(ARCHNAME)
47
48 #
49 # uncomment to enable multiple interpreters.  This is need for fork()
50 # emulation.
51 #
52 USE_MULTI = define
53
54 #
55 # Beginnings of interpreter cloning/threads; still very incomplete.
56 # This should be enabled to get the fork() emulation.  This needs
57 # USE_MULTI as well.
58 #
59 USE_ITHREADS = define
60
61 #
62 # uncomment to enable the implicit "host" layer for all system calls
63 # made by perl.  This needs USE_MULTI above.  This is also needed to
64 # get fork().
65 #
66 USE_IMP_SYS = define
67
68 #
69 # uncomment to enable the experimental PerlIO I/O subsystem.
70 USE_PERLIO      = define
71
72 #
73 # WARNING! This option is deprecated and will eventually go away (enable
74 # USE_ITHREADS instead).
75 #
76 # uncomment to enable threads-capabilities.  This is incompatible with
77 # USE_ITHREADS, and is only here for people who may have come to rely
78 # on the experimental Thread support that was in 5.005.
79 #
80 #USE_5005THREADS        = define
81
82 #
83 # uncomment one of the following lines if you are using either
84 # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
85 #
86 #CCTYPE         = MSVC20
87 #CCTYPE         = MSVC60
88
89 #
90 # uncomment next line if you want debug version of perl (big,slow)
91 #
92 #CFG            = Debug
93
94 #
95 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
96 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
97 # This currently requires VC 5.0 with Service Pack 3 or later.
98 # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
99 # and follow the directions in the package to install.
100 #
101 # Not recommended if you have VC 6.x and you're not running Windows 9x.
102 #
103 #USE_PERLCRT    = define
104
105 #
106 # uncomment to enable linking with setargv.obj under the Visual C
107 # compiler. Setting this options enables perl to expand wildcards in
108 # arguments, but it may be harder to use alternate methods like
109 # File::DosGlob that are more powerful.  This option is supported only with
110 # Visual C.
111 #
112 #USE_SETARGV    = define
113
114 #
115 # if you have the source for des_fcrypt(), uncomment this and make sure the
116 # file exists (see README.win32).  File should be located in the same
117 # directory as this file.
118 #
119 #CRYPT_SRC      = fcrypt.c
120
121 #
122 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
123 # library, uncomment this, and make sure the library exists (see README.win32)
124 # Specify the full pathname of the library.
125 #
126 #CRYPT_LIB      = fcrypt.lib
127
128 #
129 # set this if you wish to use perl's malloc
130 # WARNING: Turning this on/off WILL break binary compatibility with extensions
131 # you may have compiled with/without it.  Be prepared to recompile all
132 # extensions if you change the default.  Currently, this cannot be enabled
133 # if you ask for USE_IMP_SYS above.
134 #
135 #PERL_MALLOC    = define
136
137 #
138 # set the install locations of the compiler include/libraries
139 # Running VCVARS32.BAT is *required* when using Visual C.
140 # Some versions of Visual C don't define MSVCDIR in the environment,
141 # so you may have to set CCHOME explicitly (spaces in the path name should
142 # not be quoted)
143 #
144 #CCHOME         = f:\msvc20
145 CCHOME          = $(MSVCDIR)
146 CCINCDIR        = $(CCHOME)\include
147 CCLIBDIR        = $(CCHOME)\lib
148
149 #
150 # Additional compiler flags can be specified here.
151 #
152
153 #
154 # This should normally be disabled.  Adding -DPERL_POLLUTE enables support
155 # for old symbols by default, at the expense of extreme pollution.  You most
156 # probably just want to build modules that won't compile with
157 #         perl Makefile.PL POLLUTE=1
158 # instead of enabling this.  Please report such modules to the respective
159 # authors.
160 #
161 #BUILDOPT       = $(BUILDOPT) -DPERL_POLLUTE
162
163 #
164 # This should normally be disabled.  Enabling it will disable the File::Glob
165 # implementation of CORE::glob.
166 #
167 #BUILDOPT       = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
168
169 #
170 # This should normally be disabled.  Enabling it causes perl to read scripts
171 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
172 #BUILDOPT       = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
173
174 #
175 # specify semicolon-separated list of extra directories that modules will
176 # look for libraries (spaces in path names need not be quoted)
177 #
178 EXTRALIBDIRS    =
179
180 #
181 # set this to your email address (perl will guess a value from
182 # from your loginname and your hostname, which may not be right)
183 #
184 #EMAIL          =
185
186 ##
187 ## Build configuration ends.
188 ##
189
190 ##################### CHANGE THESE ONLY IF YOU MUST #####################
191
192 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
193 D_CRYPT         = undef
194 !ELSE
195 D_CRYPT         = define
196 CRYPT_FLAG      = -DHAVE_DES_FCRYPT
197 !ENDIF
198
199 !IF "$(PERL_MALLOC)" == ""
200 PERL_MALLOC     = undef
201 !ENDIF
202
203 !IF "$(USE_5005THREADS)" == ""
204 USE_5005THREADS = undef
205 !ENDIF
206
207 !IF "$(USE_5005THREADS)" == "define"
208 USE_ITHREADS    = undef
209 !ENDIF
210
211 !IF "$(USE_IMP_SYS)" == "define"
212 PERL_MALLOC     = undef
213 !ENDIF
214
215 !IF "$(USE_MULTI)" == ""
216 USE_MULTI       = undef
217 !ENDIF
218
219 !IF "$(USE_ITHREADS)" == ""
220 USE_ITHREADS    = undef
221 !ENDIF
222
223 !IF "$(USE_IMP_SYS)" == ""
224 USE_IMP_SYS     = undef
225 !ENDIF
226
227 !IF "$(USE_PERLIO)" == ""
228 USE_PERLIO      = undef
229 !ENDIF
230
231 !IF "$(USE_PERLCRT)" == ""
232 USE_PERLCRT     = undef
233 !ENDIF
234
235 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
236 USE_MULTI       = define
237 !ENDIF
238
239 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
240 USE_MULTI       = define
241 USE_5005THREADS = undef
242 !ENDIF
243
244 !IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
245 BUILDOPT        = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
246 !ENDIF
247
248 !IF "$(USE_IMP_SYS)" != "undef"
249 BUILDOPT        = $(BUILDOPT) -DPERL_IMPLICIT_SYS
250 !ENDIF
251
252 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
253 PROCESSOR_ARCHITECTURE  = x86
254 !ENDIF
255
256 !IF "$(WIN64)" == ""
257 !IF "$(PROCESSOR_ARCHITEW6432)" != ""
258 PROCESSOR_ARCHITECTURE  = $(PROCESSOR_ARCHITEW6432)
259 WIN64                   = define
260 !ELSE
261 !IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
262 WIN64                   = define
263 !ELSE
264 WIN64                   = undef
265 !ENDIF
266 !ENDIF
267 !ENDIF
268
269 !IF "$(USE_5005THREADS)" == "define"
270 ARCHNAME        = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
271 !ELSE
272 !IF "$(USE_MULTI)" == "define"
273 ARCHNAME        = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
274 !ELSE
275 !IF "$(USE_PERLIO)" == "define"
276 ARCHNAME        = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
277 !ELSE
278 ARCHNAME        = MSWin32-$(PROCESSOR_ARCHITECTURE)
279 !ENDIF
280 !ENDIF
281 !ENDIF
282
283 !IF "$(USE_PERLIO)" == "define"
284 BUILDOPT        = $(BUILDOPT) -DUSE_PERLIO
285 !ENDIF
286
287 !IF "$(USE_ITHREADS)" == "define"
288 ARCHNAME        = $(ARCHNAME)-thread
289 !ENDIF
290
291 # Visual Studio 98 specific
292 !IF "$(CCTYPE)" == "MSVC60"
293
294 # VC 6.0 can load the socket dll on demand.  Makes the test suite
295 # run in about 10% less time.
296 DELAYLOAD       = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
297 !ENDIF
298
299 ARCHDIR         = ..\lib\$(ARCHNAME)
300 COREDIR         = ..\lib\CORE
301 AUTODIR         = ..\lib\auto
302 LIBDIR          = ..\lib
303 EXTDIR          = ..\ext
304 PODDIR          = ..\pod
305 EXTUTILSDIR     = $(LIBDIR)\ExtUtils
306
307 #
308 INST_SCRIPT     = $(INST_TOP)$(INST_VER)\bin
309 INST_BIN        = $(INST_SCRIPT)$(INST_ARCH)
310 INST_LIB        = $(INST_TOP)$(INST_VER)\lib
311 INST_ARCHLIB    = $(INST_LIB)$(INST_ARCH)
312 INST_COREDIR    = $(INST_ARCHLIB)\CORE
313 INST_POD        = $(INST_LIB)\pod
314 INST_HTML       = $(INST_TOP)$(INST_VER)\html
315
316 #
317 # Programs to compile, build .lib files and link
318 #
319
320 CC              = cl
321 LINK32          = link
322 LIB32           = $(LINK32) -lib
323 RSC             = rc
324
325 #
326 # Options
327 #
328
329 INCLUDES        = -I$(COREDIR) -I.\include -I. -I..
330 #PCHFLAGS       = -Fpc:\temp\vcmoduls.pch -YX
331 DEFINES         = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
332 LOCDEFS         = -DPERLDLL -DPERL_CORE
333 SUBSYS          = console
334 CXX_FLAG        = -TP -GX
335
336 !IF "$(USE_PERLCRT)" != "define"
337 LIBC    = msvcrt.lib
338 !ELSE
339 LIBC    = PerlCRT.lib
340 !ENDIF
341
342 PERLEXE_RES     =
343 PERLDLL_RES     =
344
345 !IF  "$(CFG)" == "Debug"
346 !  IF "$(CCTYPE)" == "MSVC20"
347 OPTIMIZE        = -Od -MD -Z7 -DDEBUGGING
348 !  ELSE
349 OPTIMIZE        = -Od -MD -Zi -DDEBUGGING
350 !  ENDIF
351 LINK_DBG        = -debug
352 !ELSE
353 # -O1 yields smaller code, which turns out to be faster than -O2
354 #OPTIMIZE       = -O2 -MD -DNDEBUG
355 OPTIMIZE        = -O1 -MD -DNDEBUG
356 LINK_DBG        = -release
357 !ENDIF
358
359 !IF "$(WIN64)" == "define"
360 DEFINES         = $(DEFINES) -DWIN64 -DCONSERVATIVE
361 OPTIMIZE        = $(OPTIMIZE) -Wp64 -Op
362 !ENDIF
363
364 !IF "$(USE_PERLCRT)" != "define"
365 BUILDOPT        = $(BUILDOPT) -DPERL_MSVCRT_READFIX
366 !ENDIF
367
368 LIBBASEFILES    = $(CRYPT_LIB) \
369                 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
370                 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
371                 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
372                 version.lib
373
374 # win64 doesn't have some libs
375 !IF "$(WIN64)" != "define"
376 LIBBASEFILES    = $(LIBBASEFILES) odbc32.lib odbccp32.lib
377 !ENDIF
378
379 # we add LIBC here, since we may be using PerlCRT.dll
380 LIBFILES        = $(LIBBASEFILES) $(LIBC)
381
382 CFLAGS          = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
383                 $(PCHFLAGS) $(OPTIMIZE)
384 LINK_FLAGS      = -nologo -nodefaultlib $(LINK_DBG) \
385                 -libpath:"$(INST_COREDIR)" \
386                 -machine:$(PROCESSOR_ARCHITECTURE)
387 OBJOUT_FLAG     = -Fo
388 EXEOUT_FLAG     = -Fe
389
390 CFLAGS_O        = $(CFLAGS) $(BUILDOPT)
391
392 #################### do not edit below this line #######################
393 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
394
395 o = .obj
396
397 #
398 # Rules
399 #
400
401 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
402
403 .c$(o):
404         $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
405
406 .y.c:
407         $(NOOP)
408
409 $(o).dll:
410         $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
411             -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
412
413 .rc.res:
414         $(RSC) -i.. $<
415
416 #
417 # various targets
418
419 # makedef.pl must be updated if this changes, and this should normally
420 # only change when there is an incompatible revision of the public API.
421 PERLIMPLIB      = ..\perl58.lib
422 PERLDLL         = ..\perl58.dll
423
424 MINIPERL        = ..\miniperl.exe
425 MINIDIR         = .\mini
426 PERLEXE         = ..\perl.exe
427 WPERLEXE        = ..\wperl.exe
428 GLOBEXE         = ..\perlglob.exe
429 CONFIGPM        = ..\lib\Config.pm
430 MINIMOD         = ..\lib\ExtUtils\Miniperl.pm
431 X2P             = ..\x2p\a2p.exe
432
433 # Nominate a target which causes extensions to be re-built
434 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
435 # on and really only the interface - i.e. the .def file used to export symbols
436 # from the .dll
437 PERLDEP         = perldll.def
438
439 PL2BAT          = bin\pl2bat.pl
440 GLOBBAT         = bin\perlglob.bat
441
442 UTILS           =                       \
443                 ..\utils\h2ph           \
444                 ..\utils\splain         \
445                 ..\utils\dprofpp        \
446                 ..\utils\perlbug        \
447                 ..\utils\pl2pm          \
448                 ..\utils\c2ph           \
449                 ..\utils\h2xs           \
450                 ..\utils\perldoc        \
451                 ..\utils\perlcc         \
452                 ..\utils\perlivp        \
453                 ..\utils\libnetcfg      \
454                 ..\pod\checkpods        \
455                 ..\pod\pod2html         \
456                 ..\pod\pod2latex        \
457                 ..\pod\pod2man          \
458                 ..\pod\pod2text         \
459                 ..\pod\pod2usage        \
460                 ..\pod\podchecker       \
461                 ..\pod\podselect        \
462                 ..\x2p\find2perl        \
463                 ..\x2p\s2p              \
464                 ..\lib\ExtUtils\xsubpp  \
465                 bin\exetype.pl          \
466                 bin\runperl.pl          \
467                 bin\pl2bat.pl           \
468                 bin\perlglob.pl         \
469                 bin\search.pl
470
471 MAKE            = nmake -nologo
472 MAKE_BARE       = nmake
473
474 !IF "$(WIN64)" == "define"
475 CFGSH_TMPL      = config.vc64
476 CFGH_TMPL       = config_H.vc64
477 !ELSE
478 CFGSH_TMPL      = config.vc
479 CFGH_TMPL       = config_H.vc
480 !ENDIF
481
482 XCOPY           = xcopy /f /r /i /d
483 RCOPY           = xcopy /f /r /i /e /d
484 NOOP            = @echo
485 NULL            =
486
487 DEL             = del
488
489 #
490 # filenames given to xsubpp must have forward slashes (since it puts
491 # full pathnames in #line strings)
492 XSUBPP          = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
493                 -C++ -prototypes
494
495 MICROCORE_SRC   =               \
496                 ..\av.c         \
497                 ..\deb.c        \
498                 ..\doio.c       \
499                 ..\doop.c       \
500                 ..\dump.c       \
501                 ..\globals.c    \
502                 ..\gv.c         \
503                 ..\hv.c         \
504                 ..\locale.c     \
505                 ..\mg.c         \
506                 ..\numeric.c    \
507                 ..\op.c         \
508                 ..\perl.c       \
509                 ..\perlapi.c    \
510                 ..\perly.c      \
511                 ..\pp.c         \
512                 ..\pp_ctl.c     \
513                 ..\pp_hot.c     \
514                 ..\pp_pack.c    \
515                 ..\pp_sort.c    \
516                 ..\pp_sys.c     \
517                 ..\reentr.c     \
518                 ..\regcomp.c    \
519                 ..\regexec.c    \
520                 ..\run.c        \
521                 ..\scope.c      \
522                 ..\sv.c         \
523                 ..\taint.c      \
524                 ..\toke.c       \
525                 ..\universal.c  \
526                 ..\utf8.c       \
527                 ..\util.c       \
528                 ..\xsutils.c
529
530 EXTRACORE_SRC   = $(EXTRACORE_SRC) perllib.c
531
532 !IF "$(PERL_MALLOC)" == "define"
533 EXTRACORE_SRC   = $(EXTRACORE_SRC) ..\malloc.c
534 !ENDIF
535
536 EXTRACORE_SRC   = $(EXTRACORE_SRC) ..\perlio.c
537
538 WIN32_SRC       =               \
539                 .\win32.c       \
540                 .\win32sck.c    \
541                 .\win32thread.c
542
543 !IF "$(USE_PERLIO)" == "define"
544 WIN32_SRC       = $(WIN32_SRC) .\win32io.c
545 !ENDIF
546
547 !IF "$(CRYPT_SRC)" != ""
548 WIN32_SRC       = $(WIN32_SRC) .\$(CRYPT_SRC)
549 !ENDIF
550
551 DLL_SRC         = $(DYNALOADER).c
552
553 X2P_SRC         =               \
554                 ..\x2p\a2p.c    \
555                 ..\x2p\hash.c   \
556                 ..\x2p\str.c    \
557                 ..\x2p\util.c   \
558                 ..\x2p\walk.c
559
560 CORE_NOCFG_H    =               \
561                 ..\av.h         \
562                 ..\cop.h        \
563                 ..\cv.h         \
564                 ..\dosish.h     \
565                 ..\embed.h      \
566                 ..\form.h       \
567                 ..\gv.h         \
568                 ..\handy.h      \
569                 ..\hv.h         \
570                 ..\iperlsys.h   \
571                 ..\mg.h         \
572                 ..\nostdio.h    \
573                 ..\op.h         \
574                 ..\opcode.h     \
575                 ..\perl.h       \
576                 ..\perlapi.h    \
577                 ..\perlsdio.h   \
578                 ..\perlsfio.h   \
579                 ..\perly.h      \
580                 ..\pp.h         \
581                 ..\proto.h      \
582                 ..\regexp.h     \
583                 ..\scope.h      \
584                 ..\sv.h         \
585                 ..\thread.h     \
586                 ..\unixish.h    \
587                 ..\utf8.h       \
588                 ..\util.h       \
589                 ..\warnings.h   \
590                 ..\XSUB.h       \
591                 ..\EXTERN.h     \
592                 ..\perlvars.h   \
593                 ..\intrpvar.h   \
594                 ..\thrdvar.h    \
595                 .\include\dirent.h      \
596                 .\include\netdb.h       \
597                 .\include\sys\socket.h  \
598                 .\win32.h
599
600 CORE_H          = $(CORE_NOCFG_H) .\config.h
601
602 MICROCORE_OBJ   = $(MICROCORE_SRC:.c=.obj)
603 CORE_OBJ        = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
604 WIN32_OBJ       = $(WIN32_SRC:.c=.obj)
605 MINICORE_OBJ    = $(MICROCORE_OBJ:..\=.\mini\)  \
606                   $(MINIDIR)\miniperlmain$(o)   \
607                   $(MINIDIR)\perlio$(o)
608 MINIWIN32_OBJ   = $(WIN32_OBJ:.\=.\mini\)
609 MINI_OBJ        = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
610 DLL_OBJ         = $(DLL_SRC:.c=.obj)
611 X2P_OBJ         = $(X2P_SRC:.c=.obj)
612
613 PERLDLL_OBJ     = $(CORE_OBJ)
614 PERLEXE_OBJ     = perlmain$(o)
615
616 PERLDLL_OBJ     = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
617 #PERLEXE_OBJ    = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
618
619 !IF "$(USE_SETARGV)" != ""
620 SETARGV_OBJ     = setargv$(o)
621 !ENDIF
622
623 DYNALOADER              = $(EXTDIR)\DynaLoader\DynaLoader
624 SOCKET                  = $(EXTDIR)\Socket\Socket
625 FCNTL                   = $(EXTDIR)\Fcntl\Fcntl
626 OPCODE                  = $(EXTDIR)\Opcode\Opcode
627 SDBM_FILE               = $(EXTDIR)\SDBM_File\SDBM_File
628 IO                      = $(EXTDIR)\IO\IO
629 POSIX                   = $(EXTDIR)\POSIX\POSIX
630 ATTRS                   = $(EXTDIR)\attrs\attrs
631 THREAD                  = $(EXTDIR)\Thread\Thread
632 B                       = $(EXTDIR)\B\B
633 RE                      = $(EXTDIR)\re\re
634 DUMPER                  = $(EXTDIR)\Data\Dumper\Dumper
635 ERRNO                   = $(EXTDIR)\Errno\Errno
636 PEEK                    = $(EXTDIR)\Devel\Peek\Peek
637 BYTELOADER              = $(EXTDIR)\ByteLoader\ByteLoader
638 DPROF                   = $(EXTDIR)\Devel\DProf\DProf
639 GLOB                    = $(EXTDIR)\File\Glob\Glob
640 HOSTNAME                = $(EXTDIR)\Sys\Hostname\Hostname
641 STORABLE                = $(EXTDIR)\Storable\Storable
642 FILTER                  = $(EXTDIR)\Filter\Util\Call\Call
643 ENCODE                  = $(EXTDIR)\Encode\Encode
644 MD5                     = $(EXTDIR)\Digest\MD5\MD5
645 PERLIOSCALAR            = $(EXTDIR)\PerlIO\Scalar\Scalar
646 MIMEBASE64              = $(EXTDIR)\MIME\Base64\Base64
647 TIMEHIRES               = $(EXTDIR)\Time\HiRes\HiRes
648 CWD                     = $(EXTDIR)\Cwd\Cwd
649 LISTUTIL                = $(EXTDIR)\List\Util\Util
650 PERLIOVIA               = $(EXTDIR)\PerlIO\Via\Via
651 XSTYPEMAP               = $(EXTDIR)\XS\Typemap\Typemap
652 UNICODENORMALIZE        = $(EXTDIR)\Unicode\Normalize\Normalize
653
654 SOCKET_DLL              = $(AUTODIR)\Socket\Socket.dll
655 FCNTL_DLL               = $(AUTODIR)\Fcntl\Fcntl.dll
656 OPCODE_DLL              = $(AUTODIR)\Opcode\Opcode.dll
657 SDBM_FILE_DLL           = $(AUTODIR)\SDBM_File\SDBM_File.dll
658 IO_DLL                  = $(AUTODIR)\IO\IO.dll
659 POSIX_DLL               = $(AUTODIR)\POSIX\POSIX.dll
660 ATTRS_DLL               = $(AUTODIR)\attrs\attrs.dll
661 THREAD_DLL              = $(AUTODIR)\Thread\Thread.dll
662 B_DLL                   = $(AUTODIR)\B\B.dll
663 DUMPER_DLL              = $(AUTODIR)\Data\Dumper\Dumper.dll
664 PEEK_DLL                = $(AUTODIR)\Devel\Peek\Peek.dll
665 RE_DLL                  = $(AUTODIR)\re\re.dll
666 BYTELOADER_DLL          = $(AUTODIR)\ByteLoader\ByteLoader.dll
667 DPROF_DLL               = $(AUTODIR)\Devel\DProf\DProf.dll
668 GLOB_DLL                = $(AUTODIR)\File\Glob\Glob.dll
669 HOSTNAME_DLL            = $(AUTODIR)\Sys\Hostname\Hostname.dll
670 STORABLE_DLL            = $(AUTODIR)\Storable\Storable.dll
671 FILTER_DLL              = $(AUTODIR)\Filter\Util\Call\Call.dll
672 ENCODE_DLL              = $(AUTODIR)\Encode\Encode.dll
673 MD5_DLL                 = $(AUTODIR)\Digest\MD5\MD5.dll
674 PERLIOSCALAR_DLL        = $(AUTODIR)\PerlIO\Scalar\Scalar.dll
675 MIMEBASE64_DLL          = $(AUTODIR)\MIME\Base64\Base64.dll
676 TIMEHIRES_DLL           = $(AUTODIR)\Time\HiRes\HiRes.dll
677 CWD_DLL                 = $(AUTODIR)\Cwd\Cwd.dll
678 LISTUTIL_DLL            = $(AUTODIR)\List\Util\Util.dll
679 PERLIOVIA_DLL           = $(AUTODIR)\PerlIO\Via\Via.dll
680 XSTYPEMAP_DLL           = $(AUTODIR)\XS\Typemap\Typemap.dll
681 UNICODENORMALIZE_DLL    = $(AUTODIR)\Unicode\Normalize\Normalize.dll
682
683 EXTENSION_C     =               \
684                 $(SOCKET).c     \
685                 $(FCNTL).c      \
686                 $(OPCODE).c     \
687                 $(SDBM_FILE).c  \
688                 $(IO).c         \
689                 $(POSIX).c      \
690                 $(ATTRS).c      \
691                 $(THREAD).c     \
692                 $(RE).c         \
693                 $(DUMPER).c     \
694                 $(PEEK).c       \
695                 $(B).c          \
696                 $(BYTELOADER).c \
697                 $(DPROF).c      \
698                 $(GLOB).c       \
699                 $(HOSTNAME).c   \
700                 $(STORABLE).c   \
701                 $(FILTER).c     \
702                 $(ENCODE).c     \
703                 $(MD5).c        \
704                 $(PERLIOSCALAR).c       \
705                 $(MIMEBASE64).c \
706                 $(TIMEHIRES).c  \
707                 $(CWD).c        \
708                 $(LISTUTIL).c   \
709                 $(PERLIOVIA).c  \
710                 $(XSTYPEMAP).c  \
711                 $(UNICODENORMALIZE).c
712
713 EXTENSION_DLL   =               \
714                 $(SOCKET_DLL)   \
715                 $(FCNTL_DLL)    \
716                 $(OPCODE_DLL)   \
717                 $(SDBM_FILE_DLL)\
718                 $(IO_DLL)       \
719                 $(POSIX_DLL)    \
720                 $(ATTRS_DLL)    \
721                 $(DUMPER_DLL)   \
722                 $(PEEK_DLL)     \
723                 $(B_DLL)        \
724                 $(RE_DLL)       \
725                 $(THREAD_DLL)   \
726                 $(BYTELOADER_DLL)       \
727                 $(DPROF_DLL)    \
728                 $(GLOB_DLL)     \
729                 $(HOSTNAME_DLL) \
730                 $(STORABLE_DLL) \
731                 $(FILTER_DLL)   \
732                 $(ENCODE_DLL)   \
733                 $(MD5_DLL)      \
734                 $(PERLIOSCALAR_DLL) \
735                 $(MIMEBASE64_DLL) \
736                 $(TIMEHIRES_DLL)  \
737                 $(CWD_DLL)      \
738                 $(LISTUTIL_DLL) \
739                 $(PERLIOVIA_DLL)        \
740                 $(XSTYPEMAP_DLL)        \
741                 $(UNICODENORMALIZE_DLL)
742
743 POD2HTML        = $(PODDIR)\pod2html
744 POD2MAN         = $(PODDIR)\pod2man
745 POD2LATEX       = $(PODDIR)\pod2latex
746 POD2TEXT        = $(PODDIR)\pod2text
747
748 CFG_VARS        =                                       \
749                 "INST_DRV=$(INST_DRV)"                  \
750                 "INST_TOP=$(INST_TOP)"                  \
751                 "INST_VER=$(INST_VER)"                  \
752                 "INST_ARCH=$(INST_ARCH)"                \
753                 "archname=$(ARCHNAME)"                  \
754                 "cc=$(CC)"                              \
755                 "ld=$(LINK32)"                          \
756                 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)"       \
757                 "cf_email=$(EMAIL)"                     \
758                 "d_crypt=$(D_CRYPT)"                    \
759                 "d_mymalloc=$(PERL_MALLOC)"             \
760                 "libs=$(LIBFILES)"                      \
761                 "incpath=$(CCINCDIR:"=\")"              \
762                 "libperl=$(PERLIMPLIB:..\=)"            \
763                 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")"  \
764                 "libc=$(LIBC)"                          \
765                 "make=$(MAKE_BARE)"                             \
766                 "use5005threads=$(USE_5005THREADS)"     \
767                 "useithreads=$(USE_ITHREADS)"           \
768                 "usethreads=$(USE_5005THREADS)"         \
769                 "usemultiplicity=$(USE_MULTI)"          \
770                 "useperlio=$(USE_PERLIO)"               \
771                 "LINK_FLAGS=$(LINK_FLAGS:"=\")"         \
772                 "optimize=$(OPTIMIZE:"=\")"
773
774 #
775 # Top targets
776 #
777
778 all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
779         $(X2P) Extensions
780         @echo   Everything is up to date. '$(MAKE_BARE) test' to run test suite.
781
782 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
783
784 #------------------------------------------------------------
785
786 $(GLOBEXE) : perlglob$(o)
787         $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
788             perlglob$(o) setargv$(o)
789
790 perlglob$(o)  : perlglob.c
791
792 config.w32 : $(CFGSH_TMPL)
793         copy $(CFGSH_TMPL) config.w32
794
795 .\config.h : $(CFGH_TMPL)
796         -del /f config.h
797         copy $(CFGH_TMPL) config.h
798
799 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL
800         $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
801
802 # this target is for when changes to the main config.sh happen
803 # edit config.{b,v,g}c and make this target once for each supported
804 # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
805 regen_config_h:
806         perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
807         cd ..
808         -del /f perl.exe
809         perl configpm
810         cd win32
811         -del /f $(CFGH_TMPL)
812         -mkdir $(COREDIR)
813         -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
814         rename config.h $(CFGH_TMPL)
815
816 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
817         cd ..
818         miniperl configpm
819         cd win32
820         if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
821         $(XCOPY) ..\*.h $(COREDIR)\*.*
822         $(XCOPY) *.h $(COREDIR)\*.*
823         $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
824         $(RCOPY) include $(COREDIR)\*.*
825         -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
826         if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
827
828 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
829         $(LINK32) -subsystem:console -out:$@ @<<
830         $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
831 <<
832
833 $(MINIDIR) :
834         if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
835
836 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
837         $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
838
839 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
840         $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
841
842 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
843 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
844 !IF "$(USE_IMP_SYS)" == "define"
845 perllib$(o)     : perllib.c .\perlhost.h .\vdir.h .\vmem.h
846         $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
847 !ENDIF
848
849 # 1. we don't want to rebuild miniperl.exe when config.h changes
850 # 2. we don't want to rebuild miniperl.exe with non-default config.h
851 $(MINI_OBJ)     : $(CORE_NOCFG_H)
852
853 $(WIN32_OBJ)    : $(CORE_H)
854 $(CORE_OBJ)     : $(CORE_H)
855 $(DLL_OBJ)      : $(CORE_H)
856 $(X2P_OBJ)      : $(CORE_H)
857
858 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
859         $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
860             CCTYPE=$(CCTYPE) > perldll.def
861
862 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
863         $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
864                 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
865 <<
866         $(XCOPY) $(PERLIMPLIB) $(COREDIR)
867
868 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
869         cd ..
870         miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
871         cd win32
872
873 ..\x2p\a2p$(o) : ..\x2p\a2p.c
874         $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
875
876 ..\x2p\hash$(o) : ..\x2p\hash.c
877         $(CC) -I..\x2p  $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
878
879 ..\x2p\str$(o) : ..\x2p\str.c
880         $(CC) -I..\x2p  $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
881
882 ..\x2p\util$(o) : ..\x2p\util.c
883         $(CC) -I..\x2p  $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
884
885 ..\x2p\walk$(o) : ..\x2p\walk.c
886         $(CC) -I..\x2p  $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
887
888 $(X2P) : $(MINIPERL) $(X2P_OBJ)
889         $(MINIPERL) ..\x2p\find2perl.PL
890         $(MINIPERL) ..\x2p\s2p.PL
891         $(LINK32) -subsystem:console -out:$@ @<<
892                 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
893 <<
894
895 perlmain.c : runperl.c
896         copy runperl.c perlmain.c
897
898 perlmain$(o) : perlmain.c
899         $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
900
901 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
902         $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
903             $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
904         copy $(PERLEXE) $(WPERLEXE)
905         $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
906         copy splittree.pl ..
907         $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
908
909 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
910         if not exist $(AUTODIR) mkdir $(AUTODIR)
911         cd $(EXTDIR)\$(*B)
912         ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
913         ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
914         cd ..\..\win32
915         $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
916         $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
917         cd $(EXTDIR)\$(*B)
918         $(XSUBPP) dl_win32.xs > $(*B).c
919         cd ..\..\win32
920
921 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
922         copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
923
924 #----------------------------------------------------------------------------------
925 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
926         $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
927
928 Extensions_clean: 
929         -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
930
931 #----------------------------------------------------------------------------------
932
933 doc: $(PERLEXE)
934         $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
935             --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
936             --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
937
938 utils: $(PERLEXE) $(X2P)
939         cd ..\utils
940         $(MAKE) PERL=$(MINIPERL)
941         cd ..\pod
942         copy ..\README.aix      .\perlaix.pod
943         copy ..\README.amiga    .\perlamiga.pod
944         copy ..\README.apollo   .\perlapollo.pod
945         copy ..\README.beos     .\perlbeos.pod
946         copy ..\README.bs2000   .\perlbs2000.pod
947         copy ..\README.ce       .\perlce.pod
948         copy ..\README.cygwin   .\perlcygwin.pod
949         copy ..\README.dgux     .\perldgux.pod
950         copy ..\README.dos      .\perldos.pod
951         copy ..\README.epoc     .\perlepoc.pod
952         copy ..\README.hurd     .\perlhurd.pod
953         copy ..\README.hpux     .\perlhpux.pod
954         copy ..\README.machten  .\perlmachten.pod
955         copy ..\README.macos    .\perlmacos.pod
956         copy ..\README.mint     .\perlmint.pod
957         copy ..\README.mpeix    .\perlmpeix.pod
958         copy ..\README.netware  .\perlnetware.pod
959         copy ..\README.os2      .\perlos2.pod
960         copy ..\README.os390    .\perlos390.pod
961         copy ..\README.plan9    .\perlplan9.pod
962         copy ..\README.qnx      .\perlqnx.pod
963         copy ..\README.solaris  .\perlsolaris.pod
964         copy ..\README.tru64    .\perltru64.pod
965         copy ..\README.uts      .\perluts.pod
966         copy ..\README.vmesa    .\perlvmesa.pod
967         copy ..\vms\perlvms.pod .\perlvms.pod
968         copy ..\README.vos      .\perlvos.pod
969         copy ..\README.win32    .\perlwin32.pod
970         $(MAKE) -f ..\win32\pod.mak converters
971         cd ..\lib
972         $(PERLEXE) lib_pm.PL
973         cd ..\win32
974         $(PERLEXE) $(PL2BAT) $(UTILS)
975
976 distclean: clean
977         -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
978                 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
979         -del /f *.def *.map
980         -del /f $(EXTENSION_DLL)
981         -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
982         -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
983         -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
984         -del /f $(LIBDIR)\XSLoader.pm
985         -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
986         -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
987         -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
988         -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
989         -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
990         -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
991         -del /f $(LIBDIR)\File\Glob.pm
992         -del /f $(LIBDIR)\Storable.pm
993         -del /f $(LIBDIR)\Filter\Util\Call.pm
994         -del /f $(LIBDIR)\Digest\MD5.pm
995         -del /f $(LIBDIR)\PerlIO\Scalar.pm
996         -del /f $(LIBDIR)\PerlIO\Via.pm
997         -del /f $(LIBDIR)\MIME\Base64.pm
998         -del /f $(LIBDIR)\MIME\QuotedPrint.pm
999         -del /f $(LIBDIR)\List\Util.pm
1000         -del /f $(LIBDIR)\Scalar\Util.pm
1001         -del /f $(LIBDIR)\Time\HiRes.pm
1002         -del /f $(LIBDIR)\XS\Typemap.pm
1003         -del /f $(LIBDIR)\Unicode\Normalize.pm
1004         -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1005         -rmdir /s $(LIBDIR)\IO
1006         -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1007         -rmdir /s $(LIBDIR)\Thread
1008         -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1009         -rmdir /s $(LIBDIR)\B
1010         -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1011         -rmdir /s $(LIBDIR)\Data
1012         -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
1013         -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1014         -rmdir /s $(LIBDIR)\Digest
1015         -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1016         -rmdir /s $(LIBDIR)\MIME
1017         -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1018         -rmdir /s $(LIBDIR)\List
1019         -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1020         -rmdir /s $(LIBDIR)\Scalar
1021         -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1022         -rmdir /s $(LIBDIR)\XS
1023         cd $(PODDIR)
1024         -del /f *.html *.bat checkpods \
1025             perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
1026             perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
1027             perldos.pod perlepoc.pod perlhurd.pod \
1028             perlhpux.pod perlmachten.pod \
1029             perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1030             perlos2.pod perlos390.pod perlplan9.pod perlqnx.pod \
1031             perlsolaris.pod perltru64.pod perluts.pod \
1032             perlvmesa.pod perlvms.pod perlvos.pod \
1033             perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1034             podchecker podselect
1035         cd ..\utils
1036         -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc perlivp dprofpp
1037         -del /f *.bat
1038         cd ..\win32
1039         cd ..\x2p
1040         -del /f find2perl s2p
1041         -del /f *.bat
1042         cd ..\win32
1043         -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1044         -del /f $(CONFIGPM)
1045         -del /f bin\*.bat
1046         cd $(EXTDIR)
1047         -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
1048         cd ..\win32
1049         -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1050         -rmdir /s $(AUTODIR)
1051         -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1052         -rmdir /s $(COREDIR)
1053
1054 install : all installbare installhtml
1055
1056 installbare : utils
1057         $(PERLEXE) ..\installperl
1058         if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1059         $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1060         $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1061
1062 installhtml : doc
1063         $(RCOPY) html\*.* $(INST_HTML)\*.*
1064
1065 inst_lib : $(CONFIGPM)
1066         copy splittree.pl ..
1067         $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1068         $(RCOPY) ..\lib $(INST_LIB)\*.*
1069
1070 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1071         $(XCOPY) $(MINIPERL) ..\t\perl.exe
1072         $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1073         attrib -r ..\t\*.*
1074         copy test ..\t
1075         cd ..\t
1076         $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1077         cd ..\win32
1078
1079 test-prep : all utils
1080         $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1081         $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1082         $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1083
1084 test : test-prep
1085         cd ..\t
1086         $(PERLEXE) -I..\lib harness
1087         cd ..\win32
1088
1089 test-notty : test-prep
1090         set PERL_SKIP_TTY_TEST=1
1091         cd ..\t
1092         $(PERLEXE) -I..\lib harness
1093         cd ..\win32
1094
1095 test-wide : test-prep
1096         set HARNESS_PERL_SWITCHES=-C
1097         cd ..\t
1098         $(PERLEXE) -I..\lib harness
1099         cd ..\win32
1100
1101 test-wide-notty : test-prep
1102         set PERL_SKIP_TTY_TEST=1
1103         set HARNESS_PERL_SWITCHES=-C
1104         cd ..\t
1105         $(PERLEXE) -I..\lib harness
1106         cd ..\win32
1107
1108 _test : 
1109        $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1110        $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1111        $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1112        cd ..\t
1113        $(PERLEXE) -I..\lib harness
1114        cd ..\win32
1115
1116 clean : Extensions_clean
1117         -@$(DEL) miniperlmain$(o)
1118         -@$(DEL) $(MINIPERL)
1119         -@$(DEL) perlglob$(o)
1120         -@$(DEL) perlmain$(o)
1121         -@$(DEL) config.w32
1122         -@$(DEL) config.h
1123         -@$(DEL) $(GLOBEXE)
1124         -@$(DEL) $(PERLEXE)
1125         -@$(DEL) $(WPERLEXE)
1126         -@$(DEL) $(PERLDLL)
1127         -@$(DEL) $(CORE_OBJ)
1128         -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1129         -rmdir /s $(MINIDIR)
1130         -@$(DEL) $(WIN32_OBJ)
1131         -@$(DEL) $(DLL_OBJ)
1132         -@$(DEL) $(X2P_OBJ)
1133         -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1134         -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1135         -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1136         -@$(DEL) *.ilk
1137         -@$(DEL) *.pdb
1138
1139 # Handy way to run perlbug -ok without having to install and run the
1140 # installed perlbug. We don't re-run the tests here - we trust the user.
1141 # Please *don't* use this unless all tests pass.
1142 # If you want to report test failures, use "nmake nok" instead.
1143 ok: utils
1144         $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1145
1146 okfile: utils
1147         $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1148
1149 nok: utils
1150         $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1151
1152 nokfile: utils
1153         $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok