This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[win32] integrate mainline
[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
dc050285
GS
310DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread
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
68dc0745
PP
321
322SOCKET_DLL=..\lib\auto\Socket\Socket.dll
323FCNTL_DLL=..\lib\auto\Fcntl\Fcntl.dll
324OPCODE_DLL=..\lib\auto\Opcode\Opcode.dll
325SDBM_FILE_DLL=..\lib\auto\SDBM_File\SDBM_File.dll
326IO_DLL=..\lib\auto\IO\IO.dll
059e4e88 327ATTRS_DLL=..\lib\auto\attrs\attrs.dll
a98bd6f4 328THREAD_DLL=..\lib\auto\Thread\Thread.dll
68dc0745
PP
329
330STATICLINKMODULES=DynaLoader
331DYNALOADMODULES= \
332 $(SOCKET_DLL) \
333 $(FCNTL_DLL) \
334 $(OPCODE_DLL) \
335 $(SDBM_FILE_DLL)\
059e4e88 336 $(IO_DLL) \
910dfcc8 337 $(ATTRS_DLL) \
a98bd6f4 338 $(THREAD_DLL)
68dc0745
PP
339
340POD2HTML=$(PODDIR)\pod2html
341POD2MAN=$(PODDIR)\pod2man
342POD2LATEX=$(PODDIR)\pod2latex
343POD2TEXT=$(PODDIR)\pod2text
344
137443ea
PP
345#
346# Top targets
347#
0a753a76 348
d07c2202 349all: $(PERLEXE) $(PERL95EXE) $(GLOBEXE) $(DYNALOADMODULES) $(MINIMOD) \
dfb634a9 350 $(X2P)
0a753a76 351
d56e6723 352$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
0a753a76 353
137443ea 354#------------------------------------------------------------
0a753a76 355
d56e6723 356$(GLOBEXE): perlglob$(o)
dc050285 357 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
d56e6723 358 perlglob$(o) setargv$(o)
0a753a76 359
d56e6723 360perlglob$(o) : perlglob.c
137443ea 361
d56e6723 362..\miniperlmain$(o) : ..\miniperlmain.c $(CORE_H)
137443ea 363
3e3baf6d
TB
364config.w32 : $(CFGSH_TMPL)
365 copy $(CFGSH_TMPL) config.w32
366
d55594ae 367.\config.h : $(CFGH_TMPL)
3e3baf6d
TB
368 -del /f config.h
369 copy $(CFGH_TMPL) config.h
370
137443ea 371..\config.sh : config.w32 $(MINIPERL) config_sh.PL
910dfcc8
GS
372 $(MINIPERL) -I..\lib config_sh.PL \
373 "INST_DRV=$(INST_DRV)" \
374 "INST_TOP=$(INST_TOP)" \
d07c2202 375 "archname=$(ARCHNAME)" \
910dfcc8
GS
376 "cc=$(CC)" \
377 "ccflags=$(OPTIMIZE) $(DEFINES)" \
378 "cf_email=$(EMAIL)" \
26618a56 379 "d_crypt=$(D_CRYPT)" \
910dfcc8
GS
380 "libs=$(LIBFILES)" \
381 "incpath=$(CCINCDIR)" \
382 "libpth=$(CCLIBDIR)" \
383 "libc=$(LIBC)" \
384 "static_ext=$(STATIC_EXT)" \
385 "dynamic_ext=$(DYNAMIC_EXT)" \
aa4575bf 386 "LINK_FLAGS=$(LINK_FLAGS)" \
910dfcc8
GS
387 "optimize=$(OPTIMIZE)" \
388 config.w32 > ..\config.sh
137443ea 389
83437bec 390$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
137443ea 391 cd .. && miniperl configpm
c90c0ff4 392 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
d07c2202
GS
393 $(XCOPY) ..\*.h $(COREDIR)\*.*
394 $(XCOPY) *.h $(COREDIR)\*.*
395 $(RCOPY) include $(COREDIR)\*.*
3e3baf6d
TB
396 $(MINIPERL) -I..\lib config_h.PL || $(MAKE) CCTYPE=$(CCTYPE) \
397 RUNTIME=$(RUNTIME) CFG=$(CFG) $(CONFIGPM)
137443ea 398
d56e6723 399$(MINIPERL) : ..\miniperlmain$(o) $(CORE_OBJ) $(WIN32_OBJ)
137443ea 400 $(LINK32) -subsystem:console -out:$@ @<<
d56e6723 401 $(LINK_FLAGS) $(LIBFILES) ..\miniperlmain$(o) $(CORE_OBJ) $(WIN32_OBJ)
137443ea
PP
402<<
403
dc86dda3
NIS
404$(WIN32_OBJ) : $(CORE_H)
405$(CORE_OBJ) : $(CORE_H)
406$(DLL_OBJ) : $(CORE_H)
407$(PERL95_OBJ) : $(CORE_H)
d07c2202 408$(X2P_OBJ) : $(CORE_H)
0a753a76 409
910dfcc8
GS
410perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
411 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) \
412 CCTYPE=$(CCTYPE) > perldll.def
0a753a76 413
137443ea
PP
414$(PERLDLL): perldll.def $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
415 $(LINK32) -dll -def:perldll.def -out:$@ @<<
dc050285 416 $(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
137443ea 417<<
d07c2202 418 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
137443ea
PP
419
420perl.def : $(MINIPERL) makeperldef.pl
421 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
422
83437bec
NIS
423$(MINIMOD) : $(MINIPERL) ..\minimod.pl
424 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
425
d07c2202
GS
426$(X2P) : $(X2P_OBJ)
427 $(LINK32) -subsystem:console -out:$@ @<<
428 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
429<<
430
83437bec 431perlmain.c : runperl.c
0a753a76 432 copy runperl.c perlmain.c
137443ea 433
d56e6723 434perlmain$(o) : perlmain.c
3e3baf6d 435 $(CC) $(CFLAGS) -UPERLDLL -c perlmain.c
137443ea 436
d56e6723 437$(PERLEXE): $(PERLDLL) $(CONFIGPM) perlmain$(o)
dc050285 438 $(LINK32) -subsystem:console -out:perl.exe $(LINK_FLAGS) $(LIBFILES) \
d56e6723 439 perlmain$(o) $(WINIOMAYBE) $(PERLIMPLIB)
137443ea
PP
440 copy perl.exe $@
441 del perl.exe
0a753a76 442 copy splittree.pl ..
137443ea 443 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" "../LIB/auto"
0a753a76 444
3e3baf6d
TB
445perl95.c : runperl.c
446 copy runperl.c perl95.c
447
d56e6723 448perl95$(o) : perl95.c
22239a37 449 $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c perl95.c
3e3baf6d 450
d56e6723
GS
451win32sckmt$(o) : win32sck.c
452 $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
fb73857a 453
d56e6723
GS
454win32mt$(o) : win32.c
455 $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c $(OBJOUT_FLAG)win32mt$(o) win32.c
fb73857a
PP
456
457$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
dc050285 458 $(LINK32) -subsystem:console -out:perl95.exe $(LINK_FLAGS) $(LIBFILES) \
fb73857a 459 $(PERL95_OBJ) $(PERLIMPLIB)
3e3baf6d
TB
460 copy perl95.exe $@
461 del perl95.exe
462
137443ea 463$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
32f822de 464 if not exist ..\lib\auto mkdir ..\lib\auto
68dc0745
PP
465 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
466 cd $(EXTDIR)\$(*B)
467 $(XSUBPP) dl_win32.xs > $(*B).c
0a753a76
PP
468 cd ..\..\win32
469
68dc0745
PP
470$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
471 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
0a753a76 472
d55594ae 473$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
a98bd6f4
GS
474 cd $(EXTDIR)\$(*B)
475 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
476 $(MAKE)
477 cd ..\..\win32
478
d55594ae 479$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
059e4e88
GS
480 cd $(EXTDIR)\$(*B)
481 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
482 $(MAKE)
483 cd ..\..\win32
484
d55594ae
GS
485
486$(IO_DLL): $(PERLEXE) $(CONFIGPM) $(IO).xs
68dc0745 487 cd $(EXTDIR)\$(*B)
137443ea
PP
488 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
489 $(MAKE)
0a753a76
PP
490 cd ..\..\win32
491
137443ea 492$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
68dc0745 493 cd $(EXTDIR)\$(*B)
137443ea
PP
494 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
495 $(MAKE)
68dc0745 496 cd ..\..\win32
0a753a76 497
137443ea 498$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
68dc0745 499 cd $(EXTDIR)\$(*B)
137443ea
PP
500 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
501 $(MAKE)
0a753a76
PP
502 cd ..\..\win32
503
137443ea 504$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
68dc0745 505 cd $(EXTDIR)\$(*B)
137443ea
PP
506 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
507 $(MAKE)
68dc0745 508 cd ..\..\win32
0a753a76 509
059e4e88 510$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
68dc0745 511 cd $(EXTDIR)\$(*B)
137443ea
PP
512 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
513 $(MAKE)
0a753a76
PP
514 cd ..\..\win32
515
68dc0745 516doc: $(PERLEXE)
84902520
TB
517 cd ..\pod
518 $(MAKE) -f ..\win32\pod.mak checkpods pod2html pod2latex \
519 pod2man pod2text
520 $(XCOPY) *.bat ..\win32\bin\*.*
521 cd ..\win32
3e3baf6d 522 copy ..\README.win32 ..\pod\perlwin32.pod
d07c2202 523 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
3e3baf6d
TB
524 --podpath=pod:lib:ext:utils --htmlroot="//$(INST_HTML::=|)" \
525 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
68dc0745 526
3fe9a6f1
PP
527utils: $(PERLEXE)
528 cd ..\utils
529 nmake PERL=$(MINIPERL)
d07c2202 530 $(PERLEXE) -I..\lib ..\win32\$(PL2BAT) h2ph splain perlbug pl2pm c2ph
d444a431 531 $(PERLEXE) ..\win32\$(PL2BAT) h2xs perldoc pstruct
3fe9a6f1
PP
532 $(XCOPY) *.bat ..\win32\bin\*.*
533 cd ..\win32
d444a431 534 $(PERLEXE) $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \
dfb634a9 535 bin\pl2bat.pl bin\perlglob.pl
3fe9a6f1 536
137443ea 537distclean: clean
dc050285 538 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
83437bec 539 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
3e3baf6d 540 -del /f *.def *.map
54310121 541 -del /f $(SOCKET_DLL) $(IO_DLL) $(SDBM_FILE_DLL) $(FCNTL_DLL) \
a98bd6f4 542 $(OPCODE_DLL) $(ATTRS_DLL) $(THREAD_DLL)
54310121 543 -del /f $(SOCKET).c $(IO).c $(SDBM_FILE).c $(FCNTL).c $(OPCODE).c \
a98bd6f4 544 $(DYNALOADER).c $(ATTRS).c $(THREAD).c
68dc0745
PP
545 -del /f $(PODDIR)\*.html
546 -del /f $(PODDIR)\*.bat
d444a431
TB
547 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c \
548 config.h.new perl95.c
549 -del /f bin\*.bat
d07c2202
GS
550 -rmdir /s /q ..\lib\auto || rmdir /s ..\lib\auto
551 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
3e3baf6d 552 cd $(EXTDIR)
d56e6723 553 -del /s *.lib *.def *.map *.bs Makefile *$(o) pm_to_blib
3e3baf6d 554 cd ..\win32
68dc0745 555
3e3baf6d 556install : all doc utils
d07c2202 557 $(PERLEXE) ..\installperl
3e3baf6d 558 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
68dc0745 559 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
d444a431 560 $(XCOPY) bin\*.bat $(INST_BIN)\*.*
68dc0745 561 $(XCOPY) ..\pod\*.bat $(INST_BIN)\*.*
3e3baf6d 562 $(RCOPY) html\*.* $(INST_HTML)\*.*
68dc0745 563
137443ea 564inst_lib : $(CONFIGPM)
68dc0745 565 copy splittree.pl ..
137443ea 566 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" "../LIB/auto"
c90c0ff4 567 $(RCOPY) ..\lib $(INST_LIB)\*.*
0a753a76 568
dfb634a9 569minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
137443ea
PP
570 $(XCOPY) $(MINIPERL) ..\t\perl.exe
571 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
572 attrib -r ..\t\*.*
573 copy test ..\t
574 cd ..\t
575 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
576 cd ..\win32
577
dfb634a9 578test-prep : all utils
68dc0745
PP
579 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
580 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
581 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
fb73857a
PP
582
583test : test-prep
584 cd ..\t
585 $(PERLEXE) -I..\lib harness
586 cd ..\win32
587
588test-notty : test-prep
589 set PERL_SKIP_TTY_TEST=1
137443ea
PP
590 cd ..\t
591 $(PERLEXE) -I..\lib harness
68dc0745 592 cd ..\win32
137443ea
PP
593
594clean :
d56e6723 595 -@erase miniperlmain$(o)
137443ea 596 -@erase $(MINIPERL)
d56e6723
GS
597 -@erase perlglob$(o)
598 -@erase perlmain$(o)
3e3baf6d
TB
599 -@erase config.w32
600 -@erase /f config.h
137443ea
PP
601 -@erase $(GLOBEXE)
602 -@erase $(PERLEXE)
603 -@erase $(PERLDLL)
604 -@erase $(CORE_OBJ)
605 -@erase $(WIN32_OBJ)
606 -@erase $(DLL_OBJ)
d07c2202 607 -@erase $(X2P_OBJ)
d56e6723 608 -@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp
d444a431 609 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
d07c2202 610 -@erase ..\x2p\*.exe ..\x2p\*.bat
137443ea
PP
611 -@erase *.ilk
612 -@erase *.pdb
613
614