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