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