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