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