Commit | Line | Data |
---|---|---|
a9226780 JH |
1 | # |
2 | # Makefile to build perl on Windows NT using DMAKE. | |
3 | # Supported compilers: | |
4 | # Visual C++ 2.0 thro 6.0 | |
5 | # Borland C++ 5.02 | |
6 | # Mingw32 with gcc-2.95.2 or better **experimental** | |
7 | # | |
8 | # This is set up to build a perl.exe that runs off a shared library | |
9 | # (perl56.dll). Also makes individual DLLs for the XS extensions. | |
10 | # | |
11 | ||
12 | ## | |
13 | ## Make sure you read README.win32 *before* you mess with anything here! | |
14 | ## | |
15 | ||
16 | ## | |
17 | ## Build configuration. Edit the values below to suit your needs. | |
18 | ## | |
19 | ||
20 | # | |
21 | # Set these to wherever you want "dmake install" to put your | |
22 | # newly built perl. | |
23 | # | |
24 | INST_DRV *= c: | |
25 | INST_TOP *= $(INST_DRV)\perl | |
26 | ||
27 | # | |
28 | # Comment this out if you DON'T want your perl installation to be versioned. | |
29 | # This means that the new installation will overwrite any files from the | |
30 | # old installation at the same INST_TOP location. Leaving it enabled is | |
31 | # the safest route, as perl adds the extra version directory to all the | |
32 | # locations it installs files to. If you disable it, an alternative | |
33 | # versioned installation can be obtained by setting INST_TOP above to a | |
34 | # path that includes an arbitrary version string. | |
35 | # | |
36 | INST_VER *= \5.6.0 | |
37 | ||
38 | # | |
39 | # Comment this out if you DON'T want your perl installation to have | |
40 | # architecture specific components. This means that architecture- | |
41 | # specific files will be installed along with the architecture-neutral | |
42 | # files. Leaving it enabled is safer and more flexible, in case you | |
43 | # want to build multiple flavors of perl and install them together in | |
44 | # the same location. Commenting it out gives you a simpler | |
45 | # installation that is easier to understand for beginners. | |
46 | # | |
47 | INST_ARCH *= \$(ARCHNAME) | |
48 | ||
49 | # | |
50 | # uncomment to enable multiple interpreters. This is need for fork() | |
51 | # emulation. | |
52 | # | |
53 | #USE_MULTI *= define | |
54 | ||
55 | # | |
56 | # Beginnings of interpreter cloning/threads; still very incomplete. | |
57 | # This should be enabled to get the fork() emulation. This needs | |
58 | # USE_MULTI as well. | |
59 | # | |
60 | #USE_ITHREADS *= define | |
61 | ||
62 | # | |
63 | # uncomment to enable the implicit "host" layer for all system calls | |
64 | # made by perl. This needs USE_MULTI above. This is also needed to | |
65 | # get fork(). | |
66 | # | |
67 | #USE_IMP_SYS *= define | |
68 | ||
69 | # | |
70 | # WARNING! This option is deprecated and will eventually go away (enable | |
71 | # USE_ITHREADS instead). | |
72 | # | |
73 | # uncomment to enable threads-capabilities. This is incompatible with | |
74 | # USE_ITHREADS, and is only here for people who may have come to rely | |
75 | # on the experimental Thread support that was in 5.005. | |
76 | # | |
77 | #USE_5005THREADS *= define | |
78 | ||
79 | # | |
80 | # WARNING! This option is deprecated and will eventually go away (enable | |
81 | # USE_MULTI instead). | |
82 | # | |
83 | # uncomment next line if you want to use the PERL_OBJECT build option. | |
84 | # DO NOT ENABLE unless you have legacy code that relies on the C++ | |
85 | # CPerlObj class that was available in 5.005. This cannot be enabled | |
86 | # if you ask for USE_5005THREADS above. | |
87 | # | |
88 | #USE_OBJECT *= define | |
89 | ||
90 | # | |
91 | # uncomment exactly one of the following | |
92 | # | |
93 | # Visual C++ 2.x | |
94 | #CCTYPE *= MSVC20 | |
95 | # Visual C++ > 2.x and < 6.x | |
96 | #CCTYPE *= MSVC | |
97 | # Visual C++ >= 6.x | |
98 | #CCTYPE *= MSVC60 | |
99 | # Borland 5.02 or later | |
100 | #CCTYPE *= BORLAND | |
101 | # mingw32+gcc-2.95.2 or better | |
102 | CCTYPE *= GCC | |
103 | ||
104 | # | |
105 | # uncomment this if you are compiling under Windows 95/98 and command.com | |
106 | # (not needed if you're running under 4DOS/NT 6.01 or later) | |
107 | #IS_WIN95 *= define | |
108 | ||
109 | # | |
110 | # uncomment next line if you want debug version of perl (big,slow) | |
111 | # If not enabled, we automatically try to use maximum optimization | |
112 | # with all compilers that are known to have a working optimizer. | |
113 | # | |
114 | #CFG *= Debug | |
115 | ||
116 | # | |
117 | # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler. | |
118 | # It has patches that fix known bugs in older versions of MSVCRT.DLL. | |
119 | # This currently requires VC 5.0 with Service Pack 3 or later. | |
120 | # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/ | |
121 | # and follow the directions in the package to install. | |
122 | # | |
123 | # Not recommended if you have VC 6.x and you're not running Windows 9x. | |
124 | # | |
125 | #USE_PERLCRT *= define | |
126 | ||
127 | # | |
128 | # uncomment to enable linking with setargv.obj under the Visual C | |
129 | # compiler. Setting this options enables perl to expand wildcards in | |
130 | # arguments, but it may be harder to use alternate methods like | |
131 | # File::DosGlob that are more powerful. This option is supported only with | |
132 | # Visual C. | |
133 | # | |
134 | #USE_SETARGV *= define | |
135 | ||
136 | # | |
137 | # if you have the source for des_fcrypt(), uncomment this and make sure the | |
138 | # file exists (see README.win32). File should be located in the same | |
139 | # directory as this file. | |
140 | # | |
141 | #CRYPT_SRC *= fcrypt.c | |
142 | ||
143 | # | |
144 | # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a | |
145 | # library, uncomment this, and make sure the library exists (see README.win32) | |
146 | # Specify the full pathname of the library. | |
147 | # | |
148 | #CRYPT_LIB *= fcrypt.lib | |
149 | ||
150 | # | |
151 | # set this if you wish to use perl's malloc | |
152 | # WARNING: Turning this on/off WILL break binary compatibility with extensions | |
153 | # you may have compiled with/without it. Be prepared to recompile all | |
154 | # extensions if you change the default. Currently, this cannot be enabled | |
155 | # if you ask for USE_IMP_SYS above. | |
156 | # | |
157 | #PERL_MALLOC *= define | |
158 | ||
159 | # | |
160 | # set the install locations of the compiler include/libraries | |
161 | # Running VCVARS32.BAT is *required* when using Visual C. | |
162 | # Some versions of Visual C don't define MSVCDIR in the environment, | |
163 | # so you may have to set CCHOME explicitly (spaces in the path name should | |
164 | # not be quoted) | |
165 | # | |
166 | #CCHOME *= c:\bc5 | |
167 | #CCHOME *= $(MSVCDIR) | |
168 | CCHOME *= c:\gcc-2.95.2-msvcrt | |
169 | CCINCDIR *= $(CCHOME)\include | |
170 | CCLIBDIR *= $(CCHOME)\lib | |
171 | ||
172 | # | |
173 | # Additional compiler flags can be specified here. | |
174 | # | |
175 | ||
176 | # | |
177 | # This should normally be disabled. Adding -DPERL_POLLUTE enables support | |
178 | # for old symbols by default, at the expense of extreme pollution. You most | |
179 | # probably just want to build modules that won't compile with | |
180 | # perl Makefile.PL POLLUTE=1 | |
181 | # instead of enabling this. Please report such modules to the respective | |
182 | # authors. | |
183 | # | |
184 | #BUILDOPT += -DPERL_POLLUTE | |
185 | ||
186 | # | |
187 | # This should normally be disabled. Enabling it will disable the File::Glob | |
188 | # implementation of CORE::glob. | |
189 | # | |
190 | #BUILDOPT += -DPERL_EXTERNAL_GLOB | |
191 | ||
192 | # | |
193 | # This should normally be disabled. Enabling it causes perl to read scripts | |
194 | # in text mode (which is the 5.005 behavior) and will break ByteLoader. | |
195 | #BUILDOPT += -DPERL_TEXTMODE_SCRIPTS | |
196 | ||
197 | # | |
198 | # specify semicolon-separated list of extra directories that modules will | |
199 | # look for libraries (spaces in path names need not be quoted) | |
200 | # | |
201 | EXTRALIBDIRS *= | |
202 | ||
203 | # | |
204 | # set this to point to cmd.exe (only needed if you use some | |
205 | # alternate shell that doesn't grok cmd.exe style commands) | |
206 | # | |
207 | #SHELL *= g:\winnt\system32\cmd.exe | |
208 | ||
209 | # | |
210 | # set this to your email address (perl will guess a value from | |
211 | # from your loginname and your hostname, which may not be right) | |
212 | # | |
213 | #EMAIL *= | |
214 | ||
215 | ## | |
216 | ## Build configuration ends. | |
217 | ## | |
218 | ||
219 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### | |
220 | ||
221 | .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" | |
222 | D_CRYPT = undef | |
223 | .ELSE | |
224 | D_CRYPT = define | |
225 | CRYPT_FLAG = -DHAVE_DES_FCRYPT | |
226 | .ENDIF | |
227 | ||
228 | .IF "$(USE_OBJECT)" == "define" | |
229 | PERL_MALLOC != undef | |
230 | USE_5005THREADS != undef | |
231 | USE_MULTI != undef | |
232 | USE_IMP_SYS != define | |
233 | .ENDIF | |
234 | ||
235 | PERL_MALLOC *= undef | |
236 | ||
237 | USE_5005THREADS *= undef | |
238 | ||
239 | .IF "$(USE_5005THREADS)" == "define" | |
240 | USE_ITHREADS != undef | |
241 | .ENDIF | |
242 | ||
243 | .IF "$(USE_IMP_SYS)" == "define" | |
244 | PERL_MALLOC != undef | |
245 | .ENDIF | |
246 | ||
247 | USE_MULTI *= undef | |
248 | USE_OBJECT *= undef | |
249 | USE_ITHREADS *= undef | |
250 | USE_IMP_SYS *= undef | |
251 | USE_PERLCRT *= undef | |
252 | ||
253 | .IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef" | |
254 | USE_MULTI != define | |
255 | .ENDIF | |
256 | ||
257 | .IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef" | |
258 | USE_MULTI != define | |
259 | USE_5005THREADS != undef | |
260 | .ENDIF | |
261 | ||
262 | .IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef" | |
263 | BUILDOPT += -DPERL_IMPLICIT_CONTEXT | |
264 | .ENDIF | |
265 | ||
266 | .IF "$(USE_IMP_SYS)" != "undef" | |
267 | BUILDOPT += -DPERL_IMPLICIT_SYS | |
268 | .ENDIF | |
269 | ||
270 | .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE | |
271 | ||
272 | PROCESSOR_ARCHITECTURE *= x86 | |
273 | ||
274 | .IF "$(USE_OBJECT)" == "define" | |
275 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object | |
276 | .ELIF "$(USE_5005THREADS)" == "define" | |
277 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread | |
278 | .ELIF "$(USE_MULTI)" == "define" | |
279 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi | |
280 | .ELSE | |
281 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) | |
282 | .ENDIF | |
283 | ||
284 | .IF "$(USE_ITHREADS)" == "define" | |
285 | ARCHNAME !:= $(ARCHNAME)-thread | |
286 | .ENDIF | |
287 | ||
288 | # Visual Studio 98 specific | |
289 | .IF "$(CCTYPE)" == "MSVC60" | |
290 | ||
291 | # VC 6.0 can load the socket dll on demand. Makes the test suite | |
292 | # run in about 10% less time. | |
293 | DELAYLOAD *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib | |
294 | ||
295 | # VC 6.0 seems capable of compiling perl correctly with optimizations | |
296 | # enabled. Anything earlier fails tests. | |
297 | CFG *= Optimize | |
298 | .ENDIF | |
299 | ||
300 | ARCHDIR = ..\lib\$(ARCHNAME) | |
301 | COREDIR = ..\lib\CORE | |
302 | AUTODIR = ..\lib\auto | |
303 | LIBDIR = ..\lib | |
304 | EXTDIR = ..\ext | |
305 | PODDIR = ..\pod | |
306 | EXTUTILSDIR = $(LIBDIR)\ExtUtils | |
307 | ||
308 | # | |
309 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin | |
310 | INST_BIN = $(INST_SCRIPT)$(INST_ARCH) | |
311 | INST_LIB = $(INST_TOP)$(INST_VER)\lib | |
312 | INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) | |
313 | INST_COREDIR = $(INST_ARCHLIB)\CORE | |
314 | INST_POD = $(INST_LIB)\pod | |
315 | INST_HTML = $(INST_POD)\html | |
316 | ||
317 | # | |
318 | # Programs to compile, build .lib files and link | |
319 | # | |
320 | ||
321 | .USESHELL : | |
322 | ||
323 | .IF "$(CCTYPE)" == "BORLAND" | |
324 | ||
325 | CC = bcc32 | |
326 | LINK32 = tlink32 | |
327 | LIB32 = tlib /P128 | |
328 | IMPLIB = implib -c | |
329 | RSC = rc | |
330 | ||
331 | # | |
332 | # Options | |
333 | # | |
334 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)" | |
335 | #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch | |
336 | DEFINES = -DWIN32 $(CRYPT_FLAG) | |
337 | LOCDEFS = -DPERLDLL -DPERL_CORE | |
338 | SUBSYS = console | |
339 | CXX_FLAG = -P | |
340 | ||
341 | LIBC = cw32mti.lib | |
342 | LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib | |
343 | ||
344 | .IF "$(CFG)" == "Debug" | |
345 | OPTIMIZE = -v -D_RTLDLL -DDEBUGGING | |
346 | LINK_DBG = -v | |
347 | .ELSE | |
348 | OPTIMIZE = -O2 -D_RTLDLL | |
349 | LINK_DBG = | |
350 | .ENDIF | |
351 | ||
352 | CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \ | |
353 | $(PCHFLAGS) $(OPTIMIZE) | |
354 | LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" | |
355 | OBJOUT_FLAG = -o | |
356 | EXEOUT_FLAG = -e | |
357 | LIBOUT_FLAG = | |
358 | ||
359 | .ELIF "$(CCTYPE)" == "GCC" | |
360 | ||
361 | CC = gcc | |
362 | LINK32 = gcc | |
363 | LIB32 = ar rc | |
364 | IMPLIB = dlltool | |
365 | RSC = rc | |
366 | ||
367 | o = .o | |
368 | a = .a | |
369 | ||
370 | # | |
371 | # Options | |
372 | # | |
373 | ||
374 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. | |
375 | DEFINES = -DWIN32 $(CRYPT_FLAG) | |
376 | LOCDEFS = -DPERLDLL -DPERL_CORE | |
377 | SUBSYS = console | |
378 | CXX_FLAG = -xc++ | |
379 | ||
380 | LIBC = -lmsvcrt | |
381 | ||
382 | # same libs as MSVC | |
383 | LIBFILES = $(CRYPT_LIB) $(LIBC) \ | |
384 | -lmoldname -lkernel32 -luser32 -lgdi32 \ | |
385 | -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \ | |
386 | -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \ | |
387 | -lwinmm -lversion -lodbc32 | |
388 | ||
389 | .IF "$(CFG)" == "Debug" | |
390 | OPTIMIZE = -g -DDEBUGGING | |
391 | LINK_DBG = -g | |
392 | .ELSE | |
393 | OPTIMIZE = -g -O2 | |
394 | LINK_DBG = | |
395 | .ENDIF | |
396 | ||
397 | CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) | |
398 | LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" | |
399 | OBJOUT_FLAG = -o | |
400 | EXEOUT_FLAG = -o | |
401 | LIBOUT_FLAG = | |
402 | ||
403 | # NOTE: we assume that GCC uses MSVCRT.DLL | |
404 | BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX | |
405 | ||
406 | .ELSE | |
407 | ||
408 | CC = cl | |
409 | LINK32 = link | |
410 | LIB32 = $(LINK32) -lib | |
411 | RSC = rc | |
412 | ||
413 | # | |
414 | # Options | |
415 | # | |
416 | ||
417 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. | |
418 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX | |
419 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG) | |
420 | LOCDEFS = -DPERLDLL -DPERL_CORE | |
421 | SUBSYS = console | |
422 | CXX_FLAG = -TP -GX | |
423 | ||
424 | .IF "$(USE_PERLCRT)" != "define" | |
425 | LIBC = msvcrt.lib | |
426 | .ELSE | |
427 | LIBC = PerlCRT.lib | |
428 | .ENDIF | |
429 | ||
430 | PERLEXE_RES = | |
431 | PERLDLL_RES = | |
432 | ||
433 | .IF "$(CFG)" == "Debug" | |
434 | .IF "$(CCTYPE)" == "MSVC20" | |
435 | OPTIMIZE = -Od -MD -Z7 -DDEBUGGING | |
436 | .ELSE | |
437 | OPTIMIZE = -Od -MD -Zi -DDEBUGGING | |
438 | .ENDIF | |
439 | LINK_DBG = -debug -pdb:none | |
440 | .ELSE | |
441 | .IF "$(CFG)" == "Optimize" | |
442 | # -O1 yields smaller code, which turns out to be faster than -O2 | |
443 | #OPTIMIZE = -O2 -MD -DNDEBUG | |
444 | OPTIMIZE = -O1 -MD -DNDEBUG | |
445 | .ELSE | |
446 | OPTIMIZE = -Od -MD -DNDEBUG | |
447 | .ENDIF | |
448 | LINK_DBG = -release | |
449 | .ENDIF | |
450 | ||
451 | LIBBASEFILES = $(CRYPT_LIB) \ | |
452 | oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ | |
453 | comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ | |
454 | netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \ | |
455 | version.lib odbc32.lib odbccp32.lib | |
456 | ||
457 | # we add LIBC here, since we may be using PerlCRT.dll | |
458 | LIBFILES = $(LIBBASEFILES) $(LIBC) | |
459 | ||
460 | CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \ | |
461 | $(PCHFLAGS) $(OPTIMIZE) | |
462 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ | |
463 | -libpath:"$(INST_COREDIR)" \ | |
464 | -machine:$(PROCESSOR_ARCHITECTURE) | |
465 | OBJOUT_FLAG = -Fo | |
466 | EXEOUT_FLAG = -Fe | |
467 | LIBOUT_FLAG = /out: | |
468 | ||
469 | .IF "$(USE_PERLCRT)" != "define" | |
470 | BUILDOPT += -DPERL_MSVCRT_READFIX | |
471 | .ENDIF | |
472 | ||
473 | .ENDIF | |
474 | ||
475 | .IF "$(USE_OBJECT)" == "define" | |
476 | OPTIMIZE += $(CXX_FLAG) | |
477 | BUILDOPT += -DPERL_OBJECT | |
478 | .ENDIF | |
479 | ||
480 | CFLAGS_O = $(CFLAGS) $(BUILDOPT) | |
481 | ||
482 | # used to allow local linking flags that are not propogated into Config.pm, | |
483 | # currently unused | |
484 | # -- BKS, 12-12-1999 | |
485 | PRIV_LINK_FLAGS *= | |
486 | BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) | |
487 | ||
488 | #################### do not edit below this line ####################### | |
489 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## | |
490 | ||
491 | o *= .obj | |
492 | a *= .lib | |
493 | ||
494 | LKPRE = INPUT ( | |
495 | LKPOST = ) | |
496 | ||
497 | # | |
498 | # Rules | |
499 | # | |
500 | ||
501 | .SUFFIXES : .c $(o) .dll $(a) .exe .rc .res | |
502 | ||
503 | .c$(o): | |
504 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< | |
505 | ||
506 | .y.c: | |
507 | $(NOOP) | |
508 | ||
509 | $(o).dll: | |
510 | .IF "$(CCTYPE)" == "BORLAND" | |
511 | $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def | |
512 | $(IMPLIB) $(*B).lib $@ | |
513 | .ELIF "$(CCTYPE)" == "GCC" | |
514 | $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES) | |
515 | $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@ | |
516 | .ELSE | |
517 | $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ | |
518 | -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL) | |
519 | .ENDIF | |
520 | ||
521 | .rc.res: | |
522 | $(RSC) -i.. $< | |
523 | ||
524 | # | |
525 | # various targets | |
526 | MINIPERL = ..\miniperl.exe | |
527 | MINIDIR = .\mini | |
528 | PERLEXE = ..\perl.exe | |
529 | WPERLEXE = ..\wperl.exe | |
530 | GLOBEXE = ..\perlglob.exe | |
531 | CONFIGPM = ..\lib\Config.pm | |
532 | MINIMOD = ..\lib\ExtUtils\Miniperl.pm | |
533 | X2P = ..\x2p\a2p.exe | |
534 | ||
535 | PL2BAT = bin\pl2bat.pl | |
536 | GLOBBAT = bin\perlglob.bat | |
537 | ||
538 | UTILS = \ | |
539 | ..\utils\h2ph \ | |
540 | ..\utils\splain \ | |
541 | ..\utils\dprofpp \ | |
542 | ..\utils\perlbug \ | |
543 | ..\utils\pl2pm \ | |
544 | ..\utils\c2ph \ | |
545 | ..\utils\h2xs \ | |
546 | ..\utils\perldoc \ | |
547 | ..\utils\perlcc \ | |
548 | ..\pod\checkpods \ | |
549 | ..\pod\pod2html \ | |
550 | ..\pod\pod2latex \ | |
551 | ..\pod\pod2man \ | |
552 | ..\pod\pod2text \ | |
553 | ..\pod\pod2usage \ | |
554 | ..\pod\podchecker \ | |
555 | ..\pod\podselect \ | |
556 | ..\x2p\find2perl \ | |
557 | ..\x2p\s2p \ | |
558 | bin\exetype.pl \ | |
559 | bin\runperl.pl \ | |
560 | bin\pl2bat.pl \ | |
561 | bin\perlglob.pl \ | |
562 | bin\search.pl | |
563 | ||
564 | .IF "$(CCTYPE)" == "BORLAND" | |
565 | ||
566 | CFGSH_TMPL = config.bc | |
567 | CFGH_TMPL = config_H.bc | |
568 | ||
569 | .ELIF "$(CCTYPE)" == "GCC" | |
570 | ||
571 | CFGSH_TMPL = config.gc | |
572 | CFGH_TMPL = config_H.gc | |
573 | PERLIMPLIB = ..\libperl56$(a) | |
574 | ||
575 | .ELSE | |
576 | ||
577 | CFGSH_TMPL = config.vc | |
578 | CFGH_TMPL = config_H.vc | |
579 | ||
580 | .ENDIF | |
581 | ||
582 | PERLIMPLIB *= ..\perl56$(a) | |
583 | PERLDLL = ..\perl56.dll | |
584 | ||
585 | XCOPY = xcopy /f /r /i /d | |
586 | RCOPY = xcopy /f /r /i /e /d | |
587 | NOOP = @echo | |
588 | ||
589 | # | |
590 | # filenames given to xsubpp must have forward slashes (since it puts | |
591 | # full pathnames in #line strings) | |
592 | XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \ | |
593 | -C++ -prototypes | |
594 | ||
595 | MICROCORE_SRC = \ | |
596 | ..\av.c \ | |
597 | ..\deb.c \ | |
598 | ..\doio.c \ | |
599 | ..\doop.c \ | |
600 | ..\dump.c \ | |
601 | ..\globals.c \ | |
602 | ..\gv.c \ | |
603 | ..\hv.c \ | |
604 | ..\mg.c \ | |
605 | ..\op.c \ | |
606 | ..\perl.c \ | |
607 | ..\perlapi.c \ | |
608 | ..\perly.c \ | |
609 | ..\pp.c \ | |
610 | ..\pp_ctl.c \ | |
611 | ..\pp_hot.c \ | |
612 | ..\pp_sys.c \ | |
613 | ..\regcomp.c \ | |
614 | ..\regexec.c \ | |
615 | ..\run.c \ | |
616 | ..\scope.c \ | |
617 | ..\sv.c \ | |
618 | ..\taint.c \ | |
619 | ..\toke.c \ | |
620 | ..\universal.c \ | |
621 | ..\utf8.c \ | |
622 | ..\util.c \ | |
623 | ..\xsutils.c | |
624 | ||
625 | EXTRACORE_SRC += perllib.c | |
626 | ||
627 | .IF "$(PERL_MALLOC)" == "define" | |
628 | EXTRACORE_SRC += ..\malloc.c | |
629 | .ENDIF | |
630 | ||
631 | .IF "$(USE_OBJECT)" != "define" | |
632 | EXTRACORE_SRC += ..\perlio.c | |
633 | .ENDIF | |
634 | ||
635 | WIN32_SRC = \ | |
636 | .\win32.c \ | |
637 | .\win32sck.c \ | |
638 | .\win32thread.c | |
639 | ||
640 | .IF "$(CRYPT_SRC)" != "" | |
641 | WIN32_SRC += .\$(CRYPT_SRC) | |
642 | .ENDIF | |
643 | ||
644 | DLL_SRC = $(DYNALOADER).c | |
645 | ||
646 | X2P_SRC = \ | |
647 | ..\x2p\a2p.c \ | |
648 | ..\x2p\hash.c \ | |
649 | ..\x2p\str.c \ | |
650 | ..\x2p\util.c \ | |
651 | ..\x2p\walk.c | |
652 | ||
653 | CORE_NOCFG_H = \ | |
654 | ..\av.h \ | |
655 | ..\cop.h \ | |
656 | ..\cv.h \ | |
657 | ..\dosish.h \ | |
658 | ..\embed.h \ | |
659 | ..\form.h \ | |
660 | ..\gv.h \ | |
661 | ..\handy.h \ | |
662 | ..\hv.h \ | |
663 | ..\iperlsys.h \ | |
664 | ..\mg.h \ | |
665 | ..\nostdio.h \ | |
666 | ..\op.h \ | |
667 | ..\opcode.h \ | |
668 | ..\perl.h \ | |
669 | ..\perlapi.h \ | |
670 | ..\perlsdio.h \ | |
671 | ..\perlsfio.h \ | |
672 | ..\perly.h \ | |
673 | ..\pp.h \ | |
674 | ..\proto.h \ | |
675 | ..\regexp.h \ | |
676 | ..\scope.h \ | |
677 | ..\sv.h \ | |
678 | ..\thread.h \ | |
679 | ..\unixish.h \ | |
680 | ..\utf8.h \ | |
681 | ..\util.h \ | |
682 | ..\warnings.h \ | |
683 | ..\XSUB.h \ | |
684 | ..\EXTERN.h \ | |
685 | ..\perlvars.h \ | |
686 | ..\intrpvar.h \ | |
687 | ..\thrdvar.h \ | |
688 | .\include\dirent.h \ | |
689 | .\include\netdb.h \ | |
690 | .\include\sys\socket.h \ | |
691 | .\win32.h | |
692 | ||
693 | CORE_H = $(CORE_NOCFG_H) .\config.h | |
694 | ||
695 | MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o)) | |
696 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o)) | |
697 | WIN32_OBJ = $(WIN32_SRC:db:+$(o)) | |
698 | MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)} | |
699 | MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)} | |
700 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) | |
701 | DLL_OBJ = $(DLL_SRC:db:+$(o)) | |
702 | X2P_OBJ = $(X2P_SRC:db:+$(o)) | |
703 | ||
704 | PERLDLL_OBJ = $(CORE_OBJ) | |
705 | PERLEXE_OBJ = perlmain$(o) | |
706 | ||
707 | PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ) | |
708 | ||
709 | .IF "$(USE_SETARGV)" != "" | |
710 | SETARGV_OBJ = setargv$(o) | |
711 | .ENDIF | |
712 | ||
713 | DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \ | |
714 | Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \ | |
715 | Sys/Hostname Storable | |
716 | STATIC_EXT = DynaLoader | |
717 | NONXS_EXT = Errno | |
718 | ||
719 | DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader | |
720 | SOCKET = $(EXTDIR)\Socket\Socket | |
721 | FCNTL = $(EXTDIR)\Fcntl\Fcntl | |
722 | OPCODE = $(EXTDIR)\Opcode\Opcode | |
723 | SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File | |
724 | IO = $(EXTDIR)\IO\IO | |
725 | POSIX = $(EXTDIR)\POSIX\POSIX | |
726 | ATTRS = $(EXTDIR)\attrs\attrs | |
727 | THREAD = $(EXTDIR)\Thread\Thread | |
728 | B = $(EXTDIR)\B\B | |
729 | RE = $(EXTDIR)\re\re | |
730 | DUMPER = $(EXTDIR)\Data\Dumper\Dumper | |
731 | ERRNO = $(EXTDIR)\Errno\Errno | |
732 | PEEK = $(EXTDIR)\Devel\Peek\Peek | |
733 | BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader | |
734 | DPROF = $(EXTDIR)\Devel\DProf\DProf | |
735 | GLOB = $(EXTDIR)\File\Glob\Glob | |
736 | HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname | |
737 | STORABLE = $(EXTDIR)\Storable\Storable | |
738 | ||
739 | SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll | |
740 | FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll | |
741 | OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll | |
742 | SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll | |
743 | IO_DLL = $(AUTODIR)\IO\IO.dll | |
744 | POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll | |
745 | ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll | |
746 | THREAD_DLL = $(AUTODIR)\Thread\Thread.dll | |
747 | B_DLL = $(AUTODIR)\B\B.dll | |
748 | DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll | |
749 | PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll | |
750 | RE_DLL = $(AUTODIR)\re\re.dll | |
751 | BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll | |
752 | DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll | |
753 | GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll | |
754 | HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll | |
755 | STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll | |
756 | ||
757 | ERRNO_PM = $(LIBDIR)\Errno.pm | |
758 | ||
759 | EXTENSION_C = \ | |
760 | $(SOCKET).c \ | |
761 | $(FCNTL).c \ | |
762 | $(OPCODE).c \ | |
763 | $(SDBM_FILE).c \ | |
764 | $(IO).c \ | |
765 | $(POSIX).c \ | |
766 | $(ATTRS).c \ | |
767 | $(THREAD).c \ | |
768 | $(RE).c \ | |
769 | $(DUMPER).c \ | |
770 | $(PEEK).c \ | |
771 | $(B).c \ | |
772 | $(BYTELOADER).c \ | |
773 | $(DPROF).c \ | |
774 | $(GLOB).c \ | |
775 | $(HOSTNAME).c \ | |
776 | $(STORABLE).c | |
777 | ||
778 | EXTENSION_DLL = \ | |
779 | $(SOCKET_DLL) \ | |
780 | $(FCNTL_DLL) \ | |
781 | $(OPCODE_DLL) \ | |
782 | $(SDBM_FILE_DLL)\ | |
783 | $(IO_DLL) \ | |
784 | $(POSIX_DLL) \ | |
785 | $(ATTRS_DLL) \ | |
786 | $(DUMPER_DLL) \ | |
787 | $(PEEK_DLL) \ | |
788 | $(B_DLL) \ | |
789 | $(RE_DLL) \ | |
790 | $(THREAD_DLL) \ | |
791 | $(BYTELOADER_DLL) \ | |
792 | $(DPROF_DLL) \ | |
793 | $(GLOB_DLL) \ | |
794 | $(HOSTNAME_DLL) \ | |
795 | $(STORABLE_DLL) | |
796 | ||
797 | EXTENSION_PM = \ | |
798 | $(ERRNO_PM) | |
799 | ||
800 | POD2HTML = $(PODDIR)\pod2html | |
801 | POD2MAN = $(PODDIR)\pod2man | |
802 | POD2LATEX = $(PODDIR)\pod2latex | |
803 | POD2TEXT = $(PODDIR)\pod2text | |
804 | ||
805 | # vars must be separated by "\t+~\t+", since we're using the tempfile | |
806 | # version of config_sh.pl (we were overflowing someone's buffer by | |
807 | # trying to fit them all on the command line) | |
808 | # -- BKS 10-17-1999 | |
809 | CFG_VARS = \ | |
810 | INST_DRV=$(INST_DRV) ~ \ | |
811 | INST_TOP=$(INST_TOP:s/\/\\/) ~ \ | |
812 | INST_VER=$(INST_VER:s/\/\\/) ~ \ | |
813 | INST_ARCH=$(INST_ARCH) ~ \ | |
814 | archname=$(ARCHNAME) ~ \ | |
815 | cc=$(CC) ~ \ | |
816 | ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \ | |
817 | cf_email=$(EMAIL) ~ \ | |
818 | d_crypt=$(D_CRYPT) ~ \ | |
819 | d_mymalloc=$(PERL_MALLOC) ~ \ | |
820 | libs=$(LIBFILES:f) ~ \ | |
821 | incpath=$(CCINCDIR:s/\/\\/) ~ \ | |
822 | libperl=$(PERLIMPLIB:f) ~ \ | |
823 | libpth=$(CCLIBDIR:s/\/\\/);$(EXTRALIBDIRS:s/\/\\/) ~ \ | |
824 | libc=$(LIBC) ~ \ | |
825 | make=dmake ~ \ | |
826 | _o=$(o) obj_ext=$(o) ~ \ | |
827 | _a=$(a) lib_ext=$(a) ~ \ | |
828 | static_ext=$(STATIC_EXT) ~ \ | |
829 | dynamic_ext=$(DYNAMIC_EXT) ~ \ | |
830 | nonxs_ext=$(NONXS_EXT) ~ \ | |
831 | use5005threads=$(USE_5005THREADS) ~ \ | |
832 | useithreads=$(USE_ITHREADS) ~ \ | |
833 | usethreads=$(USE_5005THREADS) ~ \ | |
834 | usemultiplicity=$(USE_MULTI) ~ \ | |
835 | LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \ | |
836 | optimize=$(OPTIMIZE) | |
837 | ||
838 | # | |
839 | # set up targets varying between Win95 and WinNT builds | |
840 | # | |
841 | ||
842 | .IF "$(IS_WIN95)" == "define" | |
843 | MK2 = .\makefile.95 | |
844 | RIGHTMAKE = __switch_makefiles | |
845 | NOOP = @rem | |
846 | .ELSE | |
847 | MK2 = __not_needed | |
848 | RIGHTMAKE = __not_needed | |
849 | .ENDIF | |
850 | ||
851 | # | |
852 | # Top targets | |
853 | # | |
854 | ||
855 | all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \ | |
856 | $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \ | |
857 | $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM) | |
858 | ||
859 | $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c | |
860 | ||
861 | #---------------------------------------------------------------- | |
862 | ||
863 | #-------------------- BEGIN Win95 SPECIFIC ---------------------- | |
864 | ||
865 | # this target is a jump-off point for Win95 | |
866 | # 1. it switches to the Win95-specific makefile if it exists | |
867 | # (__do_switch_makefiles) | |
868 | # 2. it prints a message when the Win95-specific one finishes (__done) | |
869 | # 3. it then kills this makefile by trying to make __no_such_target | |
870 | ||
871 | __switch_makefiles: __do_switch_makefiles __done __no_such_target | |
872 | ||
873 | __do_switch_makefiles: | |
874 | .IF "$(NOTFIRST)" != "true" | |
875 | if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true | |
876 | .ELSE | |
877 | $(NOOP) | |
878 | .ENDIF | |
879 | ||
880 | .IF "$(NOTFIRST)" != "true" | |
881 | __done: | |
882 | @echo Build process complete. Ignore any errors after this message. | |
883 | @echo Run "dmake test" to test and "dmake install" to install | |
884 | ||
885 | .ELSE | |
886 | # dummy targets for Win95-specific makefile | |
887 | ||
888 | __done: | |
889 | $(NOOP) | |
890 | ||
891 | __no_such_target: | |
892 | $(NOOP) | |
893 | ||
894 | .ENDIF | |
895 | ||
896 | # This target is used to generate the new makefile (.\makefile.95) for Win95 | |
897 | ||
898 | .\makefile.95: .\makefile.mk | |
899 | $(MINIPERL) genmk95.pl makefile.mk $(MK2) | |
900 | ||
901 | #--------------------- END Win95 SPECIFIC --------------------- | |
902 | ||
903 | # a blank target for when builds don't need to do certain things | |
904 | # this target added for Win95 port but used to keep the WinNT port able to | |
905 | # use this file | |
906 | __not_needed: | |
907 | $(NOOP) | |
908 | ||
909 | $(GLOBEXE) : perlglob$(o) | |
910 | .IF "$(CCTYPE)" == "BORLAND" | |
911 | $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c | |
912 | $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \ | |
913 | "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib, | |
914 | .ELIF "$(CCTYPE)" == "GCC" | |
915 | $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES) | |
916 | .ELSE | |
917 | $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ | |
918 | perlglob$(o) setargv$(o) | |
919 | .ENDIF | |
920 | ||
921 | perlglob$(o) : perlglob.c | |
922 | ||
923 | config.w32 : $(CFGSH_TMPL) | |
924 | copy $(CFGSH_TMPL) config.w32 | |
925 | ||
926 | .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H) | |
927 | -del /f config.h | |
928 | copy $(CFGH_TMPL) config.h | |
929 | ||
930 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL | |
931 | $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \ | |
932 | $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh | |
933 | ||
934 | # this target is for when changes to the main config.sh happen | |
935 | # edit config.{b,v,g}c and make this target once for each supported | |
936 | # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`) | |
937 | regen_config_h: | |
938 | perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \ | |
939 | $(CFGSH_TMPL) > ..\config.sh | |
940 | -cd .. && del /f perl.exe | |
941 | cd .. && perl configpm | |
942 | -del /f $(CFGH_TMPL) | |
943 | -mkdir $(COREDIR) | |
944 | -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)" | |
945 | rename config.h $(CFGH_TMPL) | |
946 | ||
947 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl | |
948 | cd .. && miniperl configpm | |
949 | if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) | |
950 | $(XCOPY) ..\*.h $(COREDIR)\*.* | |
951 | $(XCOPY) *.h $(COREDIR)\*.* | |
952 | $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.* | |
953 | $(RCOPY) include $(COREDIR)\*.* | |
954 | $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \ | |
955 | || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE) | |
956 | ||
957 | $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) | |
958 | .IF "$(CCTYPE)" == "BORLAND" | |
959 | $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ | |
960 | @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) | |
961 | .ELIF "$(CCTYPE)" == "GCC" | |
962 | $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \ | |
963 | $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) | |
964 | .ELSE | |
965 | $(LINK32) -subsystem:console -out:$@ \ | |
966 | @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\)) | |
967 | .ENDIF | |
968 | ||
969 | $(MINIDIR) : | |
970 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" | |
971 | ||
972 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) | |
973 | $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*B).c | |
974 | ||
975 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) | |
976 | $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c | |
977 | ||
978 | # -DPERL_IMPLICIT_SYS needs C++ for perllib.c | |
979 | # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless | |
980 | # unless the .IF is true), so instead we use a .ELSE with the default. | |
981 | # This is the only file that depends on perlhost.h, vmem.h, and vdir.h | |
982 | ||
983 | perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h | |
984 | .IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef" | |
985 | $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c | |
986 | .ELSE | |
987 | $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c | |
988 | .ENDIF | |
989 | ||
990 | # 1. we don't want to rebuild miniperl.exe when config.h changes | |
991 | # 2. we don't want to rebuild miniperl.exe with non-default config.h | |
992 | $(MINI_OBJ) : $(CORE_NOCFG_H) | |
993 | ||
994 | $(WIN32_OBJ) : $(CORE_H) | |
995 | $(CORE_OBJ) : $(CORE_H) | |
996 | $(DLL_OBJ) : $(CORE_H) | |
997 | $(X2P_OBJ) : $(CORE_H) | |
998 | ||
999 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl | |
1000 | $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \ | |
1001 | $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def | |
1002 | ||
1003 | $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) | |
1004 | .IF "$(CCTYPE)" == "BORLAND" | |
1005 | $(LINK32) -Tpd -ap $(BLINK_FLAGS) \ | |
1006 | @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \ | |
1007 | $@,\n \ | |
1008 | $(LIBFILES)\n \ | |
1009 | perldll.def\n) | |
1010 | $(IMPLIB) $*.lib $@ | |
1011 | .ELIF "$(CCTYPE)" == "GCC" | |
1012 | $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \ | |
1013 | $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) | |
1014 | dlltool --output-lib $(PERLIMPLIB) \ | |
1015 | --dllname $(PERLDLL:b).dll \ | |
1016 | --def perldll.def \ | |
1017 | --base-file perl.base \ | |
1018 | --output-exp perl.exp | |
1019 | $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \ | |
1020 | $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \ | |
1021 | perl.exp $(LKPOST)) | |
1022 | .ELSE | |
1023 | $(LINK32) -dll -def:perldll.def -out:$@ \ | |
1024 | @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \ | |
1025 | $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\)) | |
1026 | .ENDIF | |
1027 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) | |
1028 | ||
1029 | $(MINIMOD) : $(MINIPERL) ..\minimod.pl | |
1030 | cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm | |
1031 | ||
1032 | ..\x2p\a2p$(o) : ..\x2p\a2p.c | |
1033 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c | |
1034 | ||
1035 | ..\x2p\hash$(o) : ..\x2p\hash.c | |
1036 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c | |
1037 | ||
1038 | ..\x2p\str$(o) : ..\x2p\str.c | |
1039 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c | |
1040 | ||
1041 | ..\x2p\util$(o) : ..\x2p\util.c | |
1042 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c | |
1043 | ||
1044 | ..\x2p\walk$(o) : ..\x2p\walk.c | |
1045 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c | |
1046 | ||
1047 | $(X2P) : $(MINIPERL) $(X2P_OBJ) | |
1048 | $(MINIPERL) ..\x2p\find2perl.PL | |
1049 | $(MINIPERL) ..\x2p\s2p.PL | |
1050 | .IF "$(CCTYPE)" == "BORLAND" | |
1051 | $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ | |
1052 | @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) | |
1053 | .ELIF "$(CCTYPE)" == "GCC" | |
1054 | $(LINK32) -v -o $@ $(BLINK_FLAGS) \ | |
1055 | $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) | |
1056 | .ELSE | |
1057 | $(LINK32) -subsystem:console -out:$@ \ | |
1058 | @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\)) | |
1059 | .ENDIF | |
1060 | ||
1061 | perlmain.c : runperl.c | |
1062 | copy runperl.c perlmain.c | |
1063 | ||
1064 | perlmain$(o) : perlmain.c | |
1065 | $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c | |
1066 | ||
1067 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) | |
1068 | .IF "$(CCTYPE)" == "BORLAND" | |
1069 | $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ | |
1070 | @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \ | |
1071 | $(@:s,\,\\),\n \ | |
1072 | $(PERLIMPLIB) $(LIBFILES)\n) | |
1073 | .ELIF "$(CCTYPE)" == "GCC" | |
1074 | $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ | |
1075 | $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES) | |
1076 | .ELSE | |
1077 | $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \ | |
1078 | $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES) | |
1079 | .ENDIF | |
1080 | copy $(PERLEXE) $(WPERLEXE) | |
1081 | $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS | |
1082 | copy splittree.pl .. | |
1083 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) | |
1084 | ||
1085 | $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) | |
1086 | if not exist $(AUTODIR) mkdir $(AUTODIR) | |
1087 | cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL | |
1088 | cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL | |
1089 | $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) | |
1090 | $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL) | |
1091 | cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c | |
1092 | $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c . | |
1093 | ||
1094 | $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs | |
1095 | copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs | |
1096 | ||
1097 | $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs | |
1098 | cd $(EXTDIR)\Data\$(*B) && \ | |
1099 | ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl | |
1100 | cd $(EXTDIR)\Data\$(*B) && $(MAKE) | |
1101 | ||
1102 | $(DPROF_DLL): $(PERLEXE) $(DPROF).xs | |
1103 | cd $(EXTDIR)\Devel\$(*B) && \ | |
1104 | ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl | |
1105 | cd $(EXTDIR)\Devel\$(*B) && $(MAKE) | |
1106 | ||
1107 | $(GLOB_DLL): $(PERLEXE) $(GLOB).xs | |
1108 | cd $(EXTDIR)\File\$(*B) && \ | |
1109 | ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl | |
1110 | cd $(EXTDIR)\File\$(*B) && $(MAKE) | |
1111 | ||
1112 | $(PEEK_DLL): $(PERLEXE) $(PEEK).xs | |
1113 | cd $(EXTDIR)\Devel\$(*B) && \ | |
1114 | ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl | |
1115 | cd $(EXTDIR)\Devel\$(*B) && $(MAKE) | |
1116 | ||
1117 | $(RE_DLL): $(PERLEXE) $(RE).xs | |
1118 | cd $(EXTDIR)\$(*B) && \ | |
1119 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1120 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1121 | ||
1122 | $(B_DLL): $(PERLEXE) $(B).xs | |
1123 | cd $(EXTDIR)\$(*B) && \ | |
1124 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1125 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1126 | ||
1127 | $(THREAD_DLL): $(PERLEXE) $(THREAD).xs | |
1128 | cd $(EXTDIR)\$(*B) && \ | |
1129 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1130 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1131 | ||
1132 | $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs | |
1133 | cd $(EXTDIR)\$(*B) && \ | |
1134 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1135 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1136 | ||
1137 | $(POSIX_DLL): $(PERLEXE) $(POSIX).xs | |
1138 | cd $(EXTDIR)\$(*B) && \ | |
1139 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1140 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1141 | ||
1142 | $(IO_DLL): $(PERLEXE) $(IO).xs | |
1143 | cd $(EXTDIR)\$(*B) && \ | |
1144 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1145 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1146 | ||
1147 | $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs | |
1148 | cd $(EXTDIR)\$(*B) && \ | |
1149 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1150 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1151 | ||
1152 | $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs | |
1153 | cd $(EXTDIR)\$(*B) && \ | |
1154 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1155 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1156 | ||
1157 | $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs | |
1158 | cd $(EXTDIR)\$(*B) && \ | |
1159 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1160 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1161 | ||
1162 | $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs | |
1163 | cd $(EXTDIR)\$(*B) && \ | |
1164 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1165 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1166 | ||
1167 | $(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs | |
1168 | cd $(EXTDIR)\Sys\$(*B) && \ | |
1169 | ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl | |
1170 | cd $(EXTDIR)\Sys\$(*B) && $(MAKE) | |
1171 | ||
1172 | $(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs | |
1173 | cd $(EXTDIR)\$(*B) && \ | |
1174 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1175 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1176 | ||
1177 | $(STORABLE_DLL): $(PERLEXE) $(STORABLE).xs | |
1178 | cd $(EXTDIR)\$(*B) && \ | |
1179 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1180 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1181 | ||
1182 | $(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL | |
1183 | cd $(EXTDIR)\$(*B) && \ | |
1184 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
1185 | cd $(EXTDIR)\$(*B) && $(MAKE) | |
1186 | ||
1187 | doc: $(PERLEXE) | |
1188 | $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \ | |
1189 | --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\ | |
1190 | --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse | |
1191 | ||
1192 | utils: $(PERLEXE) $(X2P) | |
1193 | cd ..\utils && $(MAKE) PERL=$(MINIPERL) | |
1194 | copy ..\README.amiga ..\pod\perlamiga.pod | |
1195 | copy ..\README.cygwin ..\pod\perlcygwin.pod | |
1196 | copy ..\README.dos ..\pod\perldos.pod | |
1197 | copy ..\README.hpux ..\pod\perlhpux.pod | |
1198 | copy ..\README.machten ..\pod\perlmachten.pod | |
1199 | copy ..\README.os2 ..\pod\perlos2.pod | |
1200 | copy ..\README.os2 ..\pod\perlos2.pod | |
1201 | copy ..\vms\perlvms.pod ..\pod\perlvms.pod | |
1202 | cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters | |
1203 | cd ..\lib && $(PERLEXE) lib_pm.PL | |
1204 | $(PERLEXE) $(PL2BAT) $(UTILS) | |
1205 | ||
1206 | distclean: clean | |
1207 | -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ | |
1208 | $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD) | |
1209 | -del /f *.def *.map | |
1210 | -del /f $(EXTENSION_DLL) $(EXTENSION_PM) | |
1211 | -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm | |
1212 | -del /f $(EXTDIR)\DynaLoader\dl_win32.xs | |
1213 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm | |
1214 | -del /f $(LIBDIR)\XSLoader.pm | |
1215 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm | |
1216 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm | |
1217 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm | |
1218 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm | |
1219 | -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm | |
1220 | -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm | |
1221 | -del /f $(LIBDIR)\File\Glob.pm | |
1222 | -del /f $(LIBDIR)\Storable.pm | |
1223 | -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO | |
1224 | -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread | |
1225 | -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B | |
1226 | -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data | |
1227 | -del /f $(PODDIR)\*.html | |
1228 | -del /f $(PODDIR)\*.bat | |
1229 | -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \ | |
1230 | dprofpp *.bat | |
1231 | -cd ..\x2p && del /f find2perl s2p *.bat | |
1232 | -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new | |
1233 | -del /f $(CONFIGPM) | |
1234 | -del /f bin\*.bat | |
1235 | -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \ | |
1236 | pm_to_blib | |
1237 | -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR) | |
1238 | -if exist $(COREDIR) rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR) | |
1239 | ||
1240 | install : all installbare installhtml | |
1241 | ||
1242 | installbare : $(RIGHTMAKE) utils | |
1243 | $(PERLEXE) ..\installperl | |
1244 | if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* | |
1245 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* | |
1246 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* | |
1247 | ||
1248 | installhtml : doc | |
1249 | $(RCOPY) html\*.* $(INST_HTML)\*.* | |
1250 | ||
1251 | inst_lib : $(CONFIGPM) | |
1252 | copy splittree.pl .. | |
1253 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) | |
1254 | $(RCOPY) ..\lib $(INST_LIB)\*.* | |
1255 | ||
1256 | minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils | |
1257 | $(XCOPY) $(MINIPERL) ..\t\perl.exe | |
1258 | .IF "$(CCTYPE)" == "BORLAND" | |
1259 | $(XCOPY) $(GLOBBAT) ..\t\$(NULL) | |
1260 | .ELSE | |
1261 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1262 | .ENDIF | |
1263 | attrib -r ..\t\*.* | |
1264 | copy test ..\t | |
1265 | cd ..\t && \ | |
1266 | $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t | |
1267 | ||
1268 | test-prep : all utils | |
1269 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1270 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1271 | .IF "$(CCTYPE)" == "BORLAND" | |
1272 | $(XCOPY) $(GLOBBAT) ..\t\$(NULL) | |
1273 | .ELSE | |
1274 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1275 | .ENDIF | |
1276 | ||
1277 | test : $(RIGHTMAKE) test-prep | |
1278 | cd ..\t && $(PERLEXE) -I..\lib harness | |
1279 | ||
1280 | test-notty : test-prep | |
1281 | set PERL_SKIP_TTY_TEST=1 && \ | |
1282 | cd ..\t && $(PERLEXE) -I.\lib harness | |
1283 | ||
1284 | test-wide : test-prep | |
1285 | set HARNESS_PERL_SWITCHES=-C && \ | |
1286 | cd ..\t && $(PERLEXE) -I..\lib harness | |
1287 | ||
1288 | test-wide-notty : test-prep | |
1289 | set PERL_SKIP_TTY_TEST=1 && \ | |
1290 | set HARNESS_PERL_SWITCHES=-C && \ | |
1291 | cd ..\t && $(PERLEXE) -I..\lib harness | |
1292 | ||
1293 | clean : | |
1294 | -@erase miniperlmain$(o) | |
1295 | -@erase $(MINIPERL) | |
1296 | -@erase perlglob$(o) | |
1297 | -@erase perlmain$(o) | |
1298 | -@erase config.w32 | |
1299 | -@erase /f config.h | |
1300 | -@erase $(GLOBEXE) | |
1301 | -@erase $(PERLEXE) | |
1302 | -@erase $(WPERLEXE) | |
1303 | -@erase $(PERLDLL) | |
1304 | -@erase $(CORE_OBJ) | |
1305 | -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR) | |
1306 | -@erase $(WIN32_OBJ) | |
1307 | -@erase $(DLL_OBJ) | |
1308 | -@erase $(X2P_OBJ) | |
1309 | -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res | |
1310 | -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat | |
1311 | -@erase ..\x2p\*.exe ..\x2p\*.bat | |
1312 | -@erase *.ilk | |
1313 | -@erase *.pdb | |
1314 | ||
1315 | # Handy way to run perlbug -ok without having to install and run the | |
1316 | # installed perlbug. We don't re-run the tests here - we trust the user. | |
1317 | # Please *don't* use this unless all tests pass. | |
1318 | # If you want to report test failures, use "dmake nok" instead. | |
1319 | ok: utils | |
1320 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" | |
1321 | ||
1322 | okfile: utils | |
1323 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok | |
1324 | ||
1325 | nok: utils | |
1326 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" | |
1327 | ||
1328 | nokfile: utils | |
1329 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok |