Commit | Line | Data |
---|---|---|
caec3c99 NC |
1 | # |
2 | # Makefile to build perl on Windows NT using Microsoft NMAKE. | |
3 | # Supported compilers: | |
4 | # Visual C++ 2.0 through 6.0 (and possibly newer versions) | |
5 | # MS Platform SDK 64-bit compiler and tools **experimental** | |
6 | # | |
7 | # This is set up to build a perl.exe that runs off a shared library | |
8 | # (perl58.dll). Also makes individual DLLs for the XS extensions. | |
9 | # | |
10 | ||
11 | ## | |
12 | ## Make sure you read README.win32 *before* you mess with anything here! | |
13 | ## | |
14 | ||
15 | ## | |
16 | ## Build configuration. Edit the values below to suit your needs. | |
17 | ## | |
18 | ||
19 | # | |
20 | # Set these to wherever you want "nmake install" to put your | |
21 | # newly built perl. | |
22 | # | |
23 | INST_DRV = c: | |
24 | INST_TOP = $(INST_DRV)\perl | |
25 | ||
26 | # | |
27 | # Comment this out if you DON'T want your perl installation to be versioned. | |
28 | # This means that the new installation will overwrite any files from the | |
29 | # old installation at the same INST_TOP location. Leaving it enabled is | |
30 | # the safest route, as perl adds the extra version directory to all the | |
31 | # locations it installs files to. If you disable it, an alternative | |
32 | # versioned installation can be obtained by setting INST_TOP above to a | |
33 | # path that includes an arbitrary version string. | |
34 | # | |
bb538db2 | 35 | #INST_VER = \5.8.5 |
caec3c99 NC |
36 | |
37 | # | |
38 | # Comment this out if you DON'T want your perl installation to have | |
39 | # architecture specific components. This means that architecture- | |
40 | # specific files will be installed along with the architecture-neutral | |
41 | # files. Leaving it enabled is safer and more flexible, in case you | |
42 | # want to build multiple flavors of perl and install them together in | |
43 | # the same location. Commenting it out gives you a simpler | |
44 | # installation that is easier to understand for beginners. | |
45 | # | |
46 | #INST_ARCH = \$(ARCHNAME) | |
47 | ||
48 | # | |
49 | # uncomment to enable multiple interpreters. This is need for fork() | |
50 | # emulation and for thread support. | |
51 | # | |
52 | USE_MULTI = define | |
53 | ||
54 | # | |
55 | # Beginnings of interpreter cloning/threads; now reasonably complete. | |
56 | # This should be enabled to get the fork() emulation. This needs | |
57 | # USE_MULTI as well. | |
58 | # | |
59 | USE_ITHREADS = define | |
60 | ||
61 | # | |
62 | # uncomment to enable the implicit "host" layer for all system calls | |
63 | # made by perl. This needs USE_MULTI above. This is also needed to | |
64 | # get fork(). | |
65 | # | |
66 | USE_IMP_SYS = define | |
67 | ||
68 | # | |
69 | # Comment out next assign to disable perl's I/O subsystem and use compiler's | |
70 | # stdio for IO - depending on your compiler vendor and run time library you may | |
71 | # then get a number of fails from make test i.e. bugs - complain to them not us ;-). | |
72 | # You will also be unable to take full advantage of perl5.8's support for multiple | |
73 | # encodings and may see lower IO performance. You have been warned. | |
74 | USE_PERLIO = define | |
75 | ||
76 | # | |
77 | # Comment this out if you don't want to enable large file support for | |
78 | # some reason. Should normally only be changed to maintain compatibility | |
79 | # with an older release of perl. | |
80 | USE_LARGE_FILES = define | |
81 | ||
82 | # | |
83 | # WARNING! This option is deprecated and will eventually go away (enable | |
84 | # USE_ITHREADS instead). | |
85 | # | |
86 | # uncomment to enable threads-capabilities. This is incompatible with | |
87 | # USE_ITHREADS, and is only here for people who may have come to rely | |
88 | # on the experimental Thread support that was in 5.005. | |
89 | # | |
90 | #USE_5005THREADS = define | |
91 | ||
92 | # | |
93 | # uncomment one of the following lines if you are using either | |
94 | # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98) | |
95 | # | |
96 | #CCTYPE = MSVC20 | |
97 | CCTYPE = MSVC60 | |
98 | ||
99 | # | |
100 | # uncomment next line if you want debug version of perl (big,slow) | |
101 | # If not enabled, we automatically try to use maximum optimization | |
102 | # with all compilers that are known to have a working optimizer. | |
103 | # | |
104 | #CFG = Debug | |
105 | ||
106 | # | |
107 | # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler. | |
108 | # It has patches that fix known bugs in older versions of MSVCRT.DLL. | |
109 | # This currently requires VC 5.0 with Service Pack 3 or later. | |
110 | # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/ | |
111 | # and follow the directions in the package to install. | |
112 | # | |
113 | # Not recommended if you have VC 6.x and you're not running Windows 9x. | |
114 | # | |
115 | #USE_PERLCRT = define | |
116 | ||
117 | # | |
118 | # uncomment to enable linking with setargv.obj under the Visual C | |
119 | # compiler. Setting this options enables perl to expand wildcards in | |
120 | # arguments, but it may be harder to use alternate methods like | |
121 | # File::DosGlob that are more powerful. This option is supported only with | |
122 | # Visual C. | |
123 | # | |
124 | #USE_SETARGV = define | |
125 | ||
126 | # | |
127 | # if you want to have the crypt() builtin function implemented, leave this or | |
128 | # CRYPT_LIB uncommented. The fcrypt.c file named here contains a suitable | |
129 | # version of des_fcrypt(). | |
130 | # | |
131 | CRYPT_SRC = fcrypt.c | |
132 | ||
133 | # | |
134 | # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a | |
135 | # library, uncomment this, and make sure the library exists (see README.win32) | |
136 | # Specify the full pathname of the library. | |
137 | # | |
138 | #CRYPT_LIB = fcrypt.lib | |
139 | ||
140 | # | |
141 | # set this if you wish to use perl's malloc | |
142 | # WARNING: Turning this on/off WILL break binary compatibility with extensions | |
143 | # you may have compiled with/without it. Be prepared to recompile all | |
144 | # extensions if you change the default. Currently, this cannot be enabled | |
145 | # if you ask for USE_IMP_SYS above. | |
146 | # | |
147 | #PERL_MALLOC = define | |
148 | ||
149 | # | |
150 | # set this to enable debugging mstats | |
151 | # This must be enabled to use the Devel::Peek::mstat() function. This cannot | |
152 | # be enabled without PERL_MALLOC as well. | |
153 | # | |
154 | #DEBUG_MSTATS = define | |
155 | ||
156 | # | |
157 | # | |
158 | # set the install locations of the compiler include/libraries | |
159 | # Running VCVARS32.BAT is *required* when using Visual C. | |
160 | # Some versions of Visual C don't define MSVCDIR in the environment, | |
161 | # so you may have to set CCHOME explicitly (spaces in the path name should | |
162 | # not be quoted) | |
163 | # | |
164 | #CCHOME = f:\msvc20 | |
165 | CCHOME = $(MSVCDIR) | |
166 | CCINCDIR = $(CCHOME)\include | |
167 | CCLIBDIR = $(CCHOME)\lib | |
168 | ||
169 | # | |
170 | # Additional compiler flags can be specified here. | |
171 | # | |
172 | ||
173 | # | |
174 | # This should normally be disabled. Adding -DPERL_POLLUTE enables support | |
175 | # for old symbols by default, at the expense of extreme pollution. You most | |
176 | # probably just want to build modules that won't compile with | |
177 | # perl Makefile.PL POLLUTE=1 | |
178 | # instead of enabling this. Please report such modules to the respective | |
179 | # authors. | |
180 | # | |
181 | #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE | |
182 | ||
183 | # | |
184 | # This should normally be disabled. Enabling it will disable the File::Glob | |
185 | # implementation of CORE::glob. | |
186 | # | |
187 | #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB | |
188 | ||
189 | # | |
190 | # This should normally be disabled. Enabling it causes perl to read scripts | |
191 | # in text mode (which is the 5.005 behavior) and will break ByteLoader. | |
192 | #BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS | |
193 | ||
194 | # | |
195 | # specify semicolon-separated list of extra directories that modules will | |
196 | # look for libraries (spaces in path names need not be quoted) | |
197 | # | |
198 | EXTRALIBDIRS = | |
199 | ||
200 | # | |
201 | # set this to your email address (perl will guess a value from | |
202 | # from your loginname and your hostname, which may not be right) | |
203 | # | |
204 | #EMAIL = | |
205 | ||
206 | ## | |
207 | ## Build configuration ends. | |
208 | ## | |
209 | ||
210 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### | |
211 | ||
212 | !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" | |
213 | D_CRYPT = undef | |
214 | !ELSE | |
215 | D_CRYPT = define | |
216 | CRYPT_FLAG = -DHAVE_DES_FCRYPT | |
217 | !ENDIF | |
218 | ||
219 | !IF "$(PERL_MALLOC)" == "" | |
220 | PERL_MALLOC = undef | |
221 | DEBUG_MSTATS = undef | |
222 | !ENDIF | |
223 | ||
224 | !IF "$(DEBUG_MSTATS)" == "" | |
225 | DEBUG_MSTATS = undef | |
226 | !ENDIF | |
227 | ||
228 | !IF "$(DEBUG_MSTATS)" == "define" | |
229 | BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS | |
230 | !ENDIF | |
231 | ||
232 | !IF "$(USE_5005THREADS)" == "" | |
233 | USE_5005THREADS = undef | |
234 | !ENDIF | |
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 | !IF "$(USE_MULTI)" == "" | |
245 | USE_MULTI = undef | |
246 | !ENDIF | |
247 | ||
248 | !IF "$(USE_ITHREADS)" == "" | |
249 | USE_ITHREADS = undef | |
250 | !ENDIF | |
251 | ||
252 | !IF "$(USE_IMP_SYS)" == "" | |
253 | USE_IMP_SYS = undef | |
254 | !ENDIF | |
255 | ||
256 | !IF "$(USE_PERLIO)" == "" | |
257 | USE_PERLIO = undef | |
258 | !ENDIF | |
259 | ||
260 | !IF "$(USE_LARGE_FILES)" == "" | |
261 | USE_LARGE_FILES = undef | |
262 | !ENDIF | |
263 | ||
264 | !IF "$(USE_PERLCRT)" == "" | |
265 | USE_PERLCRT = undef | |
266 | !ENDIF | |
267 | ||
268 | !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef" | |
269 | USE_MULTI = define | |
270 | !ENDIF | |
271 | ||
272 | !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" | |
273 | USE_MULTI = define | |
274 | USE_5005THREADS = undef | |
275 | !ENDIF | |
276 | ||
277 | !IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef" | |
278 | BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT | |
279 | !ENDIF | |
280 | ||
281 | !IF "$(USE_IMP_SYS)" != "undef" | |
282 | BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS | |
283 | !ENDIF | |
284 | ||
285 | !IF "$(PROCESSOR_ARCHITECTURE)" == "" | |
286 | PROCESSOR_ARCHITECTURE = x86 | |
287 | !ENDIF | |
288 | ||
289 | !IF "$(WIN64)" == "" | |
290 | !IF "$(PROCESSOR_ARCHITEW6432)" != "" | |
291 | PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432) | |
292 | WIN64 = define | |
293 | !ELSE | |
294 | !IF "$(PROCESSOR_ARCHITECTURE)" == "IA64" | |
295 | WIN64 = define | |
296 | !ELSE | |
297 | WIN64 = undef | |
298 | !ENDIF | |
299 | !ENDIF | |
300 | !ENDIF | |
301 | ||
302 | !IF "$(USE_5005THREADS)" == "define" | |
303 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread | |
304 | !ELSE | |
305 | !IF "$(USE_MULTI)" == "define" | |
306 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi | |
307 | !ELSE | |
308 | !IF "$(USE_PERLIO)" == "define" | |
309 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio | |
310 | !ELSE | |
311 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) | |
312 | !ENDIF | |
313 | !ENDIF | |
314 | !ENDIF | |
315 | ||
316 | !IF "$(USE_PERLIO)" == "define" | |
317 | BUILDOPT = $(BUILDOPT) -DUSE_PERLIO | |
318 | !ENDIF | |
319 | ||
320 | !IF "$(USE_ITHREADS)" == "define" | |
321 | ARCHNAME = $(ARCHNAME)-thread | |
322 | !ENDIF | |
323 | ||
324 | # Visual Studio 98 specific | |
325 | !IF "$(CCTYPE)" == "MSVC60" | |
326 | ||
327 | # VC 6.0 can load the socket dll on demand. Makes the test suite | |
328 | # run in about 10% less time. | |
0801b2ec | 329 | DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib |
caec3c99 NC |
330 | !ENDIF |
331 | ||
332 | ARCHDIR = ..\lib\$(ARCHNAME) | |
333 | COREDIR = ..\lib\CORE | |
334 | AUTODIR = ..\lib\auto | |
335 | LIBDIR = ..\lib | |
336 | EXTDIR = ..\ext | |
337 | PODDIR = ..\pod | |
338 | EXTUTILSDIR = $(LIBDIR)\ExtUtils | |
339 | ||
340 | # | |
341 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin | |
342 | INST_BIN = $(INST_SCRIPT)$(INST_ARCH) | |
343 | INST_LIB = $(INST_TOP)$(INST_VER)\lib | |
344 | INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) | |
345 | INST_COREDIR = $(INST_ARCHLIB)\CORE | |
346 | INST_POD = $(INST_LIB)\pod | |
347 | INST_HTML = $(INST_TOP)$(INST_VER)\html | |
348 | ||
349 | # | |
350 | # Programs to compile, build .lib files and link | |
351 | # | |
352 | ||
353 | CC = cl | |
354 | LINK32 = link | |
355 | LIB32 = $(LINK32) -lib | |
356 | RSC = rc | |
357 | ||
358 | # | |
359 | # Options | |
360 | # | |
361 | ||
362 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. | |
363 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX | |
364 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG) | |
365 | LOCDEFS = -DPERLDLL -DPERL_CORE | |
366 | SUBSYS = console | |
367 | CXX_FLAG = -TP -GX | |
368 | ||
369 | !IF "$(USE_PERLCRT)" != "define" | |
370 | LIBC = msvcrt.lib | |
371 | !ELSE | |
372 | LIBC = PerlCRT.lib | |
373 | !ENDIF | |
374 | ||
caec3c99 NC |
375 | !IF "$(CFG)" == "Debug" |
376 | ! IF "$(CCTYPE)" == "MSVC20" | |
377 | OPTIMIZE = -Od -MD -Z7 -DDEBUGGING | |
378 | ! ELSE | |
379 | OPTIMIZE = -Od -MD -Zi -DDEBUGGING | |
380 | ! ENDIF | |
381 | LINK_DBG = -debug | |
382 | !ELSE | |
5f36bea8 SH |
383 | OPTIMIZE = -MD -Zi -DNDEBUG |
384 | # we enable debug symbols in release builds also | |
385 | LINK_DBG = -debug -opt:ref,icf | |
386 | # you may want to enable this if you want COFF symbols in the executables | |
387 | # in addition to the PDB symbols. The default Dr. Watson that ships with | |
388 | # Windows can use the the former but not latter. The free WinDbg can be | |
389 | # installed to get better stack traces from just the PDB symbols, so we | |
390 | # avoid the bloat of COFF symbols by default. | |
391 | #LINK_DBG = $(LINK_DBG) -debugtype:both | |
caec3c99 NC |
392 | ! IF "$(WIN64)" == "define" |
393 | # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG) | |
394 | OPTIMIZE = $(OPTIMIZE) -Ox -GL | |
395 | LINK_DBG = $(LINK_DBG) -ltcg | |
396 | ! ELSE | |
397 | # -O1 yields smaller code, which turns out to be faster than -O2 on x86 | |
398 | OPTIMIZE = $(OPTIMIZE) -O1 | |
399 | #OPTIMIZE = $(OPTIMIZE) -O2 | |
400 | ! ENDIF | |
401 | !ENDIF | |
402 | ||
403 | !IF "$(WIN64)" == "define" | |
404 | DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE | |
405 | OPTIMIZE = $(OPTIMIZE) -Wp64 -Op | |
406 | !ENDIF | |
407 | ||
408 | !IF "$(USE_PERLCRT)" != "define" | |
409 | BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX | |
410 | !ENDIF | |
411 | ||
412 | LIBBASEFILES = $(CRYPT_LIB) \ | |
413 | oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ | |
414 | comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ | |
0801b2ec | 415 | netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \ |
caec3c99 NC |
416 | version.lib |
417 | ||
418 | # win64 doesn't have some libs | |
419 | !IF "$(WIN64)" != "define" | |
420 | LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib | |
421 | !ENDIF | |
422 | ||
423 | # we add LIBC here, since we may be using PerlCRT.dll | |
424 | LIBFILES = $(LIBBASEFILES) $(LIBC) | |
425 | ||
426 | CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \ | |
427 | $(PCHFLAGS) $(OPTIMIZE) | |
428 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ | |
429 | -libpath:"$(INST_COREDIR)" \ | |
430 | -machine:$(PROCESSOR_ARCHITECTURE) | |
431 | OBJOUT_FLAG = -Fo | |
432 | EXEOUT_FLAG = -Fe | |
433 | ||
434 | CFLAGS_O = $(CFLAGS) $(BUILDOPT) | |
435 | ||
436 | #################### do not edit below this line ####################### | |
437 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## | |
438 | ||
439 | o = .obj | |
440 | ||
441 | # | |
442 | # Rules | |
443 | # | |
444 | ||
445 | .SUFFIXES : .c $(o) .dll .lib .exe .rc .res | |
446 | ||
447 | .c$(o): | |
448 | $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< | |
449 | ||
450 | .y.c: | |
451 | $(NOOP) | |
452 | ||
453 | $(o).dll: | |
454 | $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ | |
455 | -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL) | |
456 | ||
457 | .rc.res: | |
458 | $(RSC) -i.. $< | |
459 | ||
460 | # | |
461 | # various targets | |
462 | ||
463 | # makedef.pl must be updated if this changes, and this should normally | |
464 | # only change when there is an incompatible revision of the public API. | |
465 | PERLIMPLIB = ..\perl58.lib | |
466 | PERLDLL = ..\perl58.dll | |
467 | ||
468 | MINIPERL = ..\miniperl.exe | |
469 | MINIDIR = .\mini | |
470 | PERLEXE = ..\perl.exe | |
471 | WPERLEXE = ..\wperl.exe | |
472 | GLOBEXE = ..\perlglob.exe | |
473 | CONFIGPM = ..\lib\Config.pm | |
474 | MINIMOD = ..\lib\ExtUtils\Miniperl.pm | |
475 | X2P = ..\x2p\a2p.exe | |
476 | ||
23b555d7 NC |
477 | # Unicode data files generated by mktables |
478 | UNIDATAFILES = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \ | |
479 | ..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \ | |
480 | ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \ | |
481 | ..\lib\unicore\PVA.pl | |
482 | ||
483 | # Directories of Unicode data files generated by mktables | |
484 | UNIDATADIR1 = ..\lib\unicore\To | |
485 | UNIDATADIR2 = ..\lib\unicore\lib | |
486 | ||
5cde6b89 NC |
487 | PERLEXE_ICO = .\perlexe.ico |
488 | PERLEXE_RES = .\perlexe.res | |
489 | PERLDLL_RES = | |
490 | ||
caec3c99 NC |
491 | # Nominate a target which causes extensions to be re-built |
492 | # This used to be $(PERLEXE), but at worst it is the .dll that they depend | |
493 | # on and really only the interface - i.e. the .def file used to export symbols | |
494 | # from the .dll | |
495 | PERLDEP = perldll.def | |
496 | ||
497 | PL2BAT = bin\pl2bat.pl | |
498 | GLOBBAT = bin\perlglob.bat | |
499 | ||
500 | UTILS = \ | |
501 | ..\utils\h2ph \ | |
502 | ..\utils\splain \ | |
503 | ..\utils\dprofpp \ | |
504 | ..\utils\perlbug \ | |
505 | ..\utils\pl2pm \ | |
506 | ..\utils\c2ph \ | |
507 | ..\utils\pstruct \ | |
508 | ..\utils\h2xs \ | |
509 | ..\utils\perldoc \ | |
510 | ..\utils\perlcc \ | |
511 | ..\utils\perlivp \ | |
512 | ..\utils\libnetcfg \ | |
513 | ..\utils\enc2xs \ | |
514 | ..\utils\piconv \ | |
515 | ..\utils\cpan \ | |
385df56d | 516 | ..\utils\xsubpp \ |
7cbe25b2 | 517 | ..\utils\prove \ |
385df56d | 518 | ..\utils\instmodsh \ |
caec3c99 NC |
519 | ..\pod\checkpods \ |
520 | ..\pod\pod2html \ | |
521 | ..\pod\pod2latex \ | |
522 | ..\pod\pod2man \ | |
523 | ..\pod\pod2text \ | |
524 | ..\pod\pod2usage \ | |
525 | ..\pod\podchecker \ | |
526 | ..\pod\podselect \ | |
527 | ..\x2p\find2perl \ | |
528 | ..\x2p\psed \ | |
529 | ..\x2p\s2p \ | |
caec3c99 NC |
530 | bin\exetype.pl \ |
531 | bin\runperl.pl \ | |
532 | bin\pl2bat.pl \ | |
533 | bin\perlglob.pl \ | |
534 | bin\search.pl | |
535 | ||
536 | MAKE = nmake -nologo | |
537 | MAKE_BARE = nmake | |
538 | ||
539 | !IF "$(WIN64)" == "define" | |
540 | CFGSH_TMPL = config.vc64 | |
541 | CFGH_TMPL = config_H.vc64 | |
542 | !ELSE | |
543 | CFGSH_TMPL = config.vc | |
544 | CFGH_TMPL = config_H.vc | |
545 | !ENDIF | |
546 | ||
547 | XCOPY = xcopy /f /r /i /d | |
548 | RCOPY = xcopy /f /r /i /e /d | |
549 | NOOP = @echo | |
550 | NULL = | |
551 | ||
552 | DEL = del | |
553 | ||
554 | # | |
555 | # filenames given to xsubpp must have forward slashes (since it puts | |
556 | # full pathnames in #line strings) | |
557 | XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \ | |
558 | -C++ -prototypes | |
559 | ||
560 | MICROCORE_SRC = \ | |
561 | ..\av.c \ | |
562 | ..\deb.c \ | |
563 | ..\doio.c \ | |
564 | ..\doop.c \ | |
565 | ..\dump.c \ | |
566 | ..\globals.c \ | |
567 | ..\gv.c \ | |
568 | ..\hv.c \ | |
569 | ..\locale.c \ | |
570 | ..\mg.c \ | |
571 | ..\numeric.c \ | |
572 | ..\op.c \ | |
573 | ..\pad.c \ | |
574 | ..\perl.c \ | |
575 | ..\perlapi.c \ | |
576 | ..\perly.c \ | |
577 | ..\pp.c \ | |
578 | ..\pp_ctl.c \ | |
579 | ..\pp_hot.c \ | |
580 | ..\pp_pack.c \ | |
581 | ..\pp_sort.c \ | |
582 | ..\pp_sys.c \ | |
583 | ..\reentr.c \ | |
584 | ..\regcomp.c \ | |
585 | ..\regexec.c \ | |
586 | ..\run.c \ | |
587 | ..\scope.c \ | |
588 | ..\sv.c \ | |
589 | ..\taint.c \ | |
590 | ..\toke.c \ | |
591 | ..\universal.c \ | |
592 | ..\utf8.c \ | |
593 | ..\util.c \ | |
594 | ..\xsutils.c | |
595 | ||
596 | EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c | |
597 | ||
598 | !IF "$(PERL_MALLOC)" == "define" | |
599 | EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c | |
600 | !ENDIF | |
601 | ||
602 | EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c | |
603 | ||
604 | WIN32_SRC = \ | |
605 | .\win32.c \ | |
606 | .\win32sck.c \ | |
607 | .\win32thread.c | |
608 | ||
609 | # We need this for miniperl build unless we override canned | |
610 | # config.h #define building mini\* | |
611 | #!IF "$(USE_PERLIO)" == "define" | |
612 | WIN32_SRC = $(WIN32_SRC) .\win32io.c | |
613 | #!ENDIF | |
614 | ||
615 | !IF "$(CRYPT_SRC)" != "" | |
616 | WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC) | |
617 | !ENDIF | |
618 | ||
619 | DLL_SRC = $(DYNALOADER).c | |
620 | ||
621 | X2P_SRC = \ | |
622 | ..\x2p\a2p.c \ | |
623 | ..\x2p\hash.c \ | |
624 | ..\x2p\str.c \ | |
625 | ..\x2p\util.c \ | |
626 | ..\x2p\walk.c | |
627 | ||
628 | CORE_NOCFG_H = \ | |
629 | ..\av.h \ | |
630 | ..\cop.h \ | |
631 | ..\cv.h \ | |
632 | ..\dosish.h \ | |
633 | ..\embed.h \ | |
634 | ..\form.h \ | |
635 | ..\gv.h \ | |
636 | ..\handy.h \ | |
637 | ..\hv.h \ | |
638 | ..\iperlsys.h \ | |
639 | ..\mg.h \ | |
640 | ..\nostdio.h \ | |
641 | ..\op.h \ | |
642 | ..\opcode.h \ | |
643 | ..\perl.h \ | |
644 | ..\perlapi.h \ | |
645 | ..\perlsdio.h \ | |
646 | ..\perlsfio.h \ | |
647 | ..\perly.h \ | |
648 | ..\pp.h \ | |
649 | ..\proto.h \ | |
650 | ..\regexp.h \ | |
651 | ..\scope.h \ | |
652 | ..\sv.h \ | |
653 | ..\thread.h \ | |
654 | ..\unixish.h \ | |
655 | ..\utf8.h \ | |
656 | ..\util.h \ | |
657 | ..\warnings.h \ | |
658 | ..\XSUB.h \ | |
659 | ..\EXTERN.h \ | |
660 | ..\perlvars.h \ | |
661 | ..\intrpvar.h \ | |
662 | ..\thrdvar.h \ | |
663 | .\include\dirent.h \ | |
664 | .\include\netdb.h \ | |
665 | .\include\sys\socket.h \ | |
666 | .\win32.h | |
667 | ||
668 | CORE_H = $(CORE_NOCFG_H) .\config.h | |
669 | ||
670 | MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj) | |
671 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj) | |
672 | WIN32_OBJ = $(WIN32_SRC:.c=.obj) | |
673 | MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \ | |
674 | $(MINIDIR)\miniperlmain$(o) \ | |
675 | $(MINIDIR)\perlio$(o) | |
676 | MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\) | |
677 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) | |
678 | DLL_OBJ = $(DLL_SRC:.c=.obj) | |
679 | X2P_OBJ = $(X2P_SRC:.c=.obj) | |
680 | ||
681 | PERLDLL_OBJ = $(CORE_OBJ) | |
682 | PERLEXE_OBJ = perlmain$(o) | |
683 | ||
684 | PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ) | |
685 | #PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) | |
686 | ||
687 | !IF "$(USE_SETARGV)" != "" | |
688 | SETARGV_OBJ = setargv$(o) | |
689 | !ENDIF | |
690 | ||
691 | DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader | |
692 | SOCKET = $(EXTDIR)\Socket\Socket | |
693 | FCNTL = $(EXTDIR)\Fcntl\Fcntl | |
694 | OPCODE = $(EXTDIR)\Opcode\Opcode | |
695 | SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File | |
696 | IO = $(EXTDIR)\IO\IO | |
697 | POSIX = $(EXTDIR)\POSIX\POSIX | |
698 | ATTRS = $(EXTDIR)\attrs\attrs | |
699 | THREAD = $(EXTDIR)\Thread\Thread | |
700 | B = $(EXTDIR)\B\B | |
701 | RE = $(EXTDIR)\re\re | |
702 | DUMPER = $(EXTDIR)\Data\Dumper\Dumper | |
703 | ERRNO = $(EXTDIR)\Errno\Errno | |
704 | PEEK = $(EXTDIR)\Devel\Peek\Peek | |
705 | BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader | |
706 | DPROF = $(EXTDIR)\Devel\DProf\DProf | |
707 | GLOB = $(EXTDIR)\File\Glob\Glob | |
708 | HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname | |
709 | STORABLE = $(EXTDIR)\Storable\Storable | |
710 | FILTER = $(EXTDIR)\Filter\Util\Call\Call | |
711 | ENCODE = $(EXTDIR)\Encode\Encode | |
712 | MD5 = $(EXTDIR)\Digest\MD5\MD5 | |
713 | PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar | |
714 | MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64 | |
715 | TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes | |
716 | CWD = $(EXTDIR)\Cwd\Cwd | |
717 | LISTUTIL = $(EXTDIR)\List\Util\Util | |
718 | PERLIOVIA = $(EXTDIR)\PerlIO\via\via | |
719 | XSAPITEST = $(EXTDIR)\XS\APItest\APItest | |
720 | XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap | |
721 | UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize | |
5cde6b89 | 722 | WIN32_DIR = ext\Win32 |
caec3c99 NC |
723 | |
724 | SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll | |
725 | FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll | |
726 | OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll | |
727 | SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll | |
728 | IO_DLL = $(AUTODIR)\IO\IO.dll | |
729 | POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll | |
730 | ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll | |
731 | THREAD_DLL = $(AUTODIR)\Thread\Thread.dll | |
732 | B_DLL = $(AUTODIR)\B\B.dll | |
733 | DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll | |
734 | PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll | |
735 | RE_DLL = $(AUTODIR)\re\re.dll | |
736 | BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll | |
737 | DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll | |
738 | GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll | |
739 | HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll | |
740 | STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll | |
741 | FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll | |
742 | ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll | |
743 | MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll | |
744 | PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll | |
745 | MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll | |
746 | TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll | |
747 | CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll | |
748 | LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll | |
749 | PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll | |
750 | XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll | |
751 | XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll | |
752 | UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll | |
5cde6b89 | 753 | WIN32_DLL = $(AUTODIR)\Win32\Win32.dll |
caec3c99 NC |
754 | |
755 | EXTENSION_C = \ | |
756 | $(SOCKET).c \ | |
757 | $(FCNTL).c \ | |
758 | $(OPCODE).c \ | |
759 | $(SDBM_FILE).c \ | |
760 | $(IO).c \ | |
761 | $(POSIX).c \ | |
762 | $(ATTRS).c \ | |
763 | $(THREAD).c \ | |
764 | $(RE).c \ | |
765 | $(DUMPER).c \ | |
766 | $(PEEK).c \ | |
767 | $(B).c \ | |
768 | $(BYTELOADER).c \ | |
769 | $(DPROF).c \ | |
770 | $(GLOB).c \ | |
771 | $(HOSTNAME).c \ | |
772 | $(STORABLE).c \ | |
773 | $(FILTER).c \ | |
774 | $(ENCODE).c \ | |
775 | $(MD5).c \ | |
776 | $(PERLIOSCALAR).c \ | |
777 | $(MIMEBASE64).c \ | |
778 | $(TIMEHIRES).c \ | |
779 | $(CWD).c \ | |
780 | $(LISTUTIL).c \ | |
781 | $(PERLIOVIA).c \ | |
782 | $(XSAPITEST).c \ | |
783 | $(XSTYPEMAP).c \ | |
5cde6b89 NC |
784 | $(UNICODENORMALIZE).c \ |
785 | $(WIN32_DIR).c | |
caec3c99 NC |
786 | |
787 | EXTENSION_DLL = \ | |
788 | $(SOCKET_DLL) \ | |
789 | $(FCNTL_DLL) \ | |
790 | $(OPCODE_DLL) \ | |
791 | $(SDBM_FILE_DLL)\ | |
792 | $(IO_DLL) \ | |
793 | $(POSIX_DLL) \ | |
794 | $(ATTRS_DLL) \ | |
795 | $(DUMPER_DLL) \ | |
796 | $(PEEK_DLL) \ | |
797 | $(B_DLL) \ | |
798 | $(RE_DLL) \ | |
799 | $(THREAD_DLL) \ | |
800 | $(BYTELOADER_DLL) \ | |
801 | $(DPROF_DLL) \ | |
802 | $(GLOB_DLL) \ | |
803 | $(HOSTNAME_DLL) \ | |
804 | $(STORABLE_DLL) \ | |
805 | $(FILTER_DLL) \ | |
806 | $(ENCODE_DLL) \ | |
807 | $(MD5_DLL) \ | |
808 | $(PERLIOSCALAR_DLL) \ | |
809 | $(MIMEBASE64_DLL) \ | |
810 | $(TIMEHIRES_DLL) \ | |
811 | $(CWD_DLL) \ | |
812 | $(LISTUTIL_DLL) \ | |
813 | $(PERLIOVIA_DLL) \ | |
814 | $(XSAPITEST_DLL) \ | |
815 | $(XSTYPEMAP_DLL) \ | |
5cde6b89 NC |
816 | $(UNICODENORMALIZE_DLL) \ |
817 | $(WIN32_DLL) | |
caec3c99 NC |
818 | |
819 | POD2HTML = $(PODDIR)\pod2html | |
820 | POD2MAN = $(PODDIR)\pod2man | |
821 | POD2LATEX = $(PODDIR)\pod2latex | |
822 | POD2TEXT = $(PODDIR)\pod2text | |
823 | ||
824 | CFG_VARS = \ | |
825 | "INST_DRV=$(INST_DRV)" \ | |
826 | "INST_TOP=$(INST_TOP)" \ | |
827 | "INST_VER=$(INST_VER)" \ | |
828 | "INST_ARCH=$(INST_ARCH)" \ | |
829 | "archname=$(ARCHNAME)" \ | |
830 | "cc=$(CC)" \ | |
831 | "ld=$(LINK32)" \ | |
832 | "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \ | |
833 | "cf_email=$(EMAIL)" \ | |
834 | "d_crypt=$(D_CRYPT)" \ | |
835 | "d_mymalloc=$(PERL_MALLOC)" \ | |
836 | "libs=$(LIBFILES)" \ | |
837 | "incpath=$(CCINCDIR:"=\")" \ | |
838 | "libperl=$(PERLIMPLIB:..\=)" \ | |
839 | "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \ | |
840 | "libc=$(LIBC)" \ | |
841 | "make=$(MAKE_BARE)" \ | |
842 | "usethreads=$(USE_ITHREADS)" \ | |
843 | "use5005threads=$(USE_5005THREADS)" \ | |
844 | "useithreads=$(USE_ITHREADS)" \ | |
845 | "usethreads=$(USE_5005THREADS)" \ | |
846 | "usemultiplicity=$(USE_MULTI)" \ | |
847 | "useperlio=$(USE_PERLIO)" \ | |
848 | "uselargefiles=$(USE_LARGE_FILES)" \ | |
849 | "LINK_FLAGS=$(LINK_FLAGS:"=\")" \ | |
850 | "optimize=$(OPTIMIZE:"=\")" | |
851 | ||
852 | # | |
853 | # Top targets | |
854 | # | |
855 | ||
23b555d7 | 856 | all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \ |
caec3c99 NC |
857 | $(X2P) Extensions |
858 | @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite. | |
859 | ||
860 | $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c | |
861 | ||
862 | #------------------------------------------------------------ | |
863 | ||
864 | $(GLOBEXE) : perlglob$(o) | |
865 | $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ | |
866 | perlglob$(o) setargv$(o) | |
867 | ||
868 | perlglob$(o) : perlglob.c | |
869 | ||
870 | config.w32 : $(CFGSH_TMPL) | |
871 | copy $(CFGSH_TMPL) config.w32 | |
872 | ||
873 | .\config.h : $(CFGH_TMPL) | |
874 | -del /f config.h | |
875 | copy $(CFGH_TMPL) config.h | |
876 | ||
877 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL | |
878 | $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh | |
879 | ||
880 | # this target is for when changes to the main config.sh happen | |
881 | # edit config.{b,v,g}c and make this target once for each supported | |
882 | # compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`) | |
883 | regen_config_h: | |
884 | perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh | |
885 | cd .. | |
886 | -del /f perl.exe perl*.dll | |
887 | perl configpm | |
888 | cd win32 | |
889 | -del /f $(CFGH_TMPL) | |
890 | -mkdir $(COREDIR) | |
891 | -perl config_h.PL "INST_VER=$(INST_VER)" | |
892 | rename config.h $(CFGH_TMPL) | |
893 | ||
894 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl | |
895 | cd .. | |
896 | miniperl configpm | |
897 | cd win32 | |
898 | if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) | |
899 | $(XCOPY) ..\*.h $(COREDIR)\*.* | |
900 | $(XCOPY) ..\*.inc $(COREDIR)\*.* | |
901 | $(XCOPY) *.h $(COREDIR)\*.* | |
902 | $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.* | |
903 | $(RCOPY) include $(COREDIR)\*.* | |
904 | -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" | |
905 | if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM) | |
906 | ||
907 | $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) | |
908 | $(LINK32) -subsystem:console -out:$@ @<< | |
909 | $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ) | |
910 | << | |
911 | ||
912 | $(MINIDIR) : | |
913 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" | |
914 | ||
915 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) | |
916 | $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c | |
917 | ||
918 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) | |
919 | $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c | |
920 | ||
921 | # -DPERL_IMPLICIT_SYS needs C++ for perllib.c | |
922 | # This is the only file that depends on perlhost.h, vmem.h, and vdir.h | |
923 | !IF "$(USE_IMP_SYS)" == "define" | |
924 | perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h | |
925 | $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c | |
926 | !ENDIF | |
927 | ||
928 | # 1. we don't want to rebuild miniperl.exe when config.h changes | |
929 | # 2. we don't want to rebuild miniperl.exe with non-default config.h | |
930 | $(MINI_OBJ) : $(CORE_NOCFG_H) | |
931 | ||
932 | $(WIN32_OBJ) : $(CORE_H) | |
933 | $(CORE_OBJ) : $(CORE_H) | |
934 | $(DLL_OBJ) : $(CORE_H) | |
935 | $(X2P_OBJ) : $(CORE_H) | |
936 | ||
937 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl | |
938 | $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \ | |
939 | CCTYPE=$(CCTYPE) > perldll.def | |
940 | ||
941 | $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) | |
942 | $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<< | |
943 | $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES) | |
944 | << | |
945 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) | |
946 | ||
a278d680 SH |
947 | $(PERLEXE_ICO): $(MINIPERL) makeico.pl |
948 | $(MINIPERL) makeico.pl > $@ | |
949 | ||
950 | $(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO) | |
951 | ||
caec3c99 NC |
952 | $(MINIMOD) : $(MINIPERL) ..\minimod.pl |
953 | cd .. | |
954 | miniperl minimod.pl > lib\ExtUtils\Miniperl.pm | |
955 | cd win32 | |
956 | ||
957 | ..\x2p\a2p$(o) : ..\x2p\a2p.c | |
958 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c | |
959 | ||
960 | ..\x2p\hash$(o) : ..\x2p\hash.c | |
961 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c | |
962 | ||
963 | ..\x2p\str$(o) : ..\x2p\str.c | |
964 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c | |
965 | ||
966 | ..\x2p\util$(o) : ..\x2p\util.c | |
967 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c | |
968 | ||
969 | ..\x2p\walk$(o) : ..\x2p\walk.c | |
970 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c | |
971 | ||
972 | $(X2P) : $(MINIPERL) $(X2P_OBJ) | |
973 | $(MINIPERL) ..\x2p\find2perl.PL | |
974 | $(MINIPERL) ..\x2p\s2p.PL | |
975 | $(LINK32) -subsystem:console -out:$@ @<< | |
976 | $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ) | |
977 | << | |
978 | ||
979 | perlmain.c : runperl.c | |
980 | copy runperl.c perlmain.c | |
981 | ||
982 | perlmain$(o) : perlmain.c | |
983 | $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c | |
984 | ||
985 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) | |
986 | $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \ | |
987 | $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES) | |
988 | copy $(PERLEXE) $(WPERLEXE) | |
989 | $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS | |
990 | copy splittree.pl .. | |
991 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) | |
992 | ||
993 | $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) | |
994 | if not exist $(AUTODIR) mkdir $(AUTODIR) | |
995 | cd $(EXTDIR)\$(*B) | |
996 | ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL | |
997 | ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL | |
998 | cd ..\..\win32 | |
999 | $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) | |
1000 | $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL) | |
1001 | cd $(EXTDIR)\$(*B) | |
1002 | $(XSUBPP) dl_win32.xs > $(*B).c | |
1003 | cd ..\..\win32 | |
1004 | ||
1005 | $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs | |
1006 | copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs | |
1007 | ||
1008 | #---------------------------------------------------------------------------------- | |
1009 | Extensions: buildext.pl $(PERLDEP) $(CONFIGPM) | |
1010 | $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) | |
5cde6b89 NC |
1011 | $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext |
1012 | ||
1013 | # Note: The next two targets explicitly remove a "blibdirs.exists" file that | |
1014 | # currerntly gets left behind, until CPAN RT Ticket #5616 is resolved. | |
caec3c99 NC |
1015 | |
1016 | Extensions_clean: | |
1017 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean | |
5cde6b89 NC |
1018 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext clean |
1019 | -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists | |
1020 | ||
1021 | Extensions_realclean: | |
1022 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) realclean | |
1023 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext realclean | |
1024 | -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists | |
caec3c99 NC |
1025 | |
1026 | #---------------------------------------------------------------------------------- | |
1027 | ||
1028 | doc: $(PERLEXE) | |
1029 | $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \ | |
1030 | --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \ | |
1031 | --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse | |
1032 | ||
93ea91c1 AT |
1033 | # Note that this next section is parsed (and regenerated) by pod/buildtoc |
1034 | # so please check that script before making structural changes here | |
1035 | ||
caec3c99 NC |
1036 | utils: $(PERLEXE) $(X2P) |
1037 | cd ..\utils | |
1038 | $(MAKE) PERL=$(MINIPERL) | |
1039 | cd ..\pod | |
f6722d80 | 1040 | copy ..\vms\perlvms.pod .\perlvms.pod |
93ea91c1 AT |
1041 | copy ..\README.aix ..\pod\perlaix.pod |
1042 | copy ..\README.amiga ..\pod\perlamiga.pod | |
1043 | copy ..\README.apollo ..\pod\perlapollo.pod | |
1044 | copy ..\README.beos ..\pod\perlbeos.pod | |
1045 | copy ..\README.bs2000 ..\pod\perlbs2000.pod | |
1046 | copy ..\README.ce ..\pod\perlce.pod | |
1047 | copy ..\README.cn ..\pod\perlcn.pod | |
1048 | copy ..\README.cygwin ..\pod\perlcygwin.pod | |
1049 | copy ..\README.dgux ..\pod\perldgux.pod | |
1050 | copy ..\README.dos ..\pod\perldos.pod | |
1051 | copy ..\README.epoc ..\pod\perlepoc.pod | |
1052 | copy ..\README.freebsd ..\pod\perlfreebsd.pod | |
1053 | copy ..\README.hpux ..\pod\perlhpux.pod | |
1054 | copy ..\README.hurd ..\pod\perlhurd.pod | |
1055 | copy ..\README.irix ..\pod\perlirix.pod | |
1056 | copy ..\README.jp ..\pod\perljp.pod | |
1057 | copy ..\README.ko ..\pod\perlko.pod | |
1058 | copy ..\README.machten ..\pod\perlmachten.pod | |
1059 | copy ..\README.macos ..\pod\perlmacos.pod | |
1060 | copy ..\README.macosx ..\pod\perlmacosx.pod | |
1061 | copy ..\README.mint ..\pod\perlmint.pod | |
1062 | copy ..\README.mpeix ..\pod\perlmpeix.pod | |
1063 | copy ..\README.netware ..\pod\perlnetware.pod | |
1064 | copy ..\README.os2 ..\pod\perlos2.pod | |
1065 | copy ..\README.os390 ..\pod\perlos390.pod | |
1066 | copy ..\README.os400 ..\pod\perlos400.pod | |
1067 | copy ..\README.plan9 ..\pod\perlplan9.pod | |
1068 | copy ..\README.qnx ..\pod\perlqnx.pod | |
1069 | copy ..\README.solaris ..\pod\perlsolaris.pod | |
1070 | copy ..\README.tru64 ..\pod\perltru64.pod | |
1071 | copy ..\README.tw ..\pod\perltw.pod | |
1072 | copy ..\README.uts ..\pod\perluts.pod | |
1073 | copy ..\README.vmesa ..\pod\perlvmesa.pod | |
1074 | copy ..\README.vms ..\pod\perlvms.pod | |
1075 | copy ..\README.vos ..\pod\perlvos.pod | |
1076 | copy ..\README.win32 ..\pod\perlwin32.pod | |
b5a29516 | 1077 | copy ..\pod\perl586delta.pod ..\pod\perldelta.pod |
caec3c99 NC |
1078 | $(MAKE) -f ..\win32\pod.mak converters |
1079 | cd ..\lib | |
1080 | $(PERLEXE) lib_pm.PL | |
1081 | cd ..\win32 | |
1082 | $(PERLEXE) $(PL2BAT) $(UTILS) | |
1083 | ||
93ea91c1 AT |
1084 | # Note that the pod cleanup in this next section is parsed (and regenerated |
1085 | # by pod/buildtoc so please check that script before making changes here | |
1086 | ||
caec3c99 NC |
1087 | # the doubled rmdir calls are needed because older cmd shells |
1088 | # don't understand /q | |
5cde6b89 | 1089 | distclean: realclean |
caec3c99 NC |
1090 | -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ |
1091 | $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) | |
1092 | -del /f *.def *.map | |
1093 | -del /f $(EXTENSION_DLL) | |
1094 | -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm | |
1095 | -del /f $(EXTDIR)\DynaLoader\dl_win32.xs | |
5cde6b89 NC |
1096 | -del /f $(EXTDIR)\DynaLoader\DynaLoader.pm |
1097 | -del /f $(EXTDIR)\DynaLoader\XSLoader.pm | |
1098 | -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm | |
1099 | -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm | |
caec3c99 | 1100 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm |
5cde6b89 | 1101 | -del /f $(LIBDIR)\XSLoader.pm $(LIBDIR)\lib.pm |
caec3c99 NC |
1102 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm |
1103 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm | |
1104 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm | |
1105 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm | |
5cde6b89 | 1106 | -del /f $(LIBDIR)\ByteLoader.pm |
caec3c99 | 1107 | -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm |
5cde6b89 | 1108 | -del /f $(LIBDIR)\Devel\PPPort.pm |
caec3c99 NC |
1109 | -del /f $(LIBDIR)\File\Glob.pm |
1110 | -del /f $(LIBDIR)\Storable.pm | |
caec3c99 | 1111 | -del /f $(LIBDIR)\Digest\MD5.pm |
5cde6b89 | 1112 | -del /f $(LIBDIR)\PerlIO\encoding.pm |
caec3c99 NC |
1113 | -del /f $(LIBDIR)\PerlIO\scalar.pm |
1114 | -del /f $(LIBDIR)\PerlIO\via.pm | |
5cde6b89 NC |
1115 | -del /f $(LIBDIR)\Sys\Hostname.pm |
1116 | -del /f $(LIBDIR)\Thread\Signal.pm $(LIBDIR)\Thread\Specific.pm | |
1117 | -del /f $(LIBDIR)\threads\shared.pm | |
caec3c99 | 1118 | -del /f $(LIBDIR)\Time\HiRes.pm |
caec3c99 | 1119 | -del /f $(LIBDIR)\Unicode\Normalize.pm |
5cde6b89 | 1120 | -del /f $(LIBDIR)\Win32.pm |
caec3c99 NC |
1121 | -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO |
1122 | -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO | |
1123 | -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B | |
1124 | -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B | |
1125 | -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data | |
1126 | -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data | |
5cde6b89 NC |
1127 | -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode |
1128 | -if exist $(LIBDIR)\Encode rmdir /s $(LIBDIR)\Encode | |
caec3c99 NC |
1129 | -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util |
1130 | -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util | |
caec3c99 NC |
1131 | -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME |
1132 | -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME | |
1133 | -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List | |
1134 | -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List | |
1135 | -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar | |
1136 | -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar | |
1137 | -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS | |
1138 | -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS | |
5cde6b89 | 1139 | -cd $(PODDIR) && del /f *.html *.bat checkpods \ |
caec3c99 | 1140 | perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \ |
f6722d80 NC |
1141 | perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \ |
1142 | perldelta.pod perldgux.pod perldos.pod perlepoc.pod \ | |
1143 | perlfreebsd.pod perlhpux.pod perlhurd.pod perlirix.pod \ | |
1144 | perljp.pod perlko.pod perlmachten.pod perlmacos.pod \ | |
1145 | perlmacosx.pod perlmint.pod perlmpeix.pod perlnetware.pod \ | |
caec3c99 | 1146 | perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \ |
f6722d80 | 1147 | perlqnx.pod perlsolaris.pod perltru64.pod perltw.pod \ |
1598f199 NC |
1148 | perluts.pod perlvmesa.pod perlvms.pod perlvms.pod perlvos.pod \ |
1149 | perlwin32.pod \ | |
f6722d80 | 1150 | pod2html pod2latex pod2man pod2text pod2usage \ |
caec3c99 | 1151 | podchecker podselect |
5cde6b89 NC |
1152 | -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \ |
1153 | perldoc perlivp dprofpp perlcc libnetcfg enc2xs piconv cpan *.bat \ | |
1154 | xsubpp instmodsh prove | |
1155 | -cd ..\x2p && del /f find2perl s2p psed *.bat | |
caec3c99 NC |
1156 | -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new |
1157 | -del /f $(CONFIGPM) | |
1158 | -del /f bin\*.bat | |
5f36bea8 | 1159 | -del /f $(PERLEXE_ICO) perl.base |
5cde6b89 NC |
1160 | -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib |
1161 | -cd $(EXTDIR) && del /s *.def Makefile Makefile.old | |
caec3c99 NC |
1162 | -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) |
1163 | -if exist $(AUTODIR) rmdir /s $(AUTODIR) | |
1164 | -if exist $(COREDIR) rmdir /s /q $(COREDIR) | |
1165 | -if exist $(COREDIR) rmdir /s $(COREDIR) | |
1166 | ||
1167 | install : all installbare installhtml | |
1168 | ||
1169 | installbare : utils | |
1170 | $(PERLEXE) ..\installperl | |
1171 | if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* | |
1172 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* | |
5f36bea8 SH |
1173 | if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.* |
1174 | if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.* | |
caec3c99 NC |
1175 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* |
1176 | ||
1177 | installhtml : doc | |
1178 | $(RCOPY) html\*.* $(INST_HTML)\*.* | |
1179 | ||
1180 | inst_lib : $(CONFIGPM) | |
1181 | copy splittree.pl .. | |
1182 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) | |
1183 | $(RCOPY) ..\lib $(INST_LIB)\*.* | |
1184 | ||
23b555d7 NC |
1185 | $(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables |
1186 | cd ..\lib\unicore && \ | |
1187 | ..\$(MINIPERL) -I.. mktables | |
1188 | ||
1189 | minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES) | |
5cde6b89 NC |
1190 | $(XCOPY) $(MINIPERL) ..\t\$(NULL) |
1191 | if exist ..\t\perl.exe del /f ..\t\perl.exe | |
1192 | rename ..\t\miniperl.exe perl.exe | |
caec3c99 NC |
1193 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
1194 | attrib -r ..\t\*.* | |
5cde6b89 NC |
1195 | cd ..\t && \ |
1196 | $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t | |
caec3c99 NC |
1197 | |
1198 | test-prep : all utils | |
1199 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1200 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1201 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1202 | ||
1203 | test : test-prep | |
1204 | cd ..\t | |
1205 | $(PERLEXE) -I..\lib harness | |
1206 | cd ..\win32 | |
1207 | ||
1208 | test-notty : test-prep | |
1209 | set PERL_SKIP_TTY_TEST=1 | |
1210 | cd ..\t | |
1211 | $(PERLEXE) -I..\lib harness | |
1212 | cd ..\win32 | |
1213 | ||
1214 | _test : | |
1215 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1216 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1217 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1218 | cd ..\t | |
1219 | $(PERLEXE) -I..\lib harness | |
1220 | cd ..\win32 | |
1221 | ||
23b555d7 NC |
1222 | # the doubled rmdir calls are needed because older cmd shells |
1223 | # don't understand /q | |
5cde6b89 | 1224 | _clean : |
caec3c99 NC |
1225 | -@$(DEL) miniperlmain$(o) |
1226 | -@$(DEL) $(MINIPERL) | |
1227 | -@$(DEL) perlglob$(o) | |
1228 | -@$(DEL) perlmain$(o) | |
1229 | -@$(DEL) config.w32 | |
1230 | -@$(DEL) config.h | |
1231 | -@$(DEL) $(GLOBEXE) | |
1232 | -@$(DEL) $(PERLEXE) | |
1233 | -@$(DEL) $(WPERLEXE) | |
1234 | -@$(DEL) $(PERLDLL) | |
1235 | -@$(DEL) $(CORE_OBJ) | |
1236 | -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) | |
1237 | -if exist $(MINIDIR) rmdir /s $(MINIDIR) | |
23b555d7 NC |
1238 | -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1) |
1239 | -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1) | |
1240 | -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2) | |
1241 | -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2) | |
1242 | -@$(DEL) $(UNIDATAFILES) | |
caec3c99 NC |
1243 | -@$(DEL) $(WIN32_OBJ) |
1244 | -@$(DEL) $(DLL_OBJ) | |
1245 | -@$(DEL) $(X2P_OBJ) | |
1246 | -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res | |
1247 | -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat | |
1248 | -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat | |
1249 | -@$(DEL) *.ilk | |
1250 | -@$(DEL) *.pdb | |
1251 | ||
5cde6b89 NC |
1252 | clean : Extensions_clean _clean |
1253 | ||
1254 | realclean : Extensions_realclean _clean | |
1255 | ||
caec3c99 NC |
1256 | # Handy way to run perlbug -ok without having to install and run the |
1257 | # installed perlbug. We don't re-run the tests here - we trust the user. | |
1258 | # Please *don't* use this unless all tests pass. | |
1259 | # If you want to report test failures, use "nmake nok" instead. | |
1260 | ok: utils | |
1261 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" | |
1262 | ||
1263 | okfile: utils | |
1264 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok | |
1265 | ||
1266 | nok: utils | |
1267 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" | |
1268 | ||
1269 | nokfile: utils | |
1270 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok |