Commit | Line | Data |
1e71036e |
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 | # (perl57.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.7.2 |
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 | # uncomment to enable the experimental PerlIO I/O subsystem. |
71 | USE_PERLIO = define |
72 | |
73 | # |
74 | # WARNING! This option is deprecated and will eventually go away (enable |
75 | # USE_ITHREADS instead). |
76 | # |
77 | # uncomment to enable threads-capabilities. This is incompatible with |
78 | # USE_ITHREADS, and is only here for people who may have come to rely |
79 | # on the experimental Thread support that was in 5.005. |
80 | # |
81 | #USE_5005THREADS *= define |
82 | |
83 | # |
1e71036e |
84 | # uncomment exactly one of the following |
85 | # |
86 | # Visual C++ 2.x |
87 | #CCTYPE *= MSVC20 |
88 | # Visual C++ > 2.x and < 6.x |
89 | #CCTYPE *= MSVC |
90 | # Visual C++ >= 6.x |
91 | CCTYPE *= MSVC60 |
92 | # Borland 5.02 or later |
93 | #CCTYPE *= BORLAND |
94 | # mingw32+gcc-2.95.2 or better |
95 | #CCTYPE *= GCC |
96 | |
97 | # |
98 | # uncomment this if your Borland compiler is older than v5.4. |
c572eed0 |
99 | #BCCOLD = define |
1e71036e |
100 | # |
101 | # uncomment this if you want to use Borland's VCL as your CRT |
102 | #BCCVCL = define |
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. |
468f45d5 |
120 | # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/ |
1e71036e |
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 | # |
c572eed0 |
166 | .IF "$(CCTYPE)" == "BORLAND" |
167 | CCHOME *= C:\borland\bcc55 |
168 | .ELIF "$(CCTYPE)" == "GCC" |
169 | CCHOME *= C:\MinGW |
170 | .ELSE |
1e71036e |
171 | CCHOME *= $(MSVCDIR) |
c572eed0 |
172 | .ENDIF |
1e71036e |
173 | CCINCDIR *= $(CCHOME)\include |
174 | CCLIBDIR *= $(CCHOME)\lib |
175 | |
176 | # |
177 | # Additional compiler flags can be specified here. |
178 | # |
179 | |
180 | # |
181 | # This should normally be disabled. Adding -DPERL_POLLUTE enables support |
182 | # for old symbols by default, at the expense of extreme pollution. You most |
183 | # probably just want to build modules that won't compile with |
184 | # perl Makefile.PL POLLUTE=1 |
185 | # instead of enabling this. Please report such modules to the respective |
186 | # authors. |
187 | # |
188 | #BUILDOPT += -DPERL_POLLUTE |
189 | |
190 | # |
191 | # This should normally be disabled. Enabling it will disable the File::Glob |
192 | # implementation of CORE::glob. |
193 | # |
194 | #BUILDOPT += -DPERL_EXTERNAL_GLOB |
195 | |
196 | # |
197 | # This should normally be disabled. Enabling it causes perl to read scripts |
198 | # in text mode (which is the 5.005 behavior) and will break ByteLoader. |
199 | #BUILDOPT += -DPERL_TEXTMODE_SCRIPTS |
200 | |
201 | # |
202 | # specify semicolon-separated list of extra directories that modules will |
203 | # look for libraries (spaces in path names need not be quoted) |
204 | # |
205 | EXTRALIBDIRS *= |
206 | |
207 | # |
208 | # set this to point to cmd.exe (only needed if you use some |
209 | # alternate shell that doesn't grok cmd.exe style commands) |
210 | # |
211 | #SHELL *= g:\winnt\system32\cmd.exe |
212 | |
213 | # |
214 | # set this to your email address (perl will guess a value from |
215 | # from your loginname and your hostname, which may not be right) |
216 | # |
217 | #EMAIL *= |
218 | |
219 | ## |
220 | ## Build configuration ends. |
221 | ## |
222 | |
223 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### |
224 | |
225 | .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" |
226 | D_CRYPT = undef |
227 | .ELSE |
228 | D_CRYPT = define |
229 | CRYPT_FLAG = -DHAVE_DES_FCRYPT |
230 | .ENDIF |
231 | |
1e71036e |
232 | PERL_MALLOC *= undef |
233 | |
234 | USE_5005THREADS *= undef |
235 | |
236 | .IF "$(USE_5005THREADS)" == "define" |
237 | USE_ITHREADS != undef |
238 | .ENDIF |
239 | |
240 | .IF "$(USE_IMP_SYS)" == "define" |
241 | PERL_MALLOC != undef |
242 | .ENDIF |
243 | |
244 | USE_MULTI *= undef |
1e71036e |
245 | USE_ITHREADS *= undef |
246 | USE_IMP_SYS *= undef |
247 | USE_PERLIO *= undef |
248 | USE_PERLCRT *= undef |
249 | |
acfe0abc |
250 | .IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef" |
1e71036e |
251 | USE_MULTI != define |
252 | .ENDIF |
253 | |
acfe0abc |
254 | .IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" |
1e71036e |
255 | USE_MULTI != define |
256 | USE_5005THREADS != undef |
257 | .ENDIF |
258 | |
acfe0abc |
259 | .IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef" |
1e71036e |
260 | BUILDOPT += -DPERL_IMPLICIT_CONTEXT |
261 | .ENDIF |
262 | |
263 | .IF "$(USE_IMP_SYS)" != "undef" |
264 | BUILDOPT += -DPERL_IMPLICIT_SYS |
265 | .ENDIF |
266 | |
267 | .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE |
268 | |
269 | PROCESSOR_ARCHITECTURE *= x86 |
270 | |
acfe0abc |
271 | .IF "$(USE_5005THREADS)" == "define" |
1e71036e |
272 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread |
273 | .ELIF "$(USE_MULTI)" == "define" |
274 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi |
275 | .ELSE |
276 | .IF "$(USE_PERLIO)" == "define" |
277 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio |
278 | .ELSE |
279 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) |
280 | .ENDIF |
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 | .IF "$(CFG)" == "Debug" |
296 | .ELSE |
297 | # VC 6.0 seems capable of compiling perl correctly with optimizations |
298 | # enabled. Anything earlier fails tests. |
299 | CFG *= Optimize |
300 | .ENDIF |
301 | .ENDIF |
302 | |
303 | ARCHDIR = ..\lib\$(ARCHNAME) |
304 | COREDIR = ..\lib\CORE |
305 | AUTODIR = ..\lib\auto |
306 | LIBDIR = ..\lib |
307 | EXTDIR = ..\ext |
308 | PODDIR = ..\pod |
309 | EXTUTILSDIR = $(LIBDIR)\ExtUtils |
310 | |
311 | # |
312 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin |
313 | INST_BIN = $(INST_SCRIPT)$(INST_ARCH) |
314 | INST_LIB = $(INST_TOP)$(INST_VER)\lib |
315 | INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) |
316 | INST_COREDIR = $(INST_ARCHLIB)\CORE |
317 | INST_POD = $(INST_LIB)\pod |
318 | INST_HTML = $(INST_TOP)$(INST_VER)\html |
319 | |
320 | # |
321 | # Programs to compile, build .lib files and link |
322 | # |
323 | |
324 | .USESHELL : |
325 | |
326 | .IF "$(CCTYPE)" == "BORLAND" |
327 | |
328 | CC = bcc32 |
329 | .IF "$(BCCOLD)" != "define" |
330 | LINK32 = ilink32 |
331 | .ELSE |
332 | LINK32 = tlink32 |
333 | .ENDIF |
334 | LIB32 = tlib /P128 |
335 | IMPLIB = implib -c |
336 | RSC = rc |
337 | |
338 | # |
339 | # Options |
340 | # |
341 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)" |
ba14dd9a |
342 | #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch |
1e71036e |
343 | DEFINES = -DWIN32 $(CRYPT_FLAG) |
344 | LOCDEFS = -DPERLDLL -DPERL_CORE |
345 | SUBSYS = console |
346 | CXX_FLAG = -P |
347 | |
348 | LIBC = cw32mti.lib |
349 | LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) |
350 | |
351 | .IF "$(CFG)" == "Debug" |
352 | OPTIMIZE = -v -D_RTLDLL -DDEBUGGING |
353 | LINK_DBG = -v |
354 | .ELSE |
355 | OPTIMIZE = -O2 -D_RTLDLL |
356 | LINK_DBG = |
357 | .ENDIF |
358 | |
359 | CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
360 | $(PCHFLAGS) $(OPTIMIZE) |
361 | LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" |
362 | OBJOUT_FLAG = -o |
363 | EXEOUT_FLAG = -e |
364 | LIBOUT_FLAG = |
365 | .IF "$(BCCOLD)" != "define" |
366 | LINK_FLAGS += -Gn |
367 | DEFINES += -D_MT -D__USELOCALES__ -D_WIN32_WINNT=0x0410 |
368 | .END |
369 | .IF "$(BCCVCL)" == "define" |
370 | LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib |
371 | LINK_FLAGS += -L"$(CCLIBDIR)\Release" |
372 | .END |
373 | |
374 | |
375 | .ELIF "$(CCTYPE)" == "GCC" |
376 | |
377 | CC = gcc |
378 | LINK32 = gcc |
379 | LIB32 = ar rc |
380 | IMPLIB = dlltool |
381 | RSC = rc |
382 | |
383 | i = .i |
384 | o = .o |
385 | a = .a |
386 | |
387 | # |
388 | # Options |
389 | # |
390 | |
391 | INCLUDES = -I.\include -I. -I.. -I$(COREDIR) |
392 | DEFINES = -DWIN32 $(CRYPT_FLAG) |
393 | LOCDEFS = -DPERLDLL -DPERL_CORE |
394 | SUBSYS = console |
395 | CXX_FLAG = -xc++ |
396 | |
397 | LIBC = -lmsvcrt |
398 | |
399 | # same libs as MSVC |
400 | LIBFILES = $(CRYPT_LIB) $(LIBC) \ |
401 | -lmoldname -lkernel32 -luser32 -lgdi32 \ |
402 | -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \ |
403 | -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \ |
404 | -lwinmm -lversion -lodbc32 |
405 | |
406 | .IF "$(CFG)" == "Debug" |
407 | OPTIMIZE = -g -O2 -DDEBUGGING |
408 | LINK_DBG = -g |
409 | .ELSE |
410 | OPTIMIZE = -g -O2 |
411 | LINK_DBG = -g |
412 | .ENDIF |
413 | |
414 | CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) |
415 | LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" |
416 | OBJOUT_FLAG = -o |
417 | EXEOUT_FLAG = -o |
418 | LIBOUT_FLAG = |
419 | |
420 | # NOTE: we assume that GCC uses MSVCRT.DLL |
421 | BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX |
422 | |
423 | .ELSE |
424 | |
425 | CC = cl |
426 | LINK32 = link |
427 | LIB32 = $(LINK32) -lib |
428 | RSC = rc |
429 | |
430 | # |
431 | # Options |
432 | # |
433 | |
434 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. |
435 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX |
436 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG) |
437 | LOCDEFS = -DPERLDLL -DPERL_CORE |
438 | SUBSYS = console |
439 | CXX_FLAG = -TP -GX |
440 | |
441 | .IF "$(USE_PERLCRT)" != "define" |
442 | LIBC = msvcrt.lib |
443 | .ELSE |
444 | LIBC = PerlCRT.lib |
445 | .ENDIF |
446 | |
447 | PERLEXE_RES = |
448 | PERLDLL_RES = |
449 | |
450 | .IF "$(CFG)" == "Debug" |
451 | .IF "$(CCTYPE)" == "MSVC20" |
452 | OPTIMIZE = -Od -MD -Z7 -DDEBUGGING |
453 | LINK_DBG = -debug -pdb:none |
454 | .ELSE |
455 | # -Zi requires .pdb file(s) |
456 | #OPTIMIZE = -Od -MD -Zi -DDEBUGGING |
457 | #LINK_DBG = -debug |
458 | OPTIMIZE = -O1 -MD -Z7 -DDEBUGGING |
459 | LINK_DBG = -debug -debugtype:both -pdb:none |
460 | .ENDIF |
461 | .ELSE |
462 | .IF "$(CFG)" == "Optimize" |
463 | # -O1 yields smaller code, which turns out to be faster than -O2 |
464 | #OPTIMIZE = -O2 -MD -DNDEBUG |
465 | OPTIMIZE = -O1 -MD -DNDEBUG |
466 | .ELSE |
467 | OPTIMIZE = -Od -MD -DNDEBUG |
468 | .ENDIF |
469 | LINK_DBG = -release |
470 | .ENDIF |
471 | |
472 | LIBBASEFILES = $(CRYPT_LIB) \ |
473 | oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ |
474 | comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ |
475 | netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \ |
476 | version.lib odbc32.lib odbccp32.lib |
477 | |
478 | # we add LIBC here, since we may be using PerlCRT.dll |
479 | LIBFILES = $(LIBBASEFILES) $(LIBC) |
480 | |
481 | CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
482 | $(PCHFLAGS) $(OPTIMIZE) |
483 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ |
484 | -libpath:"$(INST_COREDIR)" \ |
485 | -machine:$(PROCESSOR_ARCHITECTURE) |
486 | OBJOUT_FLAG = -Fo |
487 | EXEOUT_FLAG = -Fe |
488 | LIBOUT_FLAG = /out: |
489 | |
490 | .IF "$(USE_PERLCRT)" != "define" |
491 | BUILDOPT += -DPERL_MSVCRT_READFIX |
492 | .ENDIF |
493 | |
494 | .ENDIF |
495 | |
1e71036e |
496 | CFLAGS_O = $(CFLAGS) $(BUILDOPT) |
497 | |
498 | # used to allow local linking flags that are not propogated into Config.pm, |
499 | # currently unused |
500 | # -- BKS, 12-12-1999 |
501 | PRIV_LINK_FLAGS *= |
502 | BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) |
503 | |
504 | #################### do not edit below this line ####################### |
505 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## |
506 | |
507 | o *= .obj |
508 | a *= .lib |
509 | |
510 | LKPRE = INPUT ( |
511 | LKPOST = ) |
512 | |
513 | # |
514 | # Rules |
515 | # |
516 | |
517 | .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res |
518 | |
519 | .c$(o): |
520 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< |
521 | |
522 | .c.i: |
523 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@ |
524 | |
525 | .y.c: |
526 | $(NOOP) |
527 | |
528 | $(o).dll: |
529 | .IF "$(CCTYPE)" == "BORLAND" |
530 | $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def |
531 | $(IMPLIB) $(*B).lib $@ |
532 | .ELIF "$(CCTYPE)" == "GCC" |
533 | $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES) |
534 | $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@ |
535 | .ELSE |
536 | $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ |
537 | -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL) |
538 | .ENDIF |
539 | |
540 | .rc.res: |
541 | $(RSC) -i.. $< |
542 | |
543 | # |
544 | # various targets |
545 | MINIPERL = ..\miniperl.exe |
546 | MINIDIR = .\mini |
547 | PERLEXE = ..\perl.exe |
548 | WPERLEXE = ..\wperl.exe |
549 | GLOBEXE = ..\perlglob.exe |
550 | CONFIGPM = ..\lib\Config.pm |
551 | MINIMOD = ..\lib\ExtUtils\Miniperl.pm |
552 | X2P = ..\x2p\a2p.exe |
553 | |
554 | # Nominate a target which causes extensions to be re-built |
555 | # This used to be $(PERLEXE), but at worst it is the .dll that they depend |
556 | # on and really only the interface - i.e. the .def file used to export symbols |
557 | # from the .dll |
558 | PERLDEP = perldll.def |
559 | |
560 | |
561 | PL2BAT = bin\pl2bat.pl |
562 | GLOBBAT = bin\perlglob.bat |
563 | |
564 | UTILS = \ |
565 | ..\utils\h2ph \ |
566 | ..\utils\splain \ |
567 | ..\utils\dprofpp \ |
568 | ..\utils\perlbug \ |
569 | ..\utils\pl2pm \ |
570 | ..\utils\c2ph \ |
571 | ..\utils\h2xs \ |
572 | ..\utils\perldoc \ |
573 | ..\utils\perlcc \ |
574 | ..\utils\perlivp \ |
575 | ..\utils\libnetcfg \ |
576 | ..\pod\checkpods \ |
577 | ..\pod\pod2html \ |
578 | ..\pod\pod2latex \ |
579 | ..\pod\pod2man \ |
580 | ..\pod\pod2text \ |
581 | ..\pod\pod2usage \ |
582 | ..\pod\podchecker \ |
583 | ..\pod\podselect \ |
584 | ..\x2p\find2perl \ |
585 | ..\x2p\s2p \ |
586 | ..\lib\ExtUtils\xsubpp \ |
587 | bin\exetype.pl \ |
588 | bin\runperl.pl \ |
589 | bin\pl2bat.pl \ |
590 | bin\perlglob.pl \ |
591 | bin\search.pl |
592 | |
593 | .IF "$(CCTYPE)" == "BORLAND" |
594 | |
595 | CFGSH_TMPL = config.bc |
596 | CFGH_TMPL = config_H.bc |
597 | |
598 | .ELIF "$(CCTYPE)" == "GCC" |
599 | |
600 | CFGSH_TMPL = config.gc |
601 | CFGH_TMPL = config_H.gc |
602 | PERLIMPLIB = ..\libperl57$(a) |
603 | |
604 | .ELSE |
605 | |
606 | CFGSH_TMPL = config.vc |
607 | CFGH_TMPL = config_H.vc |
608 | |
609 | .ENDIF |
610 | |
611 | # makedef.pl must be updated if this changes, and this should normally |
612 | # only change when there is an incompatible revision of the public API. |
613 | # XXX so why did we change it from perl56 to perl57? |
614 | PERLIMPLIB *= ..\perl57$(a) |
615 | PERLDLL = ..\perl57.dll |
616 | |
617 | XCOPY = xcopy /f /r /i /d |
618 | RCOPY = xcopy /f /r /i /e /d |
619 | NOOP = @echo |
620 | |
621 | # |
622 | # filenames given to xsubpp must have forward slashes (since it puts |
623 | # full pathnames in #line strings) |
624 | XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \ |
625 | -C++ -prototypes |
626 | |
627 | MICROCORE_SRC = \ |
628 | ..\av.c \ |
629 | ..\deb.c \ |
630 | ..\doio.c \ |
631 | ..\doop.c \ |
632 | ..\dump.c \ |
633 | ..\globals.c \ |
634 | ..\gv.c \ |
635 | ..\hv.c \ |
636 | ..\locale.c \ |
637 | ..\mg.c \ |
638 | ..\numeric.c \ |
639 | ..\op.c \ |
640 | ..\perl.c \ |
641 | ..\perlapi.c \ |
642 | ..\perly.c \ |
643 | ..\pp.c \ |
644 | ..\pp_ctl.c \ |
645 | ..\pp_hot.c \ |
646 | ..\pp_pack.c \ |
84d4ea48 |
647 | ..\pp_sort.c \ |
1e71036e |
648 | ..\pp_sys.c \ |
10bc17b6 |
649 | ..\reentr.c \ |
1e71036e |
650 | ..\regcomp.c \ |
651 | ..\regexec.c \ |
652 | ..\run.c \ |
653 | ..\scope.c \ |
654 | ..\sv.c \ |
655 | ..\taint.c \ |
656 | ..\toke.c \ |
657 | ..\universal.c \ |
658 | ..\utf8.c \ |
659 | ..\util.c \ |
660 | ..\xsutils.c |
661 | |
662 | EXTRACORE_SRC += perllib.c |
663 | |
664 | .IF "$(PERL_MALLOC)" == "define" |
665 | EXTRACORE_SRC += ..\malloc.c |
666 | .ENDIF |
667 | |
1e71036e |
668 | EXTRACORE_SRC += ..\perlio.c |
1e71036e |
669 | |
670 | WIN32_SRC = \ |
671 | .\win32.c \ |
1e71036e |
672 | .\win32sck.c \ |
673 | .\win32thread.c |
674 | |
6ea0e807 |
675 | .IF "$(USE_PERLIO)" == "define" |
676 | WIN32_SRC += .\win32io.c |
677 | .ENDIF |
678 | |
1e71036e |
679 | .IF "$(CRYPT_SRC)" != "" |
680 | WIN32_SRC += .\$(CRYPT_SRC) |
681 | .ENDIF |
682 | |
683 | DLL_SRC = $(DYNALOADER).c |
684 | |
685 | X2P_SRC = \ |
686 | ..\x2p\a2p.c \ |
687 | ..\x2p\hash.c \ |
688 | ..\x2p\str.c \ |
689 | ..\x2p\util.c \ |
690 | ..\x2p\walk.c |
691 | |
692 | CORE_NOCFG_H = \ |
693 | ..\av.h \ |
694 | ..\cop.h \ |
695 | ..\cv.h \ |
696 | ..\dosish.h \ |
697 | ..\embed.h \ |
698 | ..\form.h \ |
699 | ..\gv.h \ |
700 | ..\handy.h \ |
701 | ..\hv.h \ |
702 | ..\iperlsys.h \ |
703 | ..\mg.h \ |
704 | ..\nostdio.h \ |
705 | ..\op.h \ |
706 | ..\opcode.h \ |
707 | ..\perl.h \ |
708 | ..\perlapi.h \ |
709 | ..\perlsdio.h \ |
710 | ..\perlsfio.h \ |
711 | ..\perly.h \ |
712 | ..\pp.h \ |
713 | ..\proto.h \ |
714 | ..\regexp.h \ |
715 | ..\scope.h \ |
716 | ..\sv.h \ |
717 | ..\thread.h \ |
718 | ..\unixish.h \ |
719 | ..\utf8.h \ |
720 | ..\util.h \ |
721 | ..\warnings.h \ |
722 | ..\XSUB.h \ |
723 | ..\EXTERN.h \ |
724 | ..\perlvars.h \ |
725 | ..\intrpvar.h \ |
726 | ..\thrdvar.h \ |
727 | .\include\dirent.h \ |
728 | .\include\netdb.h \ |
729 | .\include\sys\socket.h \ |
730 | .\win32.h |
731 | |
732 | CORE_H = $(CORE_NOCFG_H) .\config.h |
733 | |
734 | MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o)) |
735 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o)) |
736 | WIN32_OBJ = $(WIN32_SRC:db:+$(o)) |
737 | MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)} |
ba14dd9a |
738 | MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)} |
1e71036e |
739 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) |
740 | DLL_OBJ = $(DLL_SRC:db:+$(o)) |
741 | X2P_OBJ = $(X2P_SRC:db:+$(o)) |
742 | |
743 | PERLDLL_OBJ = $(CORE_OBJ) |
744 | PERLEXE_OBJ = perlmain$(o) |
745 | |
746 | PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ) |
747 | |
748 | .IF "$(USE_SETARGV)" != "" |
749 | SETARGV_OBJ = setargv$(o) |
750 | .ENDIF |
751 | |
752 | DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \ |
753 | Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \ |
754 | Sys/Hostname Storable Filter/Util/Call Encode \ |
ac5ea531 |
755 | Digest/MD5 PerlIO/Scalar MIME/Base64 Time/HiRes \ |
756 | Unicode/Normalize |
1e71036e |
757 | STATIC_EXT = DynaLoader |
758 | NONXS_EXT = Errno |
759 | |
760 | DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader |
761 | |
762 | POD2HTML = $(PODDIR)\pod2html |
763 | POD2MAN = $(PODDIR)\pod2man |
764 | POD2LATEX = $(PODDIR)\pod2latex |
765 | POD2TEXT = $(PODDIR)\pod2text |
766 | |
767 | # vars must be separated by "\t+~\t+", since we're using the tempfile |
768 | # version of config_sh.pl (we were overflowing someone's buffer by |
769 | # trying to fit them all on the command line) |
770 | # -- BKS 10-17-1999 |
771 | CFG_VARS = \ |
772 | INST_DRV=$(INST_DRV) ~ \ |
773 | INST_TOP=$(INST_TOP:s/\/\\/) ~ \ |
774 | INST_VER=$(INST_VER:s/\/\\/) ~ \ |
775 | INST_ARCH=$(INST_ARCH) ~ \ |
776 | archname=$(ARCHNAME) ~ \ |
777 | cc=$(CC) ~ \ |
778 | ld=$(LINK32) ~ \ |
779 | ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \ |
780 | cf_email=$(EMAIL) ~ \ |
781 | d_crypt=$(D_CRYPT) ~ \ |
782 | d_mymalloc=$(PERL_MALLOC) ~ \ |
783 | libs=$(LIBFILES:f) ~ \ |
784 | incpath=$(CCINCDIR:s/\/\\/) ~ \ |
785 | libperl=$(PERLIMPLIB:f) ~ \ |
786 | libpth=$(CCLIBDIR:s/\/\\/);$(EXTRALIBDIRS:s/\/\\/) ~ \ |
787 | libc=$(LIBC) ~ \ |
788 | make=dmake ~ \ |
789 | _o=$(o) obj_ext=$(o) ~ \ |
790 | _a=$(a) lib_ext=$(a) ~ \ |
791 | static_ext=$(STATIC_EXT) ~ \ |
792 | use5005threads=$(USE_5005THREADS) ~ \ |
793 | useithreads=$(USE_ITHREADS) ~ \ |
794 | usethreads=$(USE_5005THREADS) ~ \ |
795 | usemultiplicity=$(USE_MULTI) ~ \ |
796 | useperlio=$(USE_PERLIO) ~ \ |
797 | LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \ |
798 | optimize=$(OPTIMIZE) |
799 | |
800 | # |
801 | # set up targets varying between Win95 and WinNT builds |
802 | # |
803 | |
804 | .IF "$(IS_WIN95)" == "define" |
805 | MK2 = .\makefile.95 |
806 | RIGHTMAKE = __switch_makefiles |
807 | NOOP = @rem |
808 | .ELSE |
809 | MK2 = __not_needed |
810 | RIGHTMAKE = |
811 | .ENDIF |
812 | |
813 | # |
814 | # Top targets |
815 | # |
816 | |
817 | all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \ |
818 | $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \ |
ba14dd9a |
819 | $(X2P) Extensions |
1e71036e |
820 | |
821 | $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c |
822 | |
823 | #---------------------------------------------------------------- |
824 | |
825 | #-------------------- BEGIN Win95 SPECIFIC ---------------------- |
826 | |
827 | # this target is a jump-off point for Win95 |
828 | # 1. it switches to the Win95-specific makefile if it exists |
829 | # (__do_switch_makefiles) |
830 | # 2. it prints a message when the Win95-specific one finishes (__done) |
831 | # 3. it then kills this makefile by trying to make __no_such_target |
832 | |
833 | __switch_makefiles: __do_switch_makefiles __done __no_such_target |
834 | |
835 | __do_switch_makefiles: |
836 | .IF "$(NOTFIRST)" != "true" |
837 | if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true |
838 | .ELSE |
839 | $(NOOP) |
840 | .ENDIF |
841 | |
842 | .IF "$(NOTFIRST)" != "true" |
843 | __done: |
844 | @echo Build process complete. Ignore any errors after this message. |
845 | @echo Run "dmake test" to test and "dmake install" to install |
846 | |
847 | .ELSE |
848 | # dummy targets for Win95-specific makefile |
849 | |
850 | __done: |
851 | $(NOOP) |
852 | |
853 | __no_such_target: |
854 | $(NOOP) |
855 | |
856 | .ENDIF |
857 | |
858 | # This target is used to generate the new makefile (.\makefile.95) for Win95 |
859 | |
860 | .\makefile.95: .\makefile.mk |
861 | $(MINIPERL) genmk95.pl makefile.mk $(MK2) |
862 | |
863 | #--------------------- END Win95 SPECIFIC --------------------- |
864 | |
865 | # a blank target for when builds don't need to do certain things |
866 | # this target added for Win95 port but used to keep the WinNT port able to |
867 | # use this file |
868 | __not_needed: |
869 | $(NOOP) |
870 | |
871 | $(GLOBEXE) : perlglob$(o) |
872 | .IF "$(CCTYPE)" == "BORLAND" |
873 | $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c |
874 | $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \ |
875 | "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib, |
876 | .ELIF "$(CCTYPE)" == "GCC" |
877 | $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES) |
878 | .ELSE |
879 | $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ |
880 | perlglob$(o) setargv$(o) |
881 | .ENDIF |
882 | |
883 | perlglob$(o) : perlglob.c |
884 | |
885 | config.w32 : $(CFGSH_TMPL) |
886 | copy $(CFGSH_TMPL) config.w32 |
887 | |
888 | .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H) |
889 | -del /f config.h |
890 | copy $(CFGH_TMPL) config.h |
891 | |
892 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm |
893 | $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \ |
894 | $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh |
895 | |
896 | # this target is for when changes to the main config.sh happen |
897 | # edit config.{b,v,g}c and make this target once for each supported |
898 | # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`) |
899 | regen_config_h: |
900 | perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \ |
901 | $(CFGSH_TMPL) > ..\config.sh |
902 | -cd .. && del /f perl.exe |
1018e26f |
903 | -cd .. && del /f perl*.dll |
1e71036e |
904 | cd .. && perl configpm |
905 | -del /f $(CFGH_TMPL) |
906 | -mkdir $(COREDIR) |
1018e26f |
907 | -perl config_h.PL "INST_VER=$(INST_VER)" |
1e71036e |
908 | rename config.h $(CFGH_TMPL) |
909 | |
910 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl |
911 | cd .. && miniperl configpm |
912 | if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) |
913 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
914 | $(XCOPY) *.h $(COREDIR)\*.* |
915 | $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.* |
916 | $(RCOPY) include $(COREDIR)\*.* |
917 | $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \ |
918 | || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE) |
919 | |
920 | $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) |
921 | .IF "$(CCTYPE)" == "BORLAND" |
922 | $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ |
923 | @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) |
924 | .ELIF "$(CCTYPE)" == "GCC" |
925 | $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \ |
926 | $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
927 | .ELSE |
928 | $(LINK32) -subsystem:console -out:$@ \ |
929 | @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\)) |
930 | .ENDIF |
931 | |
932 | $(MINIDIR) : |
933 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" |
934 | |
935 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) |
936 | $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*B).c |
937 | |
938 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) |
939 | $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c |
940 | |
941 | # -DPERL_IMPLICIT_SYS needs C++ for perllib.c |
942 | # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless |
943 | # unless the .IF is true), so instead we use a .ELSE with the default. |
944 | # This is the only file that depends on perlhost.h, vmem.h, and vdir.h |
945 | |
946 | perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h |
acfe0abc |
947 | .IF "$(USE_IMP_SYS)" == "define" |
1e71036e |
948 | $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c |
949 | .ELSE |
950 | $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c |
951 | .ENDIF |
952 | |
953 | # 1. we don't want to rebuild miniperl.exe when config.h changes |
954 | # 2. we don't want to rebuild miniperl.exe with non-default config.h |
955 | $(MINI_OBJ) : $(CORE_NOCFG_H) |
956 | |
957 | $(WIN32_OBJ) : $(CORE_H) |
958 | $(CORE_OBJ) : $(CORE_H) |
959 | $(DLL_OBJ) : $(CORE_H) |
960 | $(X2P_OBJ) : $(CORE_H) |
961 | |
962 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl |
963 | $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \ |
964 | $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def |
965 | |
966 | $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) |
967 | .IF "$(CCTYPE)" == "BORLAND" |
968 | $(LINK32) -Tpd -ap $(BLINK_FLAGS) \ |
969 | @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \ |
970 | $@,\n \ |
971 | $(LIBFILES)\n \ |
972 | perldll.def\n) |
973 | $(IMPLIB) $*.lib $@ |
974 | .ELIF "$(CCTYPE)" == "GCC" |
975 | $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \ |
976 | $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
977 | dlltool --output-lib $(PERLIMPLIB) \ |
978 | --dllname $(PERLDLL:b).dll \ |
979 | --def perldll.def \ |
980 | --base-file perl.base \ |
981 | --output-exp perl.exp |
982 | $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \ |
983 | $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \ |
984 | perl.exp $(LKPOST)) |
985 | .ELSE |
986 | $(LINK32) -dll -def:perldll.def -out:$@ \ |
987 | @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \ |
988 | $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\)) |
989 | .ENDIF |
990 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) |
991 | |
992 | $(MINIMOD) : $(MINIPERL) ..\minimod.pl |
993 | cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm |
994 | |
995 | ..\x2p\a2p$(o) : ..\x2p\a2p.c |
996 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c |
997 | |
998 | ..\x2p\hash$(o) : ..\x2p\hash.c |
999 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c |
1000 | |
1001 | ..\x2p\str$(o) : ..\x2p\str.c |
1002 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c |
1003 | |
1004 | ..\x2p\util$(o) : ..\x2p\util.c |
1005 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c |
1006 | |
1007 | ..\x2p\walk$(o) : ..\x2p\walk.c |
1008 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c |
1009 | |
1010 | $(X2P) : $(MINIPERL) $(X2P_OBJ) |
1011 | $(MINIPERL) ..\x2p\find2perl.PL |
1012 | $(MINIPERL) ..\x2p\s2p.PL |
1013 | .IF "$(CCTYPE)" == "BORLAND" |
1014 | $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ |
1015 | @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) |
1016 | .ELIF "$(CCTYPE)" == "GCC" |
1017 | $(LINK32) -v -o $@ $(BLINK_FLAGS) \ |
1018 | $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
1019 | .ELSE |
1020 | $(LINK32) -subsystem:console -out:$@ \ |
1021 | @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\)) |
1022 | .ENDIF |
1023 | |
1024 | perlmain.c : runperl.c |
1025 | copy runperl.c perlmain.c |
1026 | |
1027 | perlmain$(o) : perlmain.c |
1028 | $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c |
1029 | |
1030 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) |
1031 | .IF "$(CCTYPE)" == "BORLAND" |
1032 | $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ |
1033 | @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \ |
1034 | $(@:s,\,\\),\n \ |
1035 | $(PERLIMPLIB) $(LIBFILES)\n) |
1036 | .ELIF "$(CCTYPE)" == "GCC" |
1037 | $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ |
1038 | $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES) |
1039 | .ELSE |
1040 | $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \ |
1041 | $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES) |
1042 | .ENDIF |
1043 | copy $(PERLEXE) $(WPERLEXE) |
1044 | $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS |
1045 | copy splittree.pl .. |
1046 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) |
1047 | |
1048 | $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) |
1049 | if not exist $(AUTODIR) mkdir $(AUTODIR) |
1050 | cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL |
1051 | cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL |
1052 | $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) |
1053 | $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL) |
1054 | cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c |
1055 | $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c . |
1056 | |
1057 | $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs |
1058 | copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs |
1059 | |
1060 | #---------------------------------------------------------------------------------- |
ba14dd9a |
1061 | Extensions : buildext.pl $(PERLDEP) $(CONFIGPM) |
1e71036e |
1062 | $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) |
1063 | |
ba14dd9a |
1064 | Extensions_clean : |
1e71036e |
1065 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean |
1066 | |
1067 | #---------------------------------------------------------------------------------- |
1068 | |
1069 | |
1070 | doc: $(PERLEXE) |
1071 | $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \ |
1072 | --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\ |
1073 | --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse |
1074 | |
1075 | utils: $(PERLEXE) $(X2P) |
1076 | cd ..\utils && $(MAKE) PERL=$(MINIPERL) |
1077 | copy ..\README.aix ..\pod\perlaix.pod |
1078 | copy ..\README.amiga ..\pod\perlamiga.pod |
1079 | copy ..\README.apollo ..\pod\perlapollo.pod |
1080 | copy ..\README.beos ..\pod\perlbeos.pod |
1081 | copy ..\README.bs2000 ..\pod\perlbs2000.pod |
1082 | copy ..\README.ce ..\pod\perlce.pod |
1083 | copy ..\README.cygwin ..\pod\perlcygwin.pod |
1084 | copy ..\README.dgux ..\pod\perldgux.pod |
1085 | copy ..\README.dos ..\pod\perldos.pod |
1086 | copy ..\README.epoc ..\pod\perlepoc.pod |
1087 | copy ..\README.hpux ..\pod\perlhpux.pod |
1088 | copy ..\README.hurd ..\pod\perlhurd.pod |
1089 | copy ..\README.machten ..\pod\perlmachten.pod |
1090 | copy ..\README.macos ..\pod\perlmacos.pod |
1091 | copy ..\README.mint ..\pod\perlmint.pod |
1092 | copy ..\README.mpeix ..\pod\perlmpeix.pod |
1093 | copy ..\README.netware ..\pod\perlnetware.pod |
1094 | copy ..\README.os2 ..\pod\perlos2.pod |
1095 | copy ..\README.os390 ..\pod\perlos390.pod |
1096 | copy ..\README.plan9 ..\pod\perlplan9.pod |
1097 | copy ..\README.qnx ..\pod\perlqnx.pod |
1098 | copy ..\README.solaris ..\pod\perlsolaris.pod |
1099 | copy ..\README.tru64 ..\pod\perltru64.pod |
1100 | copy ..\README.uts ..\pod\perluts.pod |
1101 | copy ..\README.vmesa ..\pod\perlvmesa.pod |
1102 | copy ..\vms\perlvms.pod ..\pod\perlvms.pod |
1103 | copy ..\README.vos ..\pod\perlvos.pod |
1104 | copy ..\README.win32 ..\pod\perlwin32.pod |
1105 | cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters |
1106 | cd ..\lib && $(PERLEXE) lib_pm.PL |
1107 | $(PERLEXE) $(PL2BAT) $(UTILS) |
1108 | |
1109 | distclean: clean |
1110 | -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ |
1111 | $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD) |
1112 | -del /f *.def *.map |
1113 | -del /f $(EXTDIR)\DynaLoader\dl_win32.xs |
1114 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm |
1115 | -del /f $(LIBDIR)\XSLoader.pm |
1116 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm |
a9bf183d |
1117 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm |
1e71036e |
1118 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm |
1119 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm |
1120 | -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm |
1121 | -del /f $(LIBDIR)\PerlIO\Scalar.pm |
1122 | -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm |
1123 | -del /f $(LIBDIR)\File\Glob.pm |
1124 | -del /f $(LIBDIR)\Storable.pm |
1125 | -del /f $(LIBDIR)\Filter\Util\Call.pm |
1126 | -del /f $(LIBDIR)\Digest\MD5.pm |
1127 | -del /f $(LIBDIR)\MIME\Base64.pm |
1128 | -del /f $(LIBDIR)\MIME\QuotedPrint.pm |
1129 | -del /f $(LIBDIR)\Time\HiRes.pm |
1130 | -del /f $(LIBDIR)\List\Util.pm |
1131 | -del /f $(LIBDIR)\Scalar\Util.pm |
ac5ea531 |
1132 | -del /f $(LIBDIR)\Unicode\Normalize.pm |
1e71036e |
1133 | -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO |
1134 | -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread |
1135 | -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B |
1136 | -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data |
1137 | -if exist $(LIBDIR)\Filter\Util\Call rmdir /s /q $(LIBDIR)\Filter\Util\Call || rmdir /s $(LIBDIR)\Filter |
1138 | -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util || rmdir /s $(LIBDIR)\Filter |
1139 | -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest || rmdir /s $(LIBDIR)\Digest |
1140 | -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME || rmdir /s $(LIBDIR)\MIME |
1141 | -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List || rmdir /s $(LIBDIR)\List |
1142 | -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar || rmdir /s $(LIBDIR)\Scalar |
1143 | -cd $(PODDIR) && del /f *.html *.bat checkpods \ |
1144 | perlaix.pod perlamiga.pod perlapollo.pod \ |
1145 | perlbeos.pod perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \ |
1146 | perldos.pod perlepoc.pod perlhpux.pod perlhurd.pod \ |
1147 | perlmachten.pod perlmint.pod \ |
1148 | perlmacos.pod perlmpeix.pod perlnetware.pod \ |
1149 | perlos2.pod perlos390.pod \ |
1150 | perlplan9.pod perlqnx.pod \ |
1151 | perlsolaris.pod perltru64.pod perluts.pod \ |
1152 | perlvmesa.pod perlvms.pod perlvos.pod \ |
1153 | perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \ |
1154 | podchecker podselect |
1155 | -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \ |
1156 | perlivp dprofpp *.bat |
1157 | -cd ..\x2p && del /f find2perl s2p *.bat |
1158 | -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new |
1159 | -del /f $(CONFIGPM) |
1160 | -del /f bin\*.bat |
1161 | -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \ |
1162 | pm_to_blib |
1163 | -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR) |
1164 | -if exist $(COREDIR) rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR) |
1165 | |
1166 | install : all installbare installhtml |
1167 | |
1168 | installbare : $(RIGHTMAKE) utils |
1169 | $(PERLEXE) ..\installperl |
1170 | if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* |
1171 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
1172 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* |
1173 | |
1174 | installhtml : doc |
1175 | $(RCOPY) html\*.* $(INST_HTML)\*.* |
1176 | |
1177 | inst_lib : $(CONFIGPM) |
1178 | copy splittree.pl .. |
1179 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) |
1180 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
1181 | |
1182 | minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils |
1183 | $(XCOPY) $(MINIPERL) ..\t\perl.exe |
1184 | .IF "$(CCTYPE)" == "BORLAND" |
1185 | $(XCOPY) $(GLOBBAT) ..\t\$(NULL) |
1186 | .ELSE |
1187 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
1188 | .ENDIF |
1189 | attrib -r ..\t\*.* |
1190 | copy test ..\t |
1191 | cd ..\t && \ |
1192 | $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t |
1193 | |
1194 | test-prep : all utils |
1195 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
1196 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) |
1197 | .IF "$(CCTYPE)" == "BORLAND" |
1198 | $(XCOPY) $(GLOBBAT) ..\t\$(NULL) |
1199 | .ELSE |
1200 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
1201 | .ENDIF |
1202 | |
1203 | test : $(RIGHTMAKE) test-prep |
1204 | cd ..\t && $(PERLEXE) -I..\lib harness |
1205 | |
1206 | test-notty : test-prep |
1207 | set PERL_SKIP_TTY_TEST=1 && \ |
1208 | cd ..\t && $(PERLEXE) -I.\lib harness |
1209 | |
1210 | test-wide : test-prep |
1211 | set HARNESS_PERL_SWITCHES=-C && \ |
1212 | cd ..\t && $(PERLEXE) -I..\lib harness |
1213 | |
1214 | test-wide-notty : test-prep |
1215 | set PERL_SKIP_TTY_TEST=1 && \ |
1216 | set HARNESS_PERL_SWITCHES=-C && \ |
1217 | cd ..\t && $(PERLEXE) -I..\lib harness |
1218 | |
1219 | clean : Extensions_clean |
1220 | -@erase miniperlmain$(o) |
1221 | -@erase $(MINIPERL) |
1222 | -@erase perlglob$(o) |
1223 | -@erase perlmain$(o) |
1224 | -@erase config.w32 |
1225 | -@erase /f config.h |
1226 | -@erase $(GLOBEXE) |
1227 | -@erase $(PERLEXE) |
1228 | -@erase $(WPERLEXE) |
1229 | -@erase $(PERLDLL) |
1230 | -@erase $(CORE_OBJ) |
1231 | -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR) |
1232 | -@erase $(WIN32_OBJ) |
1233 | -@erase $(DLL_OBJ) |
1234 | -@erase $(X2P_OBJ) |
1235 | -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res |
1236 | -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat |
1237 | -@erase ..\x2p\*.exe ..\x2p\*.bat |
1238 | -@erase *.ilk |
1239 | -@erase *.pdb |
1240 | |
1241 | # Handy way to run perlbug -ok without having to install and run the |
1242 | # installed perlbug. We don't re-run the tests here - we trust the user. |
1243 | # Please *don't* use this unless all tests pass. |
1244 | # If you want to report test failures, use "dmake nok" instead. |
1245 | ok: utils |
1246 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" |
1247 | |
1248 | okfile: utils |
1249 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok |
1250 | |
1251 | nok: utils |
1252 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" |
1253 | |
1254 | nokfile: utils |
1255 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok |