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