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