This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
added patch, regen headers
[perl5.git] / win32 / makefile.mk
CommitLineData
08aa1457 1#
d56e6723
GS
2# Makefile to build perl on Windowns NT using DMAKE.
3# Supported compilers:
4# Visual C++ 2.0 thro 5.0
5# Borland C++ 5.02
6# Mingw32-0.1.4 with gcc-2.7.2
08aa1457
PP
7#
8# This is set up to build a perl.exe that runs off a shared library
9# (perl.dll). Also makes individual DLLs for the XS extensions.
10#
11
12#
13# Set these to wherever you want "nmake install" to put your
14# newly built perl.
d56e6723 15INST_DRV *= c:
e5a95ffb
GS
16INST_TOP *= $(INST_DRV)\perl
17
18# Comment this out if you DON'T want your perl installation to be versioned.
19# This means that the new installation will overwrite any files from the
20# old installation at the same INST_TOP location. Leaving it enabled is
21# the safest route, as perl adds the extra version directory to all the
22# locations it installs files to. If you disable it, an alternative
23# versioned installation can be obtained by setting INST_TOP above to a
24# path that includes an arbitrary version string.
193fb0af 25INST_VER *= \5.00467
d56e6723
GS
26
27#
d07c2202 28# uncomment to enable threads-capabilities
07ba5892 29#USE_THREADS *= define
08aa1457
PP
30
31#
d56e6723
GS
32# uncomment one
33#CCTYPE *= MSVC20
34#CCTYPE *= MSVC
4a52a3da
GS
35CCTYPE *= BORLAND
36#CCTYPE *= GCC
08aa1457
PP
37
38#
8f818fa0 39# uncomment next line if you want to use the perl object
26ca90b6
GS
40# Currently, this cannot be enabled if you ask for threads above
41#OBJECT *= -DPERL_OBJECT
8f818fa0
GS
42
43#
08aa1457 44# uncomment next line if you want debug version of perl (big,slow)
d56e6723 45#CFG *= Debug
08aa1457
PP
46
47#
26618a56 48# if you have the source for des_fcrypt(), uncomment this and make sure the
a1dd9325
GS
49# file exists (see README.win32). File should be located at the perl
50# top level directory.
26618a56
GS
51#CRYPT_SRC *= des_fcrypt.c
52
53#
54# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
55# library, uncomment this, and make sure the library exists (see README.win32)
a1dd9325 56# Specify the full pathname of the library.
26618a56
GS
57#CRYPT_LIB *= des_fcrypt.lib
58
59#
1c1c7f20
GS
60# set this if you wish to use perl's malloc
61# WARNING: Turning this on/off WILL break binary compatibility with extensions
62# you may have compiled with/without it. Be prepared to recompile all extensions
26ca90b6
GS
63# if you change the default. Currently, this cannot be enabled if you ask for
64# PERL_OBJECT above.
ac4c12e7 65#PERL_MALLOC *= define
1c1c7f20
GS
66
67#
08aa1457 68# set the install locations of the compiler include/libraries
eb480a0b 69#
d56e6723 70#CCHOME *= f:\msdev\vc
4a52a3da
GS
71CCHOME *= C:\bc5
72#CCHOME *= D:\packages\mingw32
d56e6723
GS
73CCINCDIR *= $(CCHOME)\include
74CCLIBDIR *= $(CCHOME)\lib
08aa1457
PP
75
76#
fa4efe8e
GS
77# specify space-separated list of extra directories to look for libraries
78#
79EXTRALIBDIRS *=
80
81#
08aa1457
PP
82# set this to point to cmd.exe (only needed if you use some
83# alternate shell that doesn't grok cmd.exe style commands)
d56e6723 84#SHELL *= g:\winnt\system32\cmd.exe
08aa1457
PP
85
86#
87# set this to your email address (perl will guess a value from
88# from your loginname and your hostname, which may not be right)
eb480a0b 89#EMAIL *=
08aa1457
PP
90
91##################### CHANGE THESE ONLY IF YOU MUST #####################
92
26618a56 93.IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
eb480a0b 94D_CRYPT = undef
26618a56 95.ELSE
eb480a0b
GS
96D_CRYPT = define
97CRYPT_FLAG = -DHAVE_DES_FCRYPT
26618a56
GS
98.ENDIF
99
eb480a0b
GS
100.IF "$(OBJECT)" != ""
101PERL_MALLOC != undef
1c1c7f20
GS
102.ENDIF
103
eb480a0b
GS
104PERL_MALLOC *= undef
105
106USE_THREADS *= undef
107
924b3ec4
GS
108#BUILDOPT *= -DMULTIPLICITY
109#BUILDOPT *= -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
d07c2202
GS
110# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
111
112.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
113
114PROCESSOR_ARCHITECTURE *= x86
115
924b3ec4 116.IF "$(USE_THREADS)" == "define"
d07c2202 117ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
924b3ec4
GS
118.ELSE
119ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
d07c2202
GS
120.ENDIF
121
122ARCHDIR = ..\lib\$(ARCHNAME)
123COREDIR = ..\lib\CORE
eb480a0b 124AUTODIR = ..\lib\auto
d07c2202 125
08aa1457
PP
126#
127# Programs to compile, build .lib files and link
128#
129
130.USESHELL :
131
132.IF "$(CCTYPE)" == "BORLAND"
133
eb480a0b
GS
134CC = bcc32
135LINK32 = tlink32
064a70d4 136LIB32 = tlib /P128
eb480a0b 137IMPLIB = implib -c
08aa1457
PP
138
139#
140# Options
141#
eb480a0b
GS
142RUNTIME = -D_RTLDLL
143INCLUDES = -I.\include -I. -I.. -I$(CCINCDIR)
144#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
145DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
146LOCDEFS = -DPERLDLL -DPERL_CORE
147SUBSYS = console
148CXX_FLAG = -P
08aa1457 149
eb480a0b
GS
150LIBC = cw32mti.lib
151LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib
08aa1457
PP
152
153.IF "$(CFG)" == "Debug"
eb480a0b
GS
154OPTIMIZE = -v $(RUNTIME) -DDEBUGGING
155LINK_DBG = -v
08aa1457 156.ELSE
6a6688c3 157OPTIMIZE = -O2 $(RUNTIME)
eb480a0b 158LINK_DBG =
08aa1457
PP
159.ENDIF
160
eb480a0b
GS
161CFLAGS = -w -d -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
162 $(PCHFLAGS) $(OPTIMIZE)
fa4efe8e 163LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
eb480a0b
GS
164OBJOUT_FLAG = -o
165EXEOUT_FLAG = -e
064a70d4 166LIBOUT_FLAG =
d56e6723
GS
167
168.ELIF "$(CCTYPE)" == "GCC"
169
fa4efe8e
GS
170CC = gcc -pipe
171LINK32 = gcc -pipe
064a70d4 172LIB32 = ar rc
eb480a0b 173IMPLIB = dlltool
d56e6723
GS
174
175o = .o
eda5ff31 176a = .a
d56e6723
GS
177
178#
179# Options
180#
eb480a0b
GS
181RUNTIME =
182INCLUDES = -I.\include -I. -I..
183DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
184LOCDEFS = -DPERLDLL -DPERL_CORE
185SUBSYS = console
186CXX_FLAG = -xc++
d56e6723 187
eb480a0b
GS
188LIBC = -lcrtdll
189LIBFILES = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 -lmingw32 \
190 -lgcc -lmoldname $(LIBC) -lkernel32
d56e6723
GS
191
192.IF "$(CFG)" == "Debug"
eb480a0b
GS
193OPTIMIZE = -g -O2 $(RUNTIME) -DDEBUGGING
194LINK_DBG = -g
d56e6723 195.ELSE
eb480a0b
GS
196OPTIMIZE = -g -O2 $(RUNTIME)
197LINK_DBG =
d56e6723
GS
198.ENDIF
199
eb480a0b 200CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
fa4efe8e 201LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
eb480a0b
GS
202OBJOUT_FLAG = -o
203EXEOUT_FLAG = -o
064a70d4 204LIBOUT_FLAG =
08aa1457
PP
205
206.ELSE
207
eb480a0b
GS
208CC = cl.exe
209LINK32 = link.exe
210LIB32 = $(LINK32) -lib
211
08aa1457
PP
212#
213# Options
214#
eb480a0b 215
af883608 216RUNTIME = -MD
eb480a0b
GS
217INCLUDES = -I.\include -I. -I..
218#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
219DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG)
220LOCDEFS = -DPERLDLL -DPERL_CORE
221SUBSYS = console
222CXX_FLAG = -TP -GX
08aa1457
PP
223
224.IF "$(RUNTIME)" == "-MD"
eb480a0b 225LIBC = msvcrt.lib
08aa1457 226.ELSE
eb480a0b 227LIBC = libcmt.lib
08aa1457
PP
228.ENDIF
229
230.IF "$(CFG)" == "Debug"
231.IF "$(CCTYPE)" == "MSVC20"
eb480a0b 232OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING
08aa1457 233.ELSE
3dfd1da1 234OPTIMIZE = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING
08aa1457 235.ENDIF
eb480a0b 236LINK_DBG = -debug -pdb:none
08aa1457
PP
237.ELSE
238.IF "$(CCTYPE)" == "MSVC20"
af883608 239OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
08aa1457 240.ELSE
af883608 241OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
08aa1457 242.ENDIF
eb480a0b 243LINK_DBG = -release
08aa1457
PP
244.ENDIF
245
eb480a0b
GS
246# we don't add LIBC here, the compiler does it based on -MD/-MT
247LIBFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \
248 winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
249 oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
250 version.lib odbc32.lib odbccp32.lib
08aa1457 251
eb480a0b
GS
252CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
253 $(PCHFLAGS) $(OPTIMIZE)
254LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
255OBJOUT_FLAG = -Fo
256EXEOUT_FLAG = -Fe
064a70d4 257LIBOUT_FLAG = /out:
08aa1457
PP
258
259.ENDIF
260
eb480a0b
GS
261.IF "$(OBJECT)" != ""
262OPTIMIZE += $(CXX_FLAG)
263.ENDIF
264
265CFLAGS_O = $(CFLAGS) $(OBJECT)
266
08aa1457
PP
267#################### do not edit below this line #######################
268############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
269
d56e6723 270o *= .obj
eda5ff31 271a *= .lib
d56e6723 272
eb480a0b
GS
273LKPRE = INPUT (
274LKPOST = )
275
08aa1457
PP
276#
277# Rules
278#
08aa1457 279
eda5ff31 280.SUFFIXES : .c $(o) .dll $(a) .exe
d56e6723
GS
281
282.c$(o):
eb480a0b 283 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
d07c2202
GS
284
285.y.c:
286 $(NOOP)
08aa1457 287
d56e6723 288$(o).dll:
08aa1457 289.IF "$(CCTYPE)" == "BORLAND"
d56e6723 290 $(LINK32) -Tpd -ap $(LINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
08aa1457 291 $(IMPLIB) $(*B).lib $@
d56e6723
GS
292.ELIF "$(CCTYPE)" == "GCC"
293 $(LINK32) -o $@ $(LINK_FLAGS) $< $(LIBFILES)
eda5ff31 294 $(IMPLIB) -def $(*B).def $(*B).a $@
08aa1457 295.ELSE
08aa1457 296 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
dc050285 297 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
08aa1457
PP
298.ENDIF
299
300#
e5a95ffb
GS
301INST_BIN = $(INST_TOP)$(INST_VER)\bin\$(ARCHNAME)
302INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
303INST_LIB = $(INST_TOP)$(INST_VER)\lib
eb480a0b
GS
304INST_POD = $(INST_LIB)\pod
305INST_HTML = $(INST_POD)\html
306LIBDIR = ..\lib
307EXTDIR = ..\ext
308PODDIR = ..\pod
309EXTUTILSDIR = $(LIBDIR)\extutils
08aa1457
PP
310
311#
312# various targets
eb480a0b
GS
313MINIPERL = ..\miniperl.exe
314MINIDIR = .\mini
315PERLEXE = ..\perl.exe
316GLOBEXE = ..\perlglob.exe
317CONFIGPM = ..\lib\Config.pm
318MINIMOD = ..\lib\ExtUtils\Miniperl.pm
319X2P = ..\x2p\a2p.exe
320
321PL2BAT = bin\pl2bat.pl
322GLOBBAT = bin\perlglob.bat
08aa1457 323
4a71ed0c
GS
324UTILS = \
325 ..\utils\h2ph \
326 ..\utils\splain \
327 ..\utils\perlbug \
328 ..\utils\pl2pm \
329 ..\utils\c2ph \
330 ..\utils\h2xs \
331 ..\utils\perldoc \
332 ..\utils\pstruct \
333 ..\utils\perlcc \
334 ..\pod\checkpods \
335 ..\pod\pod2html \
336 ..\pod\pod2latex \
337 ..\pod\pod2man \
338 ..\pod\pod2text \
339 ..\x2p\find2perl \
340 ..\x2p\s2p \
341 bin\www.pl \
342 bin\runperl.pl \
343 bin\pl2bat.pl \
344 bin\perlglob.pl \
345 bin\search.pl
346
08aa1457
PP
347.IF "$(CCTYPE)" == "BORLAND"
348
eb480a0b
GS
349CFGSH_TMPL = config.bc
350CFGH_TMPL = config_H.bc
d56e6723
GS
351
352.ELIF "$(CCTYPE)" == "GCC"
353
eb480a0b
GS
354CFGSH_TMPL = config.gc
355CFGH_TMPL = config_H.gc
eda5ff31 356PERLIMPLIB *= ..\libperl$(a)
08aa1457
PP
357
358.ELSE
359
eb480a0b
GS
360CFGSH_TMPL = config.vc
361CFGH_TMPL = config_H.vc
362PERL95EXE = ..\perl95.exe
08aa1457
PP
363
364.ENDIF
365
eda5ff31
GS
366.IF "$(OBJECT)" == "-DPERL_OBJECT"
367PERLIMPLIB *= ..\perlcore$(a)
368PERLDLL = ..\perlcore.dll
369CAPILIB = $(COREDIR)\PerlCAPI$(a)
370.ELSE
371PERLIMPLIB *= ..\perl$(a)
372PERLDLL = ..\perl.dll
373CAPILIB =
374.ENDIF
375
eb480a0b
GS
376XCOPY = xcopy /f /r /i /d
377RCOPY = xcopy /f /r /i /e /d
378NOOP = @echo
08aa1457 379
eb480a0b
GS
380#
381# filenames given to xsubpp must have forward slashes (since it puts
382# full pathnames in #line strings)
383XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
384 -C++ -prototypes
385
852c2e52 386MICROCORE_SRC = \
eb480a0b
GS
387 ..\av.c \
388 ..\byterun.c \
389 ..\deb.c \
390 ..\doio.c \
391 ..\doop.c \
392 ..\dump.c \
393 ..\globals.c \
394 ..\gv.c \
395 ..\hv.c \
396 ..\mg.c \
397 ..\op.c \
398 ..\perl.c \
399 ..\perly.c \
400 ..\pp.c \
401 ..\pp_ctl.c \
402 ..\pp_hot.c \
403 ..\pp_sys.c \
404 ..\regcomp.c \
405 ..\regexec.c \
406 ..\run.c \
407 ..\scope.c \
408 ..\sv.c \
409 ..\taint.c \
410 ..\toke.c \
411 ..\universal.c \
412 ..\util.c
413
a1dd9325 414.IF "$(CRYPT_SRC)" != ""
852c2e52 415MICROCORE_SRC += ..\$(CRYPT_SRC)
a1dd9325 416.ENDIF
26618a56 417
1c1c7f20 418.IF "$(PERL_MALLOC)" == "define"
852c2e52 419EXTRACORE_SRC += ..\malloc.c
1c1c7f20
GS
420.ENDIF
421
eb480a0b 422.IF "$(OBJECT)" == ""
852c2e52 423EXTRACORE_SRC += ..\perlio.c
eb480a0b
GS
424.ENDIF
425
426WIN32_SRC = \
427 .\win32.c \
428 .\win32sck.c
429
430.IF "$(USE_THREADS)" == "define"
431WIN32_SRC += .\win32thread.c
432.ENDIF
433
434PERL95_SRC = \
435 perl95.c \
436 win32mt.c \
437 win32sckmt.c
438
a1dd9325
GS
439.IF "$(CRYPT_SRC)" != ""
440PERL95_SRC += ..\$(CRYPT_SRC)
441.ENDIF
442
eb480a0b
GS
443DLL_SRC = $(DYNALOADER).c
444
445
446.IF "$(OBJECT)" == ""
447DLL_SRC += perllib.c
448.ENDIF
449
450X2P_SRC = \
451 ..\x2p\a2p.c \
452 ..\x2p\hash.c \
453 ..\x2p\str.c \
454 ..\x2p\util.c \
455 ..\x2p\walk.c
456
852c2e52 457CORE_NOCFG_H = \
eb480a0b
GS
458 ..\av.h \
459 ..\byterun.h \
460 ..\bytecode.h \
461 ..\cop.h \
462 ..\cv.h \
463 ..\dosish.h \
464 ..\embed.h \
465 ..\form.h \
466 ..\gv.h \
467 ..\handy.h \
468 ..\hv.h \
469 ..\mg.h \
470 ..\nostdio.h \
471 ..\op.h \
472 ..\opcode.h \
473 ..\perl.h \
474 ..\perlio.h \
475 ..\perlsdio.h \
476 ..\perlsfio.h \
477 ..\perly.h \
478 ..\pp.h \
479 ..\proto.h \
480 ..\regexp.h \
481 ..\scope.h \
482 ..\sv.h \
483 ..\thread.h \
484 ..\unixish.h \
485 ..\util.h \
486 ..\XSUB.h \
eb480a0b
GS
487 ..\EXTERN.h \
488 ..\perlvars.h \
489 ..\intrpvar.h \
490 ..\thrdvar.h \
491 .\include\dirent.h \
492 .\include\netdb.h \
493 .\include\sys\socket.h \
494 .\win32.h
495
852c2e52
GS
496CORE_H = $(CORE_NOCFG_H) .\config.h
497
498MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
499CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
eb480a0b 500WIN32_OBJ = $(WIN32_SRC:db:+$(o))
eda5ff31 501MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) $(EXTRACORE_SRC:db:+$(o))}
eb480a0b
GS
502MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
503MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
af883608 504PERL95_OBJ = $(PERL95_SRC:db:+$(o))
eb480a0b
GS
505DLL_OBJ = $(DLL_SRC:db:+$(o))
506X2P_OBJ = $(X2P_SRC:db:+$(o))
507
eb480a0b
GS
508PERLDLL_OBJ = $(CORE_OBJ)
509PERLEXE_OBJ = perlmain$(o)
510
511.IF "$(OBJECT)" == ""
512PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
513.ELSE
514PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
af883608 515PERL95_OBJ += DynaLoadmt$(o)
eb480a0b
GS
516.ENDIF
517
518DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B
519STATIC_EXT = DynaLoader
520
521DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
522SOCKET = $(EXTDIR)\Socket\Socket
523FCNTL = $(EXTDIR)\Fcntl\Fcntl
524OPCODE = $(EXTDIR)\Opcode\Opcode
525SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
526IO = $(EXTDIR)\IO\IO
527POSIX = $(EXTDIR)\POSIX\POSIX
528ATTRS = $(EXTDIR)\attrs\attrs
529THREAD = $(EXTDIR)\Thread\Thread
530B = $(EXTDIR)\B\B
531
532SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
533FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
534OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
535SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
536IO_DLL = $(AUTODIR)\IO\IO.dll
537POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
538ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
539THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
540B_DLL = $(AUTODIR)\B\B.dll
541
ac4c12e7 542EXTENSION_C = \
eb480a0b
GS
543 $(SOCKET).c \
544 $(FCNTL).c \
545 $(OPCODE).c \
546 $(SDBM_FILE).c \
547 $(IO).c \
548 $(POSIX).c \
549 $(ATTRS).c \
550 $(THREAD).c \
551 $(B).c
552
ac4c12e7 553EXTENSION_DLL = \
eb480a0b
GS
554 $(SOCKET_DLL) \
555 $(FCNTL_DLL) \
556 $(OPCODE_DLL) \
557 $(SDBM_FILE_DLL)\
558 $(IO_DLL) \
559 $(POSIX_DLL) \
51aa15f3
GS
560 $(ATTRS_DLL) \
561 $(B_DLL)
26ca90b6
GS
562
563.IF "$(OBJECT)" == ""
564EXTENSION_DLL += \
51aa15f3 565 $(THREAD_DLL)
26ca90b6 566.ENDIF
eb480a0b
GS
567
568POD2HTML = $(PODDIR)\pod2html
569POD2MAN = $(PODDIR)\pod2man
570POD2LATEX = $(PODDIR)\pod2latex
571POD2TEXT = $(PODDIR)\pod2text
572
573CFG_VARS = \
574 "INST_DRV=$(INST_DRV)" \
575 "INST_TOP=$(INST_TOP)" \
e5a95ffb 576 "INST_VER=$(INST_VER)" \
eb480a0b
GS
577 "archname=$(ARCHNAME)" \
578 "cc=$(CC)" \
ac4c12e7 579 "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)" \
eb480a0b
GS
580 "cf_email=$(EMAIL)" \
581 "d_crypt=$(D_CRYPT)" \
582 "d_mymalloc=$(PERL_MALLOC)" \
583 "libs=$(LIBFILES:f)" \
584 "incpath=$(CCINCDIR)" \
eda5ff31 585 "libperl=$(PERLIMPLIB:f)" \
fa4efe8e 586 "libpth=$(strip $(CCLIBDIR) $(EXTRALIBDIRS) $(LIBFILES:d))" \
eb480a0b
GS
587 "libc=$(LIBC)" \
588 "make=dmake" \
eda5ff31
GS
589 "_o=$(o)" "obj_ext=$(o)" \
590 "_a=$(a)" "lib_ext=$(a)" \
eb480a0b
GS
591 "static_ext=$(STATIC_EXT)" \
592 "dynamic_ext=$(DYNAMIC_EXT)" \
593 "usethreads=$(USE_THREADS)" \
594 "LINK_FLAGS=$(LINK_FLAGS)" \
595 "optimize=$(OPTIMIZE)"
924b3ec4 596
08aa1457
PP
597#
598# Top targets
599#
600
852c2e52
GS
601all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
602 $(CAPILIB) $(X2P) $(EXTENSION_DLL)
08aa1457 603
d56e6723 604$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
08aa1457
PP
605
606#------------------------------------------------------------
607
eb480a0b 608$(GLOBEXE) : perlglob$(o)
08aa1457
PP
609.IF "$(CCTYPE)" == "BORLAND"
610 $(CC) -c -w -v -tWM -I$(CCINCDIR) perlglob.c
d56e6723
GS
611 $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \
612 $(CCLIBDIR)\32BIT\wildargs$(o),$@,,import32.lib cw32mt.lib,
613.ELIF "$(CCTYPE)" == "GCC"
614 $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES)
08aa1457 615.ELSE
dc050285 616 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
d56e6723 617 perlglob$(o) setargv$(o)
08aa1457
PP
618.ENDIF
619
d56e6723 620perlglob$(o) : perlglob.c
08aa1457 621
08aa1457
PP
622config.w32 : $(CFGSH_TMPL)
623 copy $(CFGSH_TMPL) config.w32
624
852c2e52 625.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
08aa1457
PP
626 -del /f config.h
627 copy $(CFGH_TMPL) config.h
628
629..\config.sh : config.w32 $(MINIPERL) config_sh.PL
924b3ec4
GS
630 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
631
632# this target is for when changes to the main config.sh happen
633# edit config.{b,v,g}c and make this target once for each supported
634# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
635regen_config_h:
636 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
637 -cd .. && del /f perl.exe
638 cd .. && perl configpm
639 -del /f $(CFGH_TMPL)
640 -mkdir ..\lib\CORE
e5a95ffb 641 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
924b3ec4 642 rename config.h $(CFGH_TMPL)
08aa1457
PP
643
644$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
645 cd .. && miniperl configpm
646 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
d07c2202
GS
647 $(XCOPY) ..\*.h $(COREDIR)\*.*
648 $(XCOPY) *.h $(COREDIR)\*.*
649 $(RCOPY) include $(COREDIR)\*.*
e5a95ffb
GS
650 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
651 || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
08aa1457 652
eb480a0b 653$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
08aa1457
PP
654.IF "$(CCTYPE)" == "BORLAND"
655 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
eb480a0b 656 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
d56e6723
GS
657.ELIF "$(CCTYPE)" == "GCC"
658 $(LINK32) -v -o $@ $(LINK_FLAGS) \
eb480a0b 659 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
08aa1457
PP
660.ELSE
661 $(LINK32) -subsystem:console -out:$@ \
eb480a0b 662 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
08aa1457
PP
663.ENDIF
664
eb480a0b
GS
665$(MINIDIR) :
666 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
667
852c2e52 668$(MINICORE_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
669 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c
670
852c2e52 671$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
eb480a0b
GS
672 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
673
852c2e52
GS
674# 1. we don't want to rebuild miniperl.exe when config.h changes
675# 2. we don't want to rebuild miniperl.exe with non-default config.h
676$(MINI_OBJ) : $(CORE_NOCFG_H)
677
eb480a0b
GS
678$(WIN32_OBJ) : $(CORE_H)
679$(CORE_OBJ) : $(CORE_H)
eb480a0b
GS
680$(DLL_OBJ) : $(CORE_H)
681$(PERL95_OBJ) : $(CORE_H)
682$(X2P_OBJ) : $(CORE_H)
08aa1457 683
d55594ae 684perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
eb480a0b 685 $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \
910dfcc8 686 CCTYPE=$(CCTYPE) > perldll.def
08aa1457 687
eb480a0b 688$(PERLDLL): perldll.def $(PERLDLL_OBJ)
08aa1457
PP
689.IF "$(CCTYPE)" == "BORLAND"
690 $(LINK32) -Tpd -ap $(LINK_FLAGS) \
eb480a0b 691 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
08aa1457
PP
692 $@,\n \
693 $(LIBFILES)\n \
694 perldll.def\n)
695 $(IMPLIB) $*.lib $@
d56e6723 696.ELIF "$(CCTYPE)" == "GCC"
3730b96e 697 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
eb480a0b 698 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
d56e6723
GS
699 dlltool --output-lib $(PERLIMPLIB) \
700 --dllname perl.dll \
701 --def perldll.def \
702 --base-file perl.base \
703 --output-exp perl.exp
3730b96e 704 $(LINK32) -mdll -o $@ $(LINK_FLAGS) \
eb480a0b
GS
705 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
706 perl.exp $(LKPOST))
08aa1457
PP
707.ELSE
708 $(LINK32) -dll -def:perldll.def -out:$@ \
eb480a0b 709 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\))
08aa1457 710.ENDIF
d07c2202 711 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
08aa1457
PP
712
713perl.def : $(MINIPERL) makeperldef.pl
714 $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
715
716$(MINIMOD) : $(MINIPERL) ..\minimod.pl
717 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
718
eb480a0b
GS
719..\x2p\a2p$(o) : ..\x2p\a2p.c
720 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
721
722..\x2p\hash$(o) : ..\x2p\hash.c
723 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
724
725..\x2p\str$(o) : ..\x2p\str.c
726 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
727
728..\x2p\util$(o) : ..\x2p\util.c
729 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
730
731..\x2p\walk$(o) : ..\x2p\walk.c
732 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
733
734$(X2P) : $(MINIPERL) $(X2P_OBJ)
d07c2202
GS
735 $(MINIPERL) ..\x2p\find2perl.PL
736 $(MINIPERL) ..\x2p\s2p.PL
737.IF "$(CCTYPE)" == "BORLAND"
738 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
739 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
740.ELIF "$(CCTYPE)" == "GCC"
741 $(LINK32) -v -o $@ $(LINK_FLAGS) \
742 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
743.ELSE
744 $(LINK32) -subsystem:console -out:$@ \
422938c9 745 @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
d07c2202
GS
746.ENDIF
747
08aa1457
PP
748perlmain.c : runperl.c
749 copy runperl.c perlmain.c
750
d56e6723 751perlmain$(o) : perlmain.c
8957be0a 752 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
08aa1457 753
eb480a0b 754$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
08aa1457
PP
755.IF "$(CCTYPE)" == "BORLAND"
756 $(LINK32) -Tpe -ap $(LINK_FLAGS) \
8957be0a
GS
757 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
758 $(@:s,\,\\),\n \
08aa1457 759 $(PERLIMPLIB) $(LIBFILES)\n)
d56e6723
GS
760.ELIF "$(CCTYPE)" == "GCC"
761 $(LINK32) -o $@ $(LINK_FLAGS) \
eb480a0b 762 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
08aa1457 763.ELSE
d56e6723 764 $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
eb480a0b 765 $(PERLEXE_OBJ) $(PERLIMPLIB)
08aa1457
PP
766.ENDIF
767 copy splittree.pl ..
eb480a0b 768 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
769
770.IF "$(CCTYPE)" != "BORLAND"
d56e6723 771.IF "$(CCTYPE)" != "GCC"
08aa1457
PP
772
773perl95.c : runperl.c
774 copy runperl.c perl95.c
775
d56e6723 776perl95$(o) : perl95.c
eb480a0b 777 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c
08aa1457 778
d56e6723 779win32sckmt$(o) : win32sck.c
eb480a0b
GS
780 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
781 $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c
fb73857a 782
d56e6723 783win32mt$(o) : win32.c
eb480a0b
GS
784 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
785 $(OBJOUT_FLAG)win32mt$(o) win32.c
fb73857a 786
ac4c12e7
GS
787DynaLoadmt$(o) : $(DYNALOADER).c
788 $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \
789 $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c
fb73857a
PP
790
791$(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
eb480a0b
GS
792 $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \
793 $(LIBFILES) $(PERL95_OBJ) $(PERLIMPLIB) libcmt.lib
08aa1457
PP
794
795.ENDIF
d56e6723 796.ENDIF
08aa1457
PP
797
798$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
eb480a0b 799 if not exist $(AUTODIR) mkdir $(AUTODIR)
bfab39a2 800 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
08aa1457
PP
801 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
802 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
803 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
804
064a70d4
GS
805.IF "$(OBJECT)" == "-DPERL_OBJECT"
806
58a50f62
GS
807PerlCAPI.cpp : $(MINIPERL)
808 $(MINIPERL) GenCAPI.pl $(COREDIR)
809
810PerlCAPI$(o) : PerlCAPI.cpp
064a70d4
GS
811.IF "$(CCTYPE)" == "BORLAND"
812 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
813.ELIF "$(CCTYPE)" == "GCC"
814 $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
815.ELSE
d17537aa 816 $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \
58a50f62 817 $(OBJOUT_FLAG)PerlCAPI$(o) PerlCAPI.cpp
064a70d4 818.ENDIF
58a50f62
GS
819
820$(CAPILIB) : PerlCAPI.cpp PerlCAPI$(o)
064a70d4
GS
821.IF "$(CCTYPE)" == "BORLAND"
822 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +PerlCAPI$(o)
823.ELSE
824 $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) PerlCAPI$(o)
825.ENDIF
826
827.ENDIF
58a50f62 828
08aa1457
PP
829$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
830 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
831
2a321948
GS
832$(B_DLL): $(PERLEXE) $(B).xs
833 cd $(EXTDIR)\$(*B) && \
834 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
835 cd $(EXTDIR)\$(*B) && $(MAKE)
836
a98bd6f4
GS
837$(THREAD_DLL): $(PERLEXE) $(THREAD).xs
838 cd $(EXTDIR)\$(*B) && \
839 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
840 cd $(EXTDIR)\$(*B) && $(MAKE)
841
5d925967
GS
842$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
843 cd $(EXTDIR)\$(*B) && \
844 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
845 cd $(EXTDIR)\$(*B) && $(MAKE)
846
6dead956
GS
847$(POSIX_DLL): $(PERLEXE) $(POSIX).xs
848 cd $(EXTDIR)\$(*B) && \
849 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
850 cd $(EXTDIR)\$(*B) && $(MAKE)
851
5d925967 852$(IO_DLL): $(PERLEXE) $(IO).xs
08aa1457
PP
853 cd $(EXTDIR)\$(*B) && \
854 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
855 cd $(EXTDIR)\$(*B) && $(MAKE)
856
857$(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs
858 cd $(EXTDIR)\$(*B) && \
859 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
860 cd $(EXTDIR)\$(*B) && $(MAKE)
861
862$(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs
863 cd $(EXTDIR)\$(*B) && \
864 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
865 cd $(EXTDIR)\$(*B) && $(MAKE)
866
867$(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs
868 cd $(EXTDIR)\$(*B) && \
869 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
870 cd $(EXTDIR)\$(*B) && $(MAKE)
871
5d925967 872$(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs
08aa1457
PP
873 cd $(EXTDIR)\$(*B) && \
874 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
875 cd $(EXTDIR)\$(*B) && $(MAKE)
876
877doc: $(PERLEXE)
878 copy ..\README.win32 ..\pod\perlwin32.pod
d07c2202 879 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
b3b61bd8 880 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
08aa1457
PP
881 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
882
4a71ed0c 883utils: $(PERLEXE) $(X2P)
08aa1457 884 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
4a71ed0c
GS
885 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
886 $(PERLEXE) $(PL2BAT) $(UTILS)
08aa1457
PP
887
888distclean: clean
dc050285 889 -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
eda5ff31 890 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
08aa1457 891 -del /f *.def *.map
eb480a0b
GS
892 -del /f $(EXTENSION_DLL)
893 -del /f $(EXTENSION_C) $(DYNALOADER).c
894 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
895 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
896 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
897 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
898 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
899 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm
900 -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
901 -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
902 -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
08aa1457
PP
903 -del /f $(PODDIR)\*.html
904 -del /f $(PODDIR)\*.bat
eb480a0b
GS
905 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct *.bat
906 -cd ..\x2p && del /f find2perl s2p *.bat
d444a431 907 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
eb480a0b 908 -del /f $(CONFIGPM)
d444a431
TB
909.IF "$(PERL95EXE)" != ""
910 -del /f perl95.c
911.ENDIF
912 -del /f bin\*.bat
eda5ff31 913 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.bs Makefile *$(o) pm_to_blib
eb480a0b 914 -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
d07c2202 915 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
08aa1457 916
4a71ed0c 917install : all installbare installhtml
6dead956 918
4a71ed0c 919installbare : utils
d07c2202 920 $(PERLEXE) ..\installperl
08aa1457
PP
921.IF "$(PERL95EXE)" != ""
922 $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
923.ENDIF
924 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
e5a95ffb 925 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
4a71ed0c 926 $(XCOPY) bin\network.pl $(INST_LIB)\*.*
6dead956
GS
927
928installhtml : doc
08aa1457
PP
929 $(RCOPY) html\*.* $(INST_HTML)\*.*
930
931inst_lib : $(CONFIGPM)
932 copy splittree.pl ..
eb480a0b 933 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
08aa1457
PP
934 $(RCOPY) ..\lib $(INST_LIB)\*.*
935
dfb634a9 936minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
08aa1457
PP
937 $(XCOPY) $(MINIPERL) ..\t\perl.exe
938.IF "$(CCTYPE)" == "BORLAND"
939 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
940.ELSE
941 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
942.ENDIF
943 attrib -r ..\t\*.*
944 copy test ..\t
945 cd ..\t && \
946 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
947
dfb634a9 948test-prep : all utils
08aa1457
PP
949 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
950 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
951.IF "$(CCTYPE)" == "BORLAND"
952 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
953.ELSE
954 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
955.ENDIF
32f822de
GS
956
957test : test-prep
08aa1457
PP
958 cd ..\t && $(PERLEXE) -I..\lib harness
959
32f822de
GS
960test-notty : test-prep
961 set PERL_SKIP_TTY_TEST=1 && \
962 cd ..\t && $(PERLEXE) -I.\lib harness
963
08aa1457 964clean :
d56e6723 965 -@erase miniperlmain$(o)
08aa1457 966 -@erase $(MINIPERL)
d56e6723
GS
967 -@erase perlglob$(o)
968 -@erase perlmain$(o)
51aa15f3 969 -@erase PerlCAPI.cpp
08aa1457
PP
970 -@erase config.w32
971 -@erase /f config.h
972 -@erase $(GLOBEXE)
973 -@erase $(PERLEXE)
974 -@erase $(PERLDLL)
975 -@erase $(CORE_OBJ)
eb480a0b 976 -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
08aa1457
PP
977 -@erase $(WIN32_OBJ)
978 -@erase $(DLL_OBJ)
d07c2202 979 -@erase $(X2P_OBJ)
eda5ff31 980 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp
d444a431 981 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
d07c2202 982 -@erase ..\x2p\*.exe ..\x2p\*.bat
08aa1457
PP
983 -@erase *.ilk
984 -@erase *.pdb