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