This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[win32] Integrate winansi again. Result builds and passes all tests on all
[perl5.git] / win32 / makefile.mk
CommitLineData
08aa1457
PP
1#
2# Makefile to build perl on Windowns NT using Microsoft NMAKE.
3#
4#
5# This is set up to build a perl.exe that runs off a shared library
6# (perl.dll). Also makes individual DLLs for the XS extensions.
7#
8
9#
10# Set these to wherever you want "nmake install" to put your
11# newly built perl.
12INST_DRV=c:
a835ef8a 13INST_TOP=$(INST_DRV)\perl5004.5x
e7cd54d7 14BUILDOPT=-DUSE_THREADS
910dfcc8
GS
15#BUILDOPT=-DMULTIPLICITY
16#BUILDOPT=-DMULTIPLICITY -DUSE_THREADS
17#BUILDOPT=-DPERL_GLOBAL_STRUCT -DMULTIPLICITY
d55594ae
GS
18
19# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
08aa1457
PP
20
21#
22# uncomment one if you are using Visual C++ 2.x or Borland
23# comment out both if you are using Visual C++ 4.x and above
24#CCTYPE=MSVC20
25CCTYPE=BORLAND
26
27#
28# uncomment next line if you want debug version of perl (big,slow)
29#CFG=Debug
30
31#
32# set the install locations of the compiler include/libraries
33#CCHOME = f:\msdev\vc
d55594ae 34CCHOME = C:\bc5
08aa1457
PP
35CCINCDIR = $(CCHOME)\include
36CCLIBDIR = $(CCHOME)\lib
37
38#
39# set this to point to cmd.exe (only needed if you use some
40# alternate shell that doesn't grok cmd.exe style commands)
d55594ae 41#SHELL = g:\winnt\system32\cmd.exe
08aa1457
PP
42
43#
44# set this to your email address (perl will guess a value from
45# from your loginname and your hostname, which may not be right)
46#EMAIL =
47
48##################### CHANGE THESE ONLY IF YOU MUST #####################
49
50#
51# Programs to compile, build .lib files and link
52#
53
54.USESHELL :
55
56.IF "$(CCTYPE)" == "BORLAND"
57
58CC = bcc32
59LINK32 = tlink32
60LIB32 = tlib
c31fac66 61IMPLIB = implib -c
08aa1457
PP
62
63#
64# Options
65#
66RUNTIME = -D_RTLDLL
67INCLUDES = -I.\include -I. -I.. -I$(CCINCDIR)
68#PCHFLAGS = -H -H$(INTDIR)\bcmoduls.pch
d55594ae 69DEFINES = -DWIN32 $(BUILDOPT)
c31fac66 70LOCDEFS = -DPERLDLL -DPERL_CORE
08aa1457
PP
71SUBSYS = console
72LIBC = cw32mti.lib
73LIBFILES = import32.lib $(LIBC) odbc32.lib odbccp32.lib
74
75WINIOMAYBE =
76
77.IF "$(CFG)" == "Debug"
910dfcc8 78OPTIMIZE = -v $(RUNTIME) -DDEBUGGING
08aa1457
PP
79LINK_DBG = -v
80.ELSE
d55594ae 81OPTIMIZE = -5 -O2 $(RUNTIME)
08aa1457
PP
82LINK_DBG =
83.ENDIF
84
910dfcc8 85CFLAGS = -w -d -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE)
08aa1457
PP
86LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR)
87OBJOUT_FLAG = -o
88
89.ELSE
90
91CC=cl.exe
92LINK32=link.exe
93LIB32=$(LINK32) -lib
94#
95# Options
96#
97.IF "$(RUNTIME)" == ""
98RUNTIME = -MD
99.ENDIF
100INCLUDES = -I.\include -I. -I..
101#PCHFLAGS = -Fp$(INTDIR)\vcmoduls.pch -YX
32f822de 102DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT)
c31fac66 103LOCDEFS = -DPERLDLL -DPERL_CORE
08aa1457
PP
104SUBSYS = console
105
106.IF "$(RUNTIME)" == "-MD"
107LIBC = msvcrt.lib
108WINIOMAYBE =
109.ELSE
110LIBC = libcmt.lib
390b85e7 111WINIOMAYBE =
08aa1457
PP
112.ENDIF
113
114.IF "$(CFG)" == "Debug"
115.IF "$(CCTYPE)" == "MSVC20"
910dfcc8 116OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING
08aa1457 117.ELSE
910dfcc8 118OPTIMIZE = -Od $(RUNTIME)d -Z7 -D_DEBUG -DDEBUGGING
08aa1457
PP
119.ENDIF
120LINK_DBG = -debug -pdb:none
121.ELSE
122.IF "$(CCTYPE)" == "MSVC20"
123OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
124.ELSE
125OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
126.ENDIF
127LINK_DBG = -release
128.ENDIF
129
130# we don't add LIBC here, the compiler do it based on -MD/-MT
131LIBFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib \
132 winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
133 oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
134 version.lib odbc32.lib odbccp32.lib
135
5d925967 136CFLAGS = -nologo -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE)
dc050285 137LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
08aa1457
PP
138OBJOUT_FLAG = -Fo
139
140.ENDIF
141
142#################### do not edit below this line #######################
143############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
144
145#
146# Rules
147#
148.SUFFIXES :
149.SUFFIXES : .c .obj .dll .lib .exe
150
151.c.obj:
152 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $<
153
154.IF "$(CCTYPE)" == "BORLAND"
155
156.obj.dll:
157 $(LINK32) -Tpd -ap $(LINK_FLAGS) c0d32.obj $<,$@,,$(LIBFILES),$(*B).def
158 $(IMPLIB) $(*B).lib $@
159.ELSE
160
161.obj.dll:
162 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
dc050285 163 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
08aa1457
PP
164
165.ENDIF
166
167#
168INST_BIN=$(INST_TOP)\bin
169INST_LIB=$(INST_TOP)\lib
170INST_POD=$(INST_LIB)\pod
171INST_HTML=$(INST_POD)\html
172LIBDIR=..\lib
173EXTDIR=..\ext
174PODDIR=..\pod
175EXTUTILSDIR=$(LIBDIR)\extutils
176
177#
178# various targets
179PERLIMPLIB=..\perl.lib
180MINIPERL=..\miniperl.exe
181PERLDLL=..\perl.dll
182PERLEXE=..\perl.exe
183GLOBEXE=..\perlglob.exe
184CONFIGPM=..\lib\Config.pm
185MINIMOD=..\lib\ExtUtils\Miniperl.pm
186
d444a431
TB
187PL2BAT=bin\pl2bat.pl
188GLOBBAT = bin\perlglob.bat
08aa1457
PP
189
190.IF "$(CCTYPE)" == "BORLAND"
191
192# Borland wildargs is incompatible with MS setargv
193CFGSH_TMPL = config.bc
194CFGH_TMPL = config_H.bc
195# Borland's perl.exe will work on W95, so we don't make this
196
197.ELSE
198
199MAKE = nmake -nologo
200CFGSH_TMPL = config.vc
201CFGH_TMPL = config_H.vc
202PERL95EXE=..\perl95.exe
203
204.ENDIF
205
206XCOPY=xcopy /f /r /i /d
207RCOPY=xcopy /f /r /i /e /d
208#NULL=
209
210#
211# filenames given to xsubpp must have forward slashes (since it puts
212# full pathnames in #line strings)
213XSUBPP=..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes
214
215CORE_C= ..\av.c \
216 ..\deb.c \
217 ..\doio.c \
218 ..\doop.c \
219 ..\dump.c \
220 ..\globals.c \
221 ..\gv.c \
222 ..\hv.c \
223 ..\mg.c \
224 ..\op.c \
225 ..\perl.c \
226 ..\perlio.c \
227 ..\perly.c \
228 ..\pp.c \
229 ..\pp_ctl.c \
230 ..\pp_hot.c \
231 ..\pp_sys.c \
232 ..\regcomp.c \
233 ..\regexec.c \
234 ..\run.c \
235 ..\scope.c \
236 ..\sv.c \
237 ..\taint.c \
238 ..\toke.c \
239 ..\universal.c \
bbc8f9de
NIS
240 ..\util.c \
241 ..\malloc.c
08aa1457
PP
242
243CORE_OBJ= ..\av.obj \
244 ..\deb.obj \
245 ..\doio.obj \
246 ..\doop.obj \
247 ..\dump.obj \
248 ..\globals.obj \
249 ..\gv.obj \
250 ..\hv.obj \
251 ..\mg.obj \
252 ..\op.obj \
253 ..\perl.obj \
254 ..\perlio.obj \
255 ..\perly.obj \
256 ..\pp.obj \
257 ..\pp_ctl.obj \
258 ..\pp_hot.obj \
259 ..\pp_sys.obj \
260 ..\regcomp.obj \
261 ..\regexec.obj \
262 ..\run.obj \
263 ..\scope.obj \
264 ..\sv.obj \
265 ..\taint.obj \
266 ..\toke.obj \
267 ..\universal.obj\
910dfcc8 268 ..\util.obj \
bbc8f9de 269 ..\malloc.obj
08aa1457
PP
270
271WIN32_C = perllib.c \
272 win32.c \
d55594ae
GS
273 win32sck.c \
274 win32thread.c
08aa1457
PP
275
276WIN32_OBJ = win32.obj \
d55594ae
GS
277 win32sck.obj \
278 win32thread.obj
08aa1457 279
fb73857a
PP
280PERL95_OBJ = perl95.obj \
281 win32mt.obj \
fb73857a
PP
282 win32sckmt.obj
283
08aa1457
PP
284DLL_OBJ = perllib.obj $(DYNALOADER).obj
285
286CORE_H = ..\av.h \
287 ..\cop.h \
288 ..\cv.h \
289 ..\dosish.h \
290 ..\embed.h \
291 ..\form.h \
292 ..\gv.h \
293 ..\handy.h \
294 ..\hv.h \
295 ..\mg.h \
296 ..\nostdio.h \
297 ..\op.h \
298 ..\opcode.h \
299 ..\perl.h \
300 ..\perlio.h \
301 ..\perlsdio.h \
302 ..\perlsfio.h \
303 ..\perly.h \
304 ..\pp.h \
305 ..\proto.h \
306 ..\regexp.h \
307 ..\scope.h \
308 ..\sv.h \
5d925967 309 ..\thread.h \
08aa1457
PP
310 ..\unixish.h \
311 ..\util.h \
312 ..\XSUB.h \
313 .\config.h \
314 ..\EXTERN.h \
910dfcc8
GS
315 ..\perlvars.h \
316 ..\intrpvar.h \
317 ..\thrdvar.h \
08aa1457
PP
318 .\include\dirent.h \
319 .\include\netdb.h \
320 .\include\sys\socket.h \
321 .\win32.h
322
dc050285
GS
323DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread
324STATIC_EXT=DynaLoader
08aa1457
PP
325
326DYNALOADER=$(EXTDIR)\DynaLoader\DynaLoader
327SOCKET=$(EXTDIR)\Socket\Socket
328FCNTL=$(EXTDIR)\Fcntl\Fcntl
329OPCODE=$(EXTDIR)\Opcode\Opcode
330SDBM_FILE=$(EXTDIR)\SDBM_File\SDBM_File
331IO=$(EXTDIR)\IO\IO
5d925967 332ATTRS=$(EXTDIR)\attrs\attrs
a98bd6f4 333THREAD=$(EXTDIR)\Thread\Thread
08aa1457
PP
334
335SOCKET_DLL=..\lib\auto\Socket\Socket.dll
336FCNTL_DLL=..\lib\auto\Fcntl\Fcntl.dll
337OPCODE_DLL=..\lib\auto\Opcode\Opcode.dll
338SDBM_FILE_DLL=..\lib\auto\SDBM_File\SDBM_File.dll
339IO_DLL=..\lib\auto\IO\IO.dll
5d925967 340ATTRS_DLL=..\lib\auto\attrs\attrs.dll
a98bd6f4 341THREAD_DLL=..\lib\auto\Thread\Thread.dll
08aa1457
PP
342
343STATICLINKMODULES=DynaLoader
344DYNALOADMODULES= \
345 $(SOCKET_DLL) \
346 $(FCNTL_DLL) \
347 $(OPCODE_DLL) \
348 $(SDBM_FILE_DLL)\
5d925967 349 $(IO_DLL) \
a98bd6f4
GS
350 $(ATTRS_DLL) \
351 $(THREAD_DLL)
08aa1457
PP
352
353POD2HTML=$(PODDIR)\pod2html
354POD2MAN=$(PODDIR)\pod2man
355POD2LATEX=$(PODDIR)\pod2latex
356POD2TEXT=$(PODDIR)\pod2text
357
358#
359# Top targets
360#
361
362all: $(PERLEXE) $(PERL95EXE) $(GLOBEXE) $(DYNALOADMODULES) $(MINIMOD) $(GLOBBAT)
363
364$(DYNALOADER).obj : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
365
366#------------------------------------------------------------
367
368$(GLOBEXE): perlglob.obj
369.IF "$(CCTYPE)" == "BORLAND"
370 $(CC) -c -w -v -tWM -I$(CCINCDIR) perlglob.c
371 $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32.obj perlglob.obj \
372 $(CCLIBDIR)\32BIT\wildargs.obj,$@,,import32.lib cw32mt.lib,
373.ELSE
dc050285
GS
374 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
375 perlglob.obj setargv.obj
08aa1457
PP
376.ENDIF
377
d444a431
TB
378$(GLOBBAT) : ..\lib\File\DosGlob.pm $(MINIPERL)
379 $(MINIPERL) $(PL2BAT) - < ..\lib\File\DosGlob.pm > $(GLOBBAT)
08aa1457
PP
380
381perlglob.obj : perlglob.c
382
383..\miniperlmain.obj : ..\miniperlmain.c $(CORE_H)
384
385config.w32 : $(CFGSH_TMPL)
386 copy $(CFGSH_TMPL) config.w32
387
d55594ae 388.\config.h : $(CFGH_TMPL)
08aa1457
PP
389 -del /f config.h
390 copy $(CFGH_TMPL) config.h
391
392..\config.sh : config.w32 $(MINIPERL) config_sh.PL
910dfcc8
GS
393 $(MINIPERL) -I..\lib config_sh.PL \
394 "INST_DRV=$(INST_DRV)" \
395 "INST_TOP=$(INST_TOP)" \
396 "cc=$(CC)" \
397 "ccflags=$(OPTIMIZE) $(DEFINES)" \
398 "cf_email=$(EMAIL)" \
399 "libs=$(LIBFILES:f)" \
400 "incpath=$(CCINCDIR)" \
401 "libpth=$(strip $(CCLIBDIR) $(LIBFILES:d))" \
402 "libc=$(LIBC)" \
403 "static_ext=$(STATIC_EXT)" \
404 "dynamic_ext=$(DYNAMIC_EXT)" \
405 "ldflags=$(LINK_FLAGS)" \
406 "optimize=$(OPTIMIZE)" \
407 config.w32 > ..\config.sh
08aa1457
PP
408
409$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
410 cd .. && miniperl configpm
411 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
412 $(XCOPY) ..\*.h ..\lib\CORE\*.*
413 $(XCOPY) *.h ..\lib\CORE\*.*
414 $(RCOPY) include ..\lib\CORE\*.*
415 $(MINIPERL) -I..\lib config_h.PL || $(MAKE) CCTYPE=$(CCTYPE) \
416 RUNTIME=$(RUNTIME) CFG=$(CFG) $(CONFIGPM)
417
418$(MINIPERL) : ..\miniperlmain.obj $(CORE_OBJ) $(WIN32_OBJ)
419.IF "$(CCTYPE)" == "BORLAND"
420 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
421 @$(mktmp c0x32.obj ..\miniperlmain.obj \
422 $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\),$@,,$(LIBFILES),)
423.ELSE
424 $(LINK32) -subsystem:console -out:$@ \
dc050285 425 @$(mktmp $(LINK_FLAGS) $(LIBFILES) ..\miniperlmain.obj \
08aa1457
PP
426 $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\))
427.ENDIF
428
429$(WIN32_OBJ) : $(CORE_H)
430$(CORE_OBJ) : $(CORE_H)
431$(DLL_OBJ) : $(CORE_H)
432
d55594ae 433perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
910dfcc8
GS
434 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) \
435 CCTYPE=$(CCTYPE) > perldll.def
08aa1457
PP
436
437$(PERLDLL): perldll.def $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
438.IF "$(CCTYPE)" == "BORLAND"
439 $(LINK32) -Tpd -ap $(LINK_FLAGS) \
440 @$(mktmp c0d32.obj $(CORE_OBJ:s,\,\\) \
441 $(WIN32_OBJ:s,\,\\) $(DLL_OBJ:s,\,\\)\n \
442 $@,\n \
443 $(LIBFILES)\n \
444 perldll.def\n)
445 $(IMPLIB) $*.lib $@
446.ELSE
447 $(LINK32) -dll -def:perldll.def -out:$@ \
dc050285 448 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ:s,\,\\) \
08aa1457
PP
449 $(WIN32_OBJ:s,\,\\) $(DLL_OBJ:s,\,\\))
450.ENDIF
451 $(XCOPY) $(PERLIMPLIB) ..\lib\CORE
452
453perl.def : $(MINIPERL) makeperldef.pl
454 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
455
456$(MINIMOD) : $(MINIPERL) ..\minimod.pl
457 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
458
459perlmain.c : runperl.c
460 copy runperl.c perlmain.c
461
462perlmain.obj : perlmain.c
463 $(CC) $(CFLAGS) -UPERLDLL -c perlmain.c
464
08aa1457
PP
465$(PERLEXE): $(PERLDLL) $(CONFIGPM) perlmain.obj
466.IF "$(CCTYPE)" == "BORLAND"
467 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
468 @$(mktmp c0x32.obj perlmain.obj $(WINIOMAYBE)\n \
469 $@,\n \
470 $(PERLIMPLIB) $(LIBFILES)\n)
471.ELSE
dc050285 472 $(LINK32) -subsystem:console -out:perl.exe $(LINK_FLAGS) $(LIBFILES) \
08aa1457
PP
473 perlmain.obj $(WINIOMAYBE) $(PERLIMPLIB)
474 copy perl.exe $@
475 del perl.exe
476.ENDIF
477 copy splittree.pl ..
478 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" "../LIB/auto"
08aa1457
PP
479
480.IF "$(CCTYPE)" != "BORLAND"
481
482perl95.c : runperl.c
483 copy runperl.c perl95.c
484
485perl95.obj : perl95.c
910dfcc8 486 $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c perl95.c
08aa1457 487
fb73857a 488win32sckmt.obj : win32sck.c
910dfcc8 489 $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c $(OBJOUT_FLAG)win32sckmt.obj win32sck.c
fb73857a
PP
490
491win32mt.obj : win32.c
910dfcc8 492 $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c $(OBJOUT_FLAG)win32mt.obj win32.c
fb73857a
PP
493
494$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
dc050285 495 $(LINK32) -subsystem:console -out:perl95.exe $(LINK_FLAGS) $(LIBFILES) \
fb73857a 496 $(PERL95_OBJ) $(PERLIMPLIB)
08aa1457
PP
497 copy perl95.exe $@
498 del perl95.exe
499
500.ENDIF
501
502$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
503 if not exist ..\lib\auto mkdir ..\lib\auto
504 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
505 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
506 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
507
508$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
509 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
510
a98bd6f4
GS
511$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
512 cd $(EXTDIR)\$(*B) && \
513 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
514 cd $(EXTDIR)\$(*B) && $(MAKE)
515
5d925967
GS
516$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
517 cd $(EXTDIR)\$(*B) && \
518 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
519 cd $(EXTDIR)\$(*B) && $(MAKE)
520
521$(IO_DLL): $(PERLEXE) $(IO).xs
08aa1457
PP
522 cd $(EXTDIR)\$(*B) && \
523 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
524 cd $(EXTDIR)\$(*B) && $(MAKE)
525
526$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
527 cd $(EXTDIR)\$(*B) && \
528 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
529 cd $(EXTDIR)\$(*B) && $(MAKE)
530
531$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
532 cd $(EXTDIR)\$(*B) && \
533 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
534 cd $(EXTDIR)\$(*B) && $(MAKE)
535
536$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
537 cd $(EXTDIR)\$(*B) && \
538 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
539 cd $(EXTDIR)\$(*B) && $(MAKE)
540
5d925967 541$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
08aa1457
PP
542 cd $(EXTDIR)\$(*B) && \
543 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
544 cd $(EXTDIR)\$(*B) && $(MAKE)
545
546doc: $(PERLEXE)
84902520
TB
547 cd ..\pod && $(MAKE) -f ..\win32\pod.mak checkpods \
548 pod2html pod2latex pod2man pod2text
549 cd ..\pod && $(XCOPY) *.bat ..\win32\bin\*.*
08aa1457
PP
550 copy ..\README.win32 ..\pod\perlwin32.pod
551 $(PERLEXE) ..\installhtml --podroot=.. --htmldir=./html \
552 --podpath=pod:lib:ext:utils --htmlroot="//$(INST_HTML:s,:,|,)" \
553 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
554
555utils: $(PERLEXE)
556 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
557 cd ..\utils && $(PERLEXE) ..\win32\$(PL2BAT) h2ph splain perlbug \
558 pl2pm c2ph h2xs perldoc pstruct
d444a431
TB
559 $(XCOPY) ..\utils\*.bat bin\*.*
560 $(PERLEXE) $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \
561 bin\pl2bat.pl
08aa1457
PP
562
563distclean: clean
dc050285 564 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
08aa1457
PP
565 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
566 -del /f *.def *.map
567 -del /f $(SOCKET_DLL) $(IO_DLL) $(SDBM_FILE_DLL) $(FCNTL_DLL) \
a98bd6f4 568 $(OPCODE_DLL) $(ATTRS_DLL) $(THREAD_DLL)
08aa1457 569 -del /f $(SOCKET).c $(IO).c $(SDBM_FILE).c $(FCNTL).c $(OPCODE).c \
a98bd6f4 570 $(DYNALOADER).c $(ATTRS).c $(THREAD).c
08aa1457
PP
571 -del /f $(PODDIR)\*.html
572 -del /f $(PODDIR)\*.bat
d444a431
TB
573 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
574.IF "$(PERL95EXE)" != ""
575 -del /f perl95.c
576.ENDIF
577 -del /f bin\*.bat
08aa1457
PP
578 -cd $(EXTDIR) && del /s *.lib *.def *.map *.bs Makefile *.obj pm_to_blib
579 -rmdir /s /q ..\lib\auto
580 -rmdir /s /q ..\lib\CORE
581
582install : all doc utils
583 if not exist $(INST_TOP) mkdir $(INST_TOP)
584 echo I $(INST_TOP) L $(LIBDIR)
585 $(XCOPY) $(PERLEXE) $(INST_BIN)\*.*
586.IF "$(PERL95EXE)" != ""
587 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
588.ENDIF
589 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
08aa1457 590 $(XCOPY) $(PERLDLL) $(INST_BIN)\*.*
d444a431 591 $(XCOPY) bin\*.bat $(INST_BIN)\*.*
08aa1457
PP
592 $(RCOPY) ..\lib $(INST_LIB)\*.*
593 $(XCOPY) ..\pod\*.bat $(INST_BIN)\*.*
594 $(XCOPY) ..\pod\*.pod $(INST_POD)\*.*
595 $(RCOPY) html\*.* $(INST_HTML)\*.*
596
597inst_lib : $(CONFIGPM)
598 copy splittree.pl ..
599 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" "../LIB/auto"
600 $(RCOPY) ..\lib $(INST_LIB)\*.*
601
602minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM)
603 $(XCOPY) $(MINIPERL) ..\t\perl.exe
604.IF "$(CCTYPE)" == "BORLAND"
605 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
606.ELSE
607 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
608.ENDIF
609 attrib -r ..\t\*.*
610 copy test ..\t
611 cd ..\t && \
612 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
613
32f822de 614test-prep : all
08aa1457
PP
615 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
616 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
617.IF "$(CCTYPE)" == "BORLAND"
618 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
619.ELSE
620 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
621.ENDIF
32f822de
GS
622
623test : test-prep
08aa1457
PP
624 cd ..\t && $(PERLEXE) -I..\lib harness
625
32f822de
GS
626test-notty : test-prep
627 set PERL_SKIP_TTY_TEST=1 && \
628 cd ..\t && $(PERLEXE) -I.\lib harness
629
08aa1457
PP
630clean :
631 -@erase miniperlmain.obj
632 -@erase $(MINIPERL)
633 -@erase perlglob.obj
634 -@erase perlmain.obj
635 -@erase config.w32
636 -@erase /f config.h
637 -@erase $(GLOBEXE)
638 -@erase $(PERLEXE)
639 -@erase $(PERLDLL)
640 -@erase $(CORE_OBJ)
641 -@erase $(WIN32_OBJ)
642 -@erase $(DLL_OBJ)
d444a431
TB
643 -@erase ..\*.obj ..\*.lib ..\*.exp *.obj *.lib *.exp
644 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
08aa1457
PP
645 -@erase *.ilk
646 -@erase *.pdb
647
648