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