Commit | Line | Data |
---|---|---|
1e71036e | 1 | # |
b6c85593 | 2 | # Makefile to build perl on Windows using DMAKE. |
1e71036e | 3 | # Supported compilers: |
b6c85593 | 4 | # Microsoft Visual C++ 6.0 or later |
ceb0c681 | 5 | # MinGW with gcc-3.2 or later |
2a46176f | 6 | # Windows SDK 64-bit compiler and tools |
1e71036e JH |
7 | # |
8 | # This is set up to build a perl.exe that runs off a shared library | |
f7cf42bb | 9 | # (perl519.dll). Also makes individual DLLs for the XS extensions. |
1e71036e JH |
10 | # |
11 | ||
12 | ## | |
13 | ## Make sure you read README.win32 *before* you mess with anything here! | |
14 | ## | |
15 | ||
3ed51be3 SH |
16 | # |
17 | # Import everything from the environment like NMAKE does. | |
18 | # | |
19 | .IMPORT : .EVERYTHING | |
20 | ||
1e71036e JH |
21 | ## |
22 | ## Build configuration. Edit the values below to suit your needs. | |
23 | ## | |
24 | ||
25 | # | |
26 | # Set these to wherever you want "dmake install" to put your | |
27 | # newly built perl. | |
28 | # | |
29 | INST_DRV *= c: | |
30 | INST_TOP *= $(INST_DRV)\perl | |
31 | ||
32 | # | |
b86e806e JD |
33 | # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler |
34 | # on a 64-bit version of Windows. | |
35 | #WIN64 *= undef | |
36 | ||
37 | # | |
1e71036e JH |
38 | # Comment this out if you DON'T want your perl installation to be versioned. |
39 | # This means that the new installation will overwrite any files from the | |
40 | # old installation at the same INST_TOP location. Leaving it enabled is | |
41 | # the safest route, as perl adds the extra version directory to all the | |
42 | # locations it installs files to. If you disable it, an alternative | |
43 | # versioned installation can be obtained by setting INST_TOP above to a | |
44 | # path that includes an arbitrary version string. | |
45 | # | |
8a654289 | 46 | #INST_VER *= \5.19.8 |
1e71036e JH |
47 | |
48 | # | |
49 | # Comment this out if you DON'T want your perl installation to have | |
50 | # architecture specific components. This means that architecture- | |
51 | # specific files will be installed along with the architecture-neutral | |
52 | # files. Leaving it enabled is safer and more flexible, in case you | |
53 | # want to build multiple flavors of perl and install them together in | |
54 | # the same location. Commenting it out gives you a simpler | |
55 | # installation that is easier to understand for beginners. | |
56 | # | |
ec25c072 | 57 | #INST_ARCH *= \$(ARCHNAME) |
1e71036e JH |
58 | |
59 | # | |
7ada00a0 SH |
60 | # Uncomment this if you want perl to run |
61 | # $Config{sitelibexp}\sitecustomize.pl | |
62 | # before anything else. This script can then be set up, for example, | |
63 | # to add additional entries to @INC. | |
64 | # | |
65 | #USE_SITECUST *= define | |
66 | ||
67 | # | |
1e71036e | 68 | # uncomment to enable multiple interpreters. This is need for fork() |
2cbbe5a1 | 69 | # emulation and for thread support. |
1e71036e JH |
70 | # |
71 | USE_MULTI *= define | |
72 | ||
73 | # | |
2cbbe5a1 NIS |
74 | # Interpreter cloning/threads; now reasonably complete. |
75 | # This should be enabled to get the fork() emulation. | |
76 | # This needs USE_MULTI above. | |
1e71036e JH |
77 | # |
78 | USE_ITHREADS *= define | |
79 | ||
80 | # | |
81 | # uncomment to enable the implicit "host" layer for all system calls | |
2cbbe5a1 NIS |
82 | # made by perl. This needs USE_MULTI above. |
83 | # This is also needed to get fork(). | |
1e71036e JH |
84 | # |
85 | USE_IMP_SYS *= define | |
86 | ||
87 | # | |
2cbbe5a1 NIS |
88 | # Comment out next assign to disable perl's I/O subsystem and use compiler's |
89 | # stdio for IO - depending on your compiler vendor and run time library you may | |
90 | # then get a number of fails from make test i.e. bugs - complain to them not us ;-). | |
91 | # You will also be unable to take full advantage of perl5.8's support for multiple | |
92 | # encodings and may see lower IO performance. You have been warned. | |
4a9d6100 GS |
93 | USE_PERLIO *= define |
94 | ||
95 | # | |
96 | # Comment this out if you don't want to enable large file support for | |
97 | # some reason. Should normally only be changed to maintain compatibility | |
98 | # with an older release of perl. | |
bdb4cb88 | 99 | USE_LARGE_FILES *= define |
1e71036e JH |
100 | |
101 | # | |
1f64ae15 SH |
102 | # Uncomment this if you're building a 32-bit perl and want 64-bit integers. |
103 | # (If you're building a 64-bit perl then you will have 64-bit integers whether | |
104 | # or not this is uncommented.) | |
38aa66aa | 105 | # Note: This option is not supported in 32-bit MSVC60 builds. |
1f64ae15 SH |
106 | #USE_64_BIT_INT *= define |
107 | ||
108 | # | |
1e71036e JH |
109 | # uncomment exactly one of the following |
110 | # | |
1c847d4b | 111 | # Visual C++ 6.x (aka Visual C++ 98) |
e2736246 | 112 | #CCTYPE *= MSVC60 |
5398666e SH |
113 | # Visual C++ .NET 2002/2003 (aka Visual C++ 7.x) (full version) |
114 | #CCTYPE *= MSVC70 | |
1c847d4b | 115 | # Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools) |
da2c7419 | 116 | #CCTYPE *= MSVC70FREE |
2a46176f SH |
117 | # Windows Server 2003 SP1 Platform SDK (April 2005) |
118 | #CCTYPE = SDK2003SP1 | |
1c847d4b SH |
119 | # Visual C++ 2005 (aka Visual C++ 8.x) (full version) |
120 | #CCTYPE *= MSVC80 | |
5398666e SH |
121 | # Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version) |
122 | #CCTYPE *= MSVC80FREE | |
4a3cf07b SH |
123 | # Visual C++ 2008 (aka Visual C++ 9.x) (full version) |
124 | #CCTYPE *= MSVC90 | |
5398666e SH |
125 | # Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version) |
126 | #CCTYPE *= MSVC90FREE | |
2a46176f SH |
127 | # Visual C++ 2010 (aka Visual C++ 10.x) (full version) |
128 | #CCTYPE = MSVC100 | |
5398666e SH |
129 | # Visual C++ 2010 Express Edition (aka Visual C++ 10.x) (free version) |
130 | #CCTYPE = MSVC100FREE | |
131 | # Visual C++ 2012 (aka Visual C++ 11.x) (full version) | |
132 | #CCTYPE = MSVC110 | |
133 | # Visual C++ 2012 Express Edition (aka Visual C++ 11.x) (free version) | |
134 | #CCTYPE = MSVC110FREE | |
3e7c2d43 SH |
135 | # Visual C++ 2013 (aka Visual C++ 12.x) (full version) |
136 | #CCTYPE = MSVC120 | |
137 | # Visual C++ 2013 Express Edition (aka Visual C++ 12.x) (free version) | |
138 | #CCTYPE = MSVC120FREE | |
ceb0c681 | 139 | # MinGW or mingw-w64 with gcc-3.2 or later |
e2736246 | 140 | CCTYPE *= GCC |
1e71036e JH |
141 | |
142 | # | |
a2b08671 SH |
143 | # If you are using Intel C++ Compiler uncomment this |
144 | # | |
145 | #__ICC *= define | |
146 | ||
147 | # | |
1e71036e JH |
148 | # uncomment next line if you want debug version of perl (big,slow) |
149 | # If not enabled, we automatically try to use maximum optimization | |
150 | # with all compilers that are known to have a working optimizer. | |
151 | # | |
2cbbe5a1 | 152 | #CFG *= Debug |
1e71036e JH |
153 | |
154 | # | |
1e71036e JH |
155 | # uncomment to enable linking with setargv.obj under the Visual C |
156 | # compiler. Setting this options enables perl to expand wildcards in | |
157 | # arguments, but it may be harder to use alternate methods like | |
158 | # File::DosGlob that are more powerful. This option is supported only with | |
159 | # Visual C. | |
160 | # | |
161 | #USE_SETARGV *= define | |
162 | ||
163 | # | |
1e71036e JH |
164 | # set this if you wish to use perl's malloc |
165 | # WARNING: Turning this on/off WILL break binary compatibility with extensions | |
166 | # you may have compiled with/without it. Be prepared to recompile all | |
167 | # extensions if you change the default. Currently, this cannot be enabled | |
168 | # if you ask for USE_IMP_SYS above. | |
169 | # | |
c800dd8b | 170 | #PERL_MALLOC *= define |
8bcd5811 VK |
171 | |
172 | # | |
173 | # set this to enable debugging mstats | |
174 | # This must be enabled to use the Devel::Peek::mstat() function. This cannot | |
175 | # be enabled without PERL_MALLOC as well. | |
176 | # | |
646e33b6 | 177 | #DEBUG_MSTATS *= define |
1e71036e JH |
178 | |
179 | # | |
ed2eab3f SH |
180 | # set this to additionally provide a statically linked perl-static.exe. |
181 | # Note that dynamic loading will not work with this perl, so you must | |
a1f2e719 | 182 | # include required modules statically using the STATIC_EXT or ALL_STATIC |
f7cf42bb | 183 | # variables below. A static library perl519s.lib will also be created. |
ed2eab3f SH |
184 | # Ordinary perl.exe is not affected by this option. |
185 | # | |
186 | #BUILD_STATIC *= define | |
187 | ||
188 | # | |
a1f2e719 VK |
189 | # in addition to BUILD_STATIC the option ALL_STATIC makes *every* |
190 | # extension get statically built | |
191 | # This will result in a very large perl executable, but the main purpose | |
192 | # is to have proper linking set so as to be able to create miscellaneous | |
193 | # executables with different built-in extensions | |
194 | # | |
195 | #ALL_STATIC *= define | |
196 | ||
197 | # | |
1e71036e JH |
198 | # set the install locations of the compiler include/libraries |
199 | # Running VCVARS32.BAT is *required* when using Visual C. | |
200 | # Some versions of Visual C don't define MSVCDIR in the environment, | |
201 | # so you may have to set CCHOME explicitly (spaces in the path name should | |
202 | # not be quoted) | |
203 | # | |
378eeda7 | 204 | .IF "$(CCTYPE)" == "GCC" |
c572eed0 NIS |
205 | CCHOME *= C:\MinGW |
206 | .ELSE | |
1e71036e | 207 | CCHOME *= $(MSVCDIR) |
c572eed0 | 208 | .ENDIF |
1e71036e JH |
209 | |
210 | # | |
fa58a56f S |
211 | # uncomment this if you are using x86_64-w64-mingw32 cross-compiler |
212 | # ie if your gcc executable is called 'x86_64-w64-mingw32-gcc' | |
213 | # instead of the usual 'gcc'. | |
214 | # | |
215 | #GCCCROSS *= define | |
216 | ||
217 | # | |
23ae7f17 S |
218 | # Following sets $Config{incpath} and $Config{libpth} |
219 | # | |
220 | ||
221 | .IF "$(GCCCROSS)" == "define" | |
20634986 SH |
222 | CCINCDIR *= $(CCHOME)\x86_64-w64-mingw32\include |
223 | CCLIBDIR *= $(CCHOME)\x86_64-w64-mingw32\lib | |
224 | CCDLLDIR *= $(CCLIBDIR) | |
23ae7f17 S |
225 | .ELSE |
226 | CCINCDIR *= $(CCHOME)\include | |
227 | CCLIBDIR *= $(CCHOME)\lib | |
20634986 | 228 | CCDLLDIR *= $(CCHOME)\bin |
23ae7f17 S |
229 | .ENDIF |
230 | ||
231 | # | |
1e71036e JH |
232 | # Additional compiler flags can be specified here. |
233 | # | |
2e30e1e1 | 234 | BUILDOPT *= $(BUILDOPTEXTRA) |
1e71036e JH |
235 | |
236 | # | |
1e71036e JH |
237 | # This should normally be disabled. Enabling it will disable the File::Glob |
238 | # implementation of CORE::glob. | |
239 | # | |
240 | #BUILDOPT += -DPERL_EXTERNAL_GLOB | |
241 | ||
242 | # | |
270ca148 JD |
243 | # Perl needs to read scripts in text mode so that the DATA filehandle |
244 | # works correctly with seek() and tell(), or around auto-flushes of | |
245 | # all filehandles (e.g. by system(), backticks, fork(), etc). | |
bdb4cb88 | 246 | # |
270ca148 JD |
247 | # The current version on the ByteLoader module on CPAN however only |
248 | # works if scripts are read in binary mode. But before you disable text | |
249 | # mode script reading (and break some DATA filehandle functionality) | |
250 | # please check first if an updated ByteLoader isn't available on CPAN. | |
251 | # | |
252 | BUILDOPT += -DPERL_TEXTMODE_SCRIPTS | |
1e71036e JH |
253 | |
254 | # | |
255 | # specify semicolon-separated list of extra directories that modules will | |
256 | # look for libraries (spaces in path names need not be quoted) | |
257 | # | |
258 | EXTRALIBDIRS *= | |
259 | ||
260 | # | |
261 | # set this to point to cmd.exe (only needed if you use some | |
262 | # alternate shell that doesn't grok cmd.exe style commands) | |
263 | # | |
264 | #SHELL *= g:\winnt\system32\cmd.exe | |
265 | ||
266 | # | |
267 | # set this to your email address (perl will guess a value from | |
268 | # from your loginname and your hostname, which may not be right) | |
269 | # | |
270 | #EMAIL *= | |
271 | ||
272 | ## | |
273 | ## Build configuration ends. | |
274 | ## | |
275 | ||
276 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### | |
277 | ||
1e71036e | 278 | PERL_MALLOC *= undef |
646e33b6 | 279 | DEBUG_MSTATS *= undef |
1e71036e | 280 | |
7ada00a0 | 281 | USE_SITECUST *= undef |
1e71036e | 282 | USE_MULTI *= undef |
1e71036e JH |
283 | USE_ITHREADS *= undef |
284 | USE_IMP_SYS *= undef | |
285 | USE_PERLIO *= undef | |
4a9d6100 | 286 | USE_LARGE_FILES *= undef |
1f64ae15 | 287 | USE_64_BIT_INT *= undef |
1e71036e | 288 | |
646e33b6 | 289 | .IF "$(USE_IMP_SYS)" == "define" |
8bcd5811 | 290 | PERL_MALLOC = undef |
8bcd5811 VK |
291 | .ENDIF |
292 | ||
646e33b6 SH |
293 | .IF "$(PERL_MALLOC)" == "undef" |
294 | DEBUG_MSTATS = undef | |
8bcd5811 VK |
295 | .ENDIF |
296 | ||
297 | .IF "$(DEBUG_MSTATS)" == "define" | |
646e33b6 | 298 | BUILDOPT += -DPERL_DEBUGGING_MSTATS |
c800dd8b SH |
299 | .ENDIF |
300 | ||
66e09d83 | 301 | .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef" |
1e71036e JH |
302 | USE_MULTI != define |
303 | .ENDIF | |
304 | ||
66e09d83 | 305 | .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef" |
1e71036e | 306 | USE_MULTI != define |
1e71036e JH |
307 | .ENDIF |
308 | ||
7ada00a0 SH |
309 | .IF "$(USE_SITECUST)" == "define" |
310 | BUILDOPT += -DUSE_SITECUSTOMIZE | |
311 | .ENDIF | |
312 | ||
3db8f154 | 313 | .IF "$(USE_MULTI)" != "undef" |
1e71036e JH |
314 | BUILDOPT += -DPERL_IMPLICIT_CONTEXT |
315 | .ENDIF | |
316 | ||
317 | .IF "$(USE_IMP_SYS)" != "undef" | |
318 | BUILDOPT += -DPERL_IMPLICIT_SYS | |
319 | .ENDIF | |
320 | ||
1e71036e JH |
321 | PROCESSOR_ARCHITECTURE *= x86 |
322 | ||
c623ac67 | 323 | .IF "$(WIN64)" == "" |
bf2a35e5 JD |
324 | # When we are running from a 32bit cmd.exe on AMD64 then |
325 | # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432 | |
326 | # is set to AMD64 | |
c623ac67 | 327 | .IF "$(PROCESSOR_ARCHITEW6432)" != "" |
e9948054 | 328 | PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432) |
c623ac67 | 329 | WIN64 = define |
bf2a35e5 | 330 | .ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64" |
c623ac67 GS |
331 | WIN64 = define |
332 | .ELSE | |
333 | WIN64 = undef | |
334 | .ENDIF | |
335 | .ENDIF | |
336 | ||
1f64ae15 SH |
337 | .IF "$(WIN64)" == "define" |
338 | USE_64_BIT_INT = define | |
339 | .ENDIF | |
340 | ||
2a46176f SH |
341 | # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because |
342 | # both link against MSVCRT.dll (which is part of Windows itself) and | |
343 | # not against a compiler specific versioned runtime. | |
344 | .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60" | |
345 | CCTYPE = SDK2003SP1 | |
346 | .ENDIF | |
347 | ||
38aa66aa SH |
348 | # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler |
349 | # does not support it. | |
350 | .IF "$(CCTYPE)" == "MSVC60" | |
351 | USE_64_BIT_INT != undef | |
352 | .ENDIF | |
353 | ||
bf2a35e5 JD |
354 | ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) |
355 | .IF "$(ARCHITECTURE)" == "AMD64" | |
356 | ARCHITECTURE = x64 | |
9453ddcd | 357 | .ENDIF |
bf2a35e5 JD |
358 | .IF "$(ARCHITECTURE)" == "IA64" |
359 | ARCHITECTURE = ia64 | |
9453ddcd SH |
360 | .ENDIF |
361 | ||
3db8f154 | 362 | .IF "$(USE_MULTI)" == "define" |
bf2a35e5 | 363 | ARCHNAME = MSWin32-$(ARCHITECTURE)-multi |
1e71036e JH |
364 | .ELSE |
365 | .IF "$(USE_PERLIO)" == "define" | |
bf2a35e5 | 366 | ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio |
1e71036e | 367 | .ELSE |
bf2a35e5 | 368 | ARCHNAME = MSWin32-$(ARCHITECTURE) |
1e71036e | 369 | .ENDIF |
1e71036e JH |
370 | .ENDIF |
371 | ||
43d4c9a3 SH |
372 | .IF "$(USE_PERLIO)" == "define" |
373 | BUILDOPT += -DUSE_PERLIO | |
374 | .ENDIF | |
375 | ||
1e71036e JH |
376 | .IF "$(USE_ITHREADS)" == "define" |
377 | ARCHNAME !:= $(ARCHNAME)-thread | |
378 | .ENDIF | |
379 | ||
1f64ae15 SH |
380 | .IF "$(WIN64)" != "define" |
381 | .IF "$(USE_64_BIT_INT)" == "define" | |
382 | ARCHNAME !:= $(ARCHNAME)-64int | |
383 | .ENDIF | |
384 | .ENDIF | |
385 | ||
1e71036e JH |
386 | ARCHDIR = ..\lib\$(ARCHNAME) |
387 | COREDIR = ..\lib\CORE | |
388 | AUTODIR = ..\lib\auto | |
389 | LIBDIR = ..\lib | |
390 | EXTDIR = ..\ext | |
a193a2db | 391 | DISTDIR = ..\dist |
83d5895a | 392 | CPANDIR = ..\cpan |
1e71036e | 393 | PODDIR = ..\pod |
b4a41557 | 394 | HTMLDIR = .\html |
1e71036e JH |
395 | |
396 | # | |
397 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin | |
398 | INST_BIN = $(INST_SCRIPT)$(INST_ARCH) | |
399 | INST_LIB = $(INST_TOP)$(INST_VER)\lib | |
400 | INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) | |
401 | INST_COREDIR = $(INST_ARCHLIB)\CORE | |
1e71036e JH |
402 | INST_HTML = $(INST_TOP)$(INST_VER)\html |
403 | ||
404 | # | |
405 | # Programs to compile, build .lib files and link | |
406 | # | |
407 | ||
408 | .USESHELL : | |
409 | ||
378eeda7 | 410 | .IF "$(CCTYPE)" == "GCC" |
1e71036e | 411 | |
fa58a56f S |
412 | .IF "$(GCCCROSS)" == "define" |
413 | ARCHPREFIX = x86_64-w64-mingw32- | |
414 | .ENDIF | |
415 | ||
416 | CC = $(ARCHPREFIX)gcc | |
417 | LINK32 = $(ARCHPREFIX)g++ | |
418 | LIB32 = $(ARCHPREFIX)ar rc | |
419 | IMPLIB = $(ARCHPREFIX)dlltool | |
420 | RSC = $(ARCHPREFIX)windres | |
1e71036e JH |
421 | |
422 | i = .i | |
423 | o = .o | |
424 | a = .a | |
425 | ||
426 | # | |
427 | # Options | |
428 | # | |
429 | ||
430 | INCLUDES = -I.\include -I. -I.. -I$(COREDIR) | |
9cef8306 | 431 | DEFINES = -DWIN32 |
fa58a56f S |
432 | .IF "$(WIN64)" == "define" |
433 | DEFINES += -DWIN64 -DCONSERVATIVE | |
434 | .ENDIF | |
1e71036e JH |
435 | LOCDEFS = -DPERLDLL -DPERL_CORE |
436 | SUBSYS = console | |
437 | CXX_FLAG = -xc++ | |
438 | ||
679b67fe JD |
439 | # Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link |
440 | # correctly if -lmsvcrt is specified explicitly. | |
441 | LIBC = | |
442 | #LIBC = -lmsvcrt | |
1e71036e JH |
443 | |
444 | # same libs as MSVC | |
9cef8306 | 445 | LIBFILES = $(LIBC) \ |
1e71036e JH |
446 | -lmoldname -lkernel32 -luser32 -lgdi32 \ |
447 | -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \ | |
036c1c1e | 448 | -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \ |
4ebea3c6 | 449 | -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 |
1e71036e JH |
450 | |
451 | .IF "$(CFG)" == "Debug" | |
452 | OPTIMIZE = -g -O2 -DDEBUGGING | |
453 | LINK_DBG = -g | |
454 | .ELSE | |
ec25c072 SH |
455 | OPTIMIZE = -s -O2 |
456 | LINK_DBG = -s | |
1e71036e JH |
457 | .ENDIF |
458 | ||
bb275e72 | 459 | EXTRACFLAGS = |
fdb5f000 | 460 | CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) |
1e71036e JH |
461 | LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" |
462 | OBJOUT_FLAG = -o | |
463 | EXEOUT_FLAG = -o | |
464 | LIBOUT_FLAG = | |
465 | ||
9b1f1815 | 466 | BUILDOPT += -fno-strict-aliasing -mms-bitfields |
1e71036e JH |
467 | |
468 | .ELSE | |
469 | ||
5398666e SH |
470 | # All but the free version of VC++ 7.x can load DLLs on demand. Makes the test |
471 | # suite run in about 10% less time. | |
472 | .IF "$(CCTYPE)" != "MSVC70FREE" | |
473 | DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib | |
474 | .ENDIF | |
475 | ||
476 | # Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and | |
477 | # DLLs. These either need copying everywhere with the binaries, or else need | |
478 | # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For | |
479 | # simplicity, embed them if they exist (and delete them afterwards so that they | |
480 | # don't get installed too). | |
481 | EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \ | |
482 | if exist $@.manifest del $@.manifest | |
483 | EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \ | |
484 | if exist $@.manifest del $@.manifest | |
485 | ||
486 | # Most relevant compiler-specific options fall into two groups: | |
487 | # either pre-MSVC80 or MSVC80 onwards, so define a macro for this. | |
488 | .IF "$(CCTYPE)" == "MSVC60" || \ | |
489 | "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE" | |
490 | PREMSVC80 = define | |
491 | .ELSE | |
492 | PREMSVC80 = undef | |
493 | .ENDIF | |
494 | ||
a2b08671 | 495 | .IF "$(__ICC)" != "define" |
1e71036e JH |
496 | CC = cl |
497 | LINK32 = link | |
a2b08671 SH |
498 | .ELSE |
499 | CC = icl | |
500 | LINK32 = xilink | |
501 | .ENDIF | |
1e71036e JH |
502 | LIB32 = $(LINK32) -lib |
503 | RSC = rc | |
504 | ||
505 | # | |
506 | # Options | |
507 | # | |
508 | ||
509 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. | |
510 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX | |
9cef8306 | 511 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT |
1e71036e JH |
512 | LOCDEFS = -DPERLDLL -DPERL_CORE |
513 | SUBSYS = console | |
a7d225ec | 514 | CXX_FLAG = -TP -EHsc |
1e71036e | 515 | |
1e71036e | 516 | LIBC = msvcrt.lib |
1e71036e | 517 | |
1e71036e | 518 | .IF "$(CFG)" == "Debug" |
2a46176f | 519 | OPTIMIZE = -Od -MD -Zi -DDEBUGGING |
c623ac67 | 520 | LINK_DBG = -debug |
1e71036e | 521 | .ELSE |
00a13560 SH |
522 | # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64 |
523 | OPTIMIZE = -O1 -MD -Zi -DNDEBUG | |
ec25c072 SH |
524 | # we enable debug symbols in release builds also |
525 | LINK_DBG = -debug -opt:ref,icf | |
526 | # you may want to enable this if you want COFF symbols in the executables | |
527 | # in addition to the PDB symbols. The default Dr. Watson that ships with | |
528 | # Windows can use the the former but not latter. The free WinDbg can be | |
529 | # installed to get better stack traces from just the PDB symbols, so we | |
530 | # avoid the bloat of COFF symbols by default. | |
531 | #LINK_DBG = $(LINK_DBG) -debugtype:both | |
a9e3f359 | 532 | .IF "$(CCTYPE)" != "MSVC60" |
d921a5fb | 533 | # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG) |
00a13560 | 534 | OPTIMIZE += -GL |
d921a5fb | 535 | LINK_DBG += -ltcg |
a9e3f359 | 536 | LIB_FLAGS = -ltcg |
1e71036e | 537 | .ENDIF |
1e71036e JH |
538 | .ENDIF |
539 | ||
c623ac67 GS |
540 | .IF "$(WIN64)" == "define" |
541 | DEFINES += -DWIN64 -DCONSERVATIVE | |
2a46176f | 542 | OPTIMIZE += -fp:precise |
da2c7419 | 543 | .ENDIF |
c5b31784 | 544 | |
5398666e | 545 | # For now, silence warnings from VC++ 8.x onwards about "unsafe" CRT functions |
4a3cf07b | 546 | # and POSIX CRT function names being deprecated. |
5398666e | 547 | .IF "$(PREMSVC80)" == "undef" |
26a6faa8 | 548 | DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE |
c5b31784 | 549 | .ENDIF |
da2c7419 | 550 | |
2a46176f SH |
551 | # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to |
552 | # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T | |
553 | # preprocessor option to revert back to the old functionality for | |
554 | # backward compatibility. We define this symbol here for older 32-bit | |
555 | # compilers only (which aren't using it at all) for the sole purpose | |
556 | # of getting it into $Config{ccflags}. That way if someone builds | |
557 | # Perl itself with e.g. VC6 but later installs an XS module using VC8 | |
558 | # the time_t types will still be compatible. | |
559 | .IF "$(WIN64)" == "undef" | |
5398666e | 560 | .IF "$(PREMSVC80)" == "define" |
2a46176f SH |
561 | BUILDOPT += -D_USE_32BIT_TIME_T |
562 | .ENDIF | |
563 | .ENDIF | |
564 | ||
9cef8306 | 565 | LIBBASEFILES = \ |
1e71036e JH |
566 | oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ |
567 | comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ | |
036c1c1e | 568 | netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \ |
6b1226db | 569 | version.lib odbc32.lib odbccp32.lib comctl32.lib |
c623ac67 | 570 | |
a2b08671 SH |
571 | # Avoid __intel_new_proc_init link error for libircmt. |
572 | # libmmd is /MD equivelent, other variants exist. | |
573 | # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99, | |
574 | # and optimized C89 funcs | |
575 | .IF "$(__ICC)" == "define" | |
576 | LIBBASEFILES += libircmt.lib libmmd.lib | |
577 | .ENDIF | |
578 | ||
2a46176f SH |
579 | # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which |
580 | # doesn't include the buffer overrun verification code used by the /GS switch. | |
9453ddcd | 581 | # Since the code links against libraries that are compiled with /GS, this |
2a46176f SH |
582 | # "security cookie verification" code must be included via bufferoverflow.lib. |
583 | .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1" | |
d5415745 | 584 | LIBBASEFILES += bufferoverflowU.lib |
c623ac67 | 585 | .ENDIF |
1e71036e | 586 | |
1e71036e JH |
587 | LIBFILES = $(LIBBASEFILES) $(LIBC) |
588 | ||
9453ddcd | 589 | EXTRACFLAGS = -nologo -GF -W3 |
bb275e72 | 590 | CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
1e71036e JH |
591 | $(PCHFLAGS) $(OPTIMIZE) |
592 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ | |
593 | -libpath:"$(INST_COREDIR)" \ | |
594 | -machine:$(PROCESSOR_ARCHITECTURE) | |
a9e3f359 | 595 | LIB_FLAGS = $(LIB_FLAGS) -nologo |
1e71036e JH |
596 | OBJOUT_FLAG = -Fo |
597 | EXEOUT_FLAG = -Fe | |
598 | LIBOUT_FLAG = /out: | |
599 | ||
1e71036e JH |
600 | .ENDIF |
601 | ||
1e71036e JH |
602 | CFLAGS_O = $(CFLAGS) $(BUILDOPT) |
603 | ||
5398666e | 604 | .IF "$(PREMSVC80)" == "undef" |
5e863249 | 605 | LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" |
4ebea3c6 JD |
606 | .ELSE |
607 | RSC_FLAGS = -DINCLUDE_MANIFEST | |
608 | .ENDIF | |
609 | ||
610 | ||
1e71036e JH |
611 | # used to allow local linking flags that are not propogated into Config.pm, |
612 | # currently unused | |
613 | # -- BKS, 12-12-1999 | |
614 | PRIV_LINK_FLAGS *= | |
615 | BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) | |
616 | ||
617 | #################### do not edit below this line ####################### | |
618 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## | |
619 | ||
13631a73 SH |
620 | # Some old dmakes (including Sarathy's one at |
621 | # http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip) | |
622 | # don't support logical OR (||) or logical AND (&&) in conditional | |
623 | # expressions and hence don't process this makefile correctly. Determine | |
624 | # whether this is the case so that we can give the user an error message. | |
625 | .IF 1 == 1 || 1 == 1 | |
626 | NEWDMAKE = define | |
66e09d83 | 627 | .ELSE |
13631a73 | 628 | NEWDMAKE = undef |
e54e7e92 SH |
629 | .ENDIF |
630 | ||
1e71036e JH |
631 | o *= .obj |
632 | a *= .lib | |
633 | ||
634 | LKPRE = INPUT ( | |
635 | LKPOST = ) | |
636 | ||
637 | # | |
638 | # Rules | |
639 | # | |
640 | ||
641 | .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res | |
642 | ||
643 | .c$(o): | |
644 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< | |
645 | ||
646 | .c.i: | |
647 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@ | |
648 | ||
649 | .y.c: | |
650 | $(NOOP) | |
651 | ||
652 | $(o).dll: | |
378eeda7 | 653 | .IF "$(CCTYPE)" == "GCC" |
1e71036e JH |
654 | $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES) |
655 | $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@ | |
656 | .ELSE | |
657 | $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ | |
658 | -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL) | |
c8e599d3 | 659 | $(EMBED_DLL_MANI) |
1e71036e JH |
660 | .ENDIF |
661 | ||
662 | .rc.res: | |
770c139a | 663 | .IF "$(CCTYPE)" == "GCC" |
4ebea3c6 | 664 | $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@ |
770c139a | 665 | .ELSE |
4ebea3c6 | 666 | $(RSC) -i.. -DINCLUDE_MANIFEST $< |
770c139a | 667 | .ENDIF |
1e71036e JH |
668 | |
669 | # | |
670 | # various targets | |
671 | MINIPERL = ..\miniperl.exe | |
672 | MINIDIR = .\mini | |
673 | PERLEXE = ..\perl.exe | |
674 | WPERLEXE = ..\wperl.exe | |
ed2eab3f | 675 | PERLEXESTATIC = ..\perl-static.exe |
cc0b589a | 676 | STATICDIR = .\static.tmp |
1e71036e | 677 | GLOBEXE = ..\perlglob.exe |
2d9d8159 | 678 | CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl |
1e71036e | 679 | X2P = ..\x2p\a2p.exe |
202d1001 | 680 | GENUUDMAP = ..\generate_uudmap.exe |
eb4420e6 | 681 | .IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define" |
ed2eab3f SH |
682 | PERLSTATIC = static |
683 | .ELSE | |
684 | PERLSTATIC = | |
685 | .ENDIF | |
1e71036e | 686 | |
ca12659b | 687 | # Unicode data files generated by mktables |
3df51b85 | 688 | UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \ |
7ebf06b3 | 689 | ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \ |
1a234f2b | 690 | ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \ |
3e344d15 | 691 | ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst |
ca12659b NC |
692 | |
693 | # Directories of Unicode data files generated by mktables | |
27a8011f SH |
694 | UNIDATADIR1 = ..\lib\unicore\To |
695 | UNIDATADIR2 = ..\lib\unicore\lib | |
ca12659b | 696 | |
4ebea3c6 | 697 | PERLEXE_MANIFEST= .\perlexe.manifest |
3890b58f RGS |
698 | PERLEXE_ICO = .\perlexe.ico |
699 | PERLEXE_RES = .\perlexe.res | |
700 | PERLDLL_RES = | |
701 | ||
1e71036e JH |
702 | # Nominate a target which causes extensions to be re-built |
703 | # This used to be $(PERLEXE), but at worst it is the .dll that they depend | |
704 | # on and really only the interface - i.e. the .def file used to export symbols | |
705 | # from the .dll | |
706 | PERLDEP = perldll.def | |
707 | ||
708 | ||
709 | PL2BAT = bin\pl2bat.pl | |
1e71036e JH |
710 | |
711 | UTILS = \ | |
712 | ..\utils\h2ph \ | |
713 | ..\utils\splain \ | |
1e71036e JH |
714 | ..\utils\perlbug \ |
715 | ..\utils\pl2pm \ | |
716 | ..\utils\c2ph \ | |
827a599d | 717 | ..\utils\pstruct \ |
1e71036e JH |
718 | ..\utils\h2xs \ |
719 | ..\utils\perldoc \ | |
1e71036e JH |
720 | ..\utils\perlivp \ |
721 | ..\utils\libnetcfg \ | |
827a599d GS |
722 | ..\utils\enc2xs \ |
723 | ..\utils\piconv \ | |
bb4e9162 | 724 | ..\utils\config_data \ |
18a1cebe | 725 | ..\utils\corelist \ |
83cd6e83 | 726 | ..\utils\cpan \ |
ea0e987d | 727 | ..\utils\xsubpp \ |
d658129c | 728 | ..\utils\pod2html \ |
4b618757 | 729 | ..\utils\prove \ |
291d3373 | 730 | ..\utils\ptar \ |
b8669316 | 731 | ..\utils\ptardiff \ |
deabda19 | 732 | ..\utils\ptargrep \ |
08ad9465 | 733 | ..\utils\zipdetails \ |
3ddf9550 | 734 | ..\utils\shasum \ |
ea0e987d | 735 | ..\utils\instmodsh \ |
84f04405 | 736 | ..\utils\json_pp \ |
1e71036e | 737 | ..\x2p\find2perl \ |
827a599d | 738 | ..\x2p\psed \ |
1e71036e | 739 | ..\x2p\s2p \ |
1e71036e JH |
740 | bin\exetype.pl \ |
741 | bin\runperl.pl \ | |
742 | bin\pl2bat.pl \ | |
743 | bin\perlglob.pl \ | |
744 | bin\search.pl | |
745 | ||
378eeda7 | 746 | .IF "$(CCTYPE)" == "GCC" |
1e71036e JH |
747 | |
748 | CFGSH_TMPL = config.gc | |
749 | CFGH_TMPL = config_H.gc | |
f7cf42bb RS |
750 | PERLIMPLIB = ..\libperl519$(a) |
751 | PERLSTATICLIB = ..\libperl519s$(a) | |
1f64ae15 SH |
752 | INT64 = long long |
753 | INT64f = ll | |
1e71036e JH |
754 | |
755 | .ELSE | |
756 | ||
757 | CFGSH_TMPL = config.vc | |
758 | CFGH_TMPL = config_H.vc | |
1f64ae15 SH |
759 | INT64 = __int64 |
760 | INT64f = I64 | |
1e71036e JH |
761 | |
762 | .ENDIF | |
763 | ||
764 | # makedef.pl must be updated if this changes, and this should normally | |
765 | # only change when there is an incompatible revision of the public API. | |
f7cf42bb RS |
766 | PERLIMPLIB *= ..\perl519$(a) |
767 | PERLSTATICLIB *= ..\perl519s$(a) | |
768 | PERLDLL = ..\perl519.dll | |
1e71036e | 769 | |
b6ed7314 YO |
770 | XCOPY = xcopy /f /r /i /d /y |
771 | RCOPY = xcopy /f /r /i /e /d /y | |
65980d94 | 772 | NOOP = @rem |
1e71036e | 773 | |
1e71036e JH |
774 | MICROCORE_SRC = \ |
775 | ..\av.c \ | |
0f8f167c | 776 | ..\caretx.c \ |
1e71036e JH |
777 | ..\deb.c \ |
778 | ..\doio.c \ | |
779 | ..\doop.c \ | |
780 | ..\dump.c \ | |
781 | ..\globals.c \ | |
782 | ..\gv.c \ | |
e1a479c5 | 783 | ..\mro.c \ |
1e71036e JH |
784 | ..\hv.c \ |
785 | ..\locale.c \ | |
26ea9e12 | 786 | ..\keywords.c \ |
a0d89a74 | 787 | ..\mathoms.c \ |
1e71036e JH |
788 | ..\mg.c \ |
789 | ..\numeric.c \ | |
790 | ..\op.c \ | |
ff6de8cd | 791 | ..\pad.c \ |
1e71036e JH |
792 | ..\perl.c \ |
793 | ..\perlapi.c \ | |
794 | ..\perly.c \ | |
795 | ..\pp.c \ | |
796 | ..\pp_ctl.c \ | |
797 | ..\pp_hot.c \ | |
798 | ..\pp_pack.c \ | |
84d4ea48 | 799 | ..\pp_sort.c \ |
1e71036e | 800 | ..\pp_sys.c \ |
10bc17b6 | 801 | ..\reentr.c \ |
1e71036e JH |
802 | ..\regcomp.c \ |
803 | ..\regexec.c \ | |
804 | ..\run.c \ | |
805 | ..\scope.c \ | |
806 | ..\sv.c \ | |
807 | ..\taint.c \ | |
808 | ..\toke.c \ | |
809 | ..\universal.c \ | |
810 | ..\utf8.c \ | |
48462a74 | 811 | ..\util.c |
1e71036e JH |
812 | |
813 | EXTRACORE_SRC += perllib.c | |
814 | ||
815 | .IF "$(PERL_MALLOC)" == "define" | |
816 | EXTRACORE_SRC += ..\malloc.c | |
817 | .ENDIF | |
818 | ||
1e71036e | 819 | EXTRACORE_SRC += ..\perlio.c |
1e71036e JH |
820 | |
821 | WIN32_SRC = \ | |
822 | .\win32.c \ | |
1e71036e | 823 | .\win32sck.c \ |
9cef8306 JD |
824 | .\win32thread.c \ |
825 | .\fcrypt.c | |
1e71036e | 826 | |
b6d604f4 NIS |
827 | # We need this for miniperl build unless we override canned |
828 | # config.h #define building mini\* | |
829 | #.IF "$(USE_PERLIO)" == "define" | |
6ea0e807 | 830 | WIN32_SRC += .\win32io.c |
b6d604f4 | 831 | #.ENDIF |
6ea0e807 | 832 | |
1e71036e JH |
833 | X2P_SRC = \ |
834 | ..\x2p\a2p.c \ | |
835 | ..\x2p\hash.c \ | |
836 | ..\x2p\str.c \ | |
837 | ..\x2p\util.c \ | |
838 | ..\x2p\walk.c | |
839 | ||
840 | CORE_NOCFG_H = \ | |
841 | ..\av.h \ | |
842 | ..\cop.h \ | |
843 | ..\cv.h \ | |
844 | ..\dosish.h \ | |
845 | ..\embed.h \ | |
846 | ..\form.h \ | |
847 | ..\gv.h \ | |
848 | ..\handy.h \ | |
849 | ..\hv.h \ | |
15128012 | 850 | ..\hv_func.h \ |
1e71036e JH |
851 | ..\iperlsys.h \ |
852 | ..\mg.h \ | |
853 | ..\nostdio.h \ | |
854 | ..\op.h \ | |
855 | ..\opcode.h \ | |
856 | ..\perl.h \ | |
857 | ..\perlapi.h \ | |
858 | ..\perlsdio.h \ | |
1e71036e JH |
859 | ..\perly.h \ |
860 | ..\pp.h \ | |
861 | ..\proto.h \ | |
cdb0f547 | 862 | ..\regcomp.h \ |
1e71036e JH |
863 | ..\regexp.h \ |
864 | ..\scope.h \ | |
865 | ..\sv.h \ | |
866 | ..\thread.h \ | |
867 | ..\unixish.h \ | |
868 | ..\utf8.h \ | |
869 | ..\util.h \ | |
870 | ..\warnings.h \ | |
871 | ..\XSUB.h \ | |
872 | ..\EXTERN.h \ | |
873 | ..\perlvars.h \ | |
874 | ..\intrpvar.h \ | |
1e71036e JH |
875 | .\include\dirent.h \ |
876 | .\include\netdb.h \ | |
c44e86c9 | 877 | .\include\sys\errno2.h \ |
1e71036e JH |
878 | .\include\sys\socket.h \ |
879 | .\win32.h | |
880 | ||
a148edb6 | 881 | CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h |
1e71036e | 882 | |
202d1001 | 883 | UUDMAP_H = ..\uudmap.h |
efa50c51 | 884 | BITCOUNT_H = ..\bitcount.h |
6f83ef0e | 885 | MG_DATA_H = ..\mg_data.h |
9387abf8 | 886 | GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H) |
202d1001 | 887 | |
1e71036e JH |
888 | MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o)) |
889 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o)) | |
890 | WIN32_OBJ = $(WIN32_SRC:db:+$(o)) | |
891 | MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)} | |
ba14dd9a | 892 | MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)} |
1e71036e | 893 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) |
281da5ea | 894 | DLL_OBJ = $(DYNALOADER) |
1e71036e | 895 | X2P_OBJ = $(X2P_SRC:db:+$(o)) |
202d1001 | 896 | GENUUDMAP_OBJ = $(GENUUDMAP:db:+$(o)) |
1e71036e JH |
897 | |
898 | PERLDLL_OBJ = $(CORE_OBJ) | |
899 | PERLEXE_OBJ = perlmain$(o) | |
ed2eab3f | 900 | PERLEXEST_OBJ = perlmainst$(o) |
1e71036e JH |
901 | |
902 | PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ) | |
903 | ||
904 | .IF "$(USE_SETARGV)" != "" | |
905 | SETARGV_OBJ = setargv$(o) | |
906 | .ENDIF | |
907 | ||
a1f2e719 VK |
908 | .IF "$(ALL_STATIC)" == "define" |
909 | # some exclusions, unfortunately, until fixed: | |
903f2d70 | 910 | # - MakeMaker isn't capable enough for SDBM_File (small bug) |
13cedc2a | 911 | STATIC_EXT = * !SDBM_File |
a1f2e719 VK |
912 | .ELSE |
913 | # specify static extensions here, for example: | |
7a278470 SH |
914 | # (be sure to include Win32CORE to load Win32 on demand) |
915 | #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib | |
78ff2d7b | 916 | STATIC_EXT = Win32CORE |
a1f2e719 | 917 | .ENDIF |
1e71036e | 918 | |
281da5ea | 919 | DYNALOADER = ..\DynaLoader$(o) |
1e71036e | 920 | |
1e71036e JH |
921 | # vars must be separated by "\t+~\t+", since we're using the tempfile |
922 | # version of config_sh.pl (we were overflowing someone's buffer by | |
923 | # trying to fit them all on the command line) | |
924 | # -- BKS 10-17-1999 | |
925 | CFG_VARS = \ | |
13631a73 SH |
926 | INST_TOP=$(INST_TOP) ~ \ |
927 | INST_VER=$(INST_VER) ~ \ | |
1e71036e JH |
928 | INST_ARCH=$(INST_ARCH) ~ \ |
929 | archname=$(ARCHNAME) ~ \ | |
930 | cc=$(CC) ~ \ | |
931 | ld=$(LINK32) ~ \ | |
bb275e72 | 932 | ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \ |
1e71036e | 933 | cf_email=$(EMAIL) ~ \ |
1e71036e JH |
934 | d_mymalloc=$(PERL_MALLOC) ~ \ |
935 | libs=$(LIBFILES:f) ~ \ | |
13631a73 | 936 | incpath=$(CCINCDIR) ~ \ |
1e71036e | 937 | libperl=$(PERLIMPLIB:f) ~ \ |
13631a73 | 938 | libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \ |
1e71036e JH |
939 | libc=$(LIBC) ~ \ |
940 | make=dmake ~ \ | |
84c322f7 MB |
941 | _o=$(o) ~ \ |
942 | obj_ext=$(o) ~ \ | |
943 | _a=$(a) ~ \ | |
944 | lib_ext=$(a) ~ \ | |
1e71036e | 945 | static_ext=$(STATIC_EXT) ~ \ |
7e0017d3 | 946 | usethreads=$(USE_ITHREADS) ~ \ |
1e71036e | 947 | useithreads=$(USE_ITHREADS) ~ \ |
1e71036e JH |
948 | usemultiplicity=$(USE_MULTI) ~ \ |
949 | useperlio=$(USE_PERLIO) ~ \ | |
1f64ae15 | 950 | use64bitint=$(USE_64_BIT_INT) ~ \ |
c7dd62f6 | 951 | uselargefiles=$(USE_LARGE_FILES) ~ \ |
7ada00a0 | 952 | usesitecustomize=$(USE_SITECUST) ~ \ |
13631a73 | 953 | LINK_FLAGS=$(LINK_FLAGS) ~ \ |
7bef440c | 954 | optimize=$(OPTIMIZE) ~ \ |
1f64ae15 SH |
955 | ARCHPREFIX=$(ARCHPREFIX) ~ \ |
956 | WIN64=$(WIN64) | |
1e71036e | 957 | |
1e71036e JH |
958 | # |
959 | # Top targets | |
960 | # | |
961 | ||
7c3b4d00 | 962 | all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \ |
7b4d95f7 | 963 | $(CONFIGPM) $(UNIDATAFILES) MakePPPort \ |
a34ce875 | 964 | $(PERLEXE) $(X2P) Extensions Extensions_nonxs $(PERLSTATIC) |
1e71036e | 965 | |
c900f745 SH |
966 | regnodes : ..\regnodes.h |
967 | ||
5b04aee6 | 968 | ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h |
9ce5b024 SH |
969 | |
970 | ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h | |
971 | ||
7c3b4d00 | 972 | reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \ |
7b4d95f7 | 973 | $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \ |
250c5aad SH |
974 | $(X2P) Extensions_reonly |
975 | ||
ed2eab3f SH |
976 | static: $(PERLEXESTATIC) |
977 | ||
1e71036e JH |
978 | #---------------------------------------------------------------- |
979 | ||
13631a73 SH |
980 | CHECKDMAKE : |
981 | .IF "$(NEWDMAKE)" == "define" | |
982 | $(NOOP) | |
983 | .ELSE | |
984 | @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions. | |
985 | @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/ | |
986 | @exit 1 | |
987 | .ENDIF | |
988 | ||
1e71036e | 989 | $(GLOBEXE) : perlglob$(o) |
378eeda7 | 990 | .IF "$(CCTYPE)" == "GCC" |
1e71036e JH |
991 | $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES) |
992 | .ELSE | |
993 | $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ | |
994 | perlglob$(o) setargv$(o) | |
c8e599d3 | 995 | $(EMBED_EXE_MANI) |
1e71036e JH |
996 | .ENDIF |
997 | ||
998 | perlglob$(o) : perlglob.c | |
999 | ||
1000 | config.w32 : $(CFGSH_TMPL) | |
1001 | copy $(CFGSH_TMPL) config.w32 | |
1002 | ||
1f64ae15 SH |
1003 | # |
1004 | # Copy the template config.h and set configurables at the end of it | |
1005 | # as per the options chosen and compiler used. | |
1006 | # Note: This config.h is only used to build miniperl.exe anyway, but | |
1007 | # it's as well to have its options correct to be sure that it builds | |
1008 | # and so that it's "-V" options are correct for use by makedef.pl. The | |
1009 | # real config.h used to build perl.exe is generated from the top-level | |
1010 | # config_h.SH by config_h.PL (run by miniperl.exe). | |
1011 | # | |
1e71036e JH |
1012 | .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H) |
1013 | -del /f config.h | |
1014 | copy $(CFGH_TMPL) config.h | |
1f64ae15 SH |
1015 | @echo.>>$@ |
1016 | @echo #ifndef _config_h_footer_>>$@ | |
1017 | @echo #define _config_h_footer_>>$@ | |
1018 | @echo #undef PTRSIZE>>$@ | |
1019 | @echo #undef SSize_t>>$@ | |
1020 | @echo #undef HAS_ATOLL>>$@ | |
1021 | @echo #undef HAS_STRTOLL>>$@ | |
1022 | @echo #undef HAS_STRTOULL>>$@ | |
1023 | @echo #undef IVTYPE>>$@ | |
1024 | @echo #undef UVTYPE>>$@ | |
1025 | @echo #undef IVSIZE>>$@ | |
1026 | @echo #undef UVSIZE>>$@ | |
1027 | @echo #undef NV_PRESERVES_UV>>$@ | |
1028 | @echo #undef NV_PRESERVES_UV_BITS>>$@ | |
1029 | @echo #undef IVdf>>$@ | |
1030 | @echo #undef UVuf>>$@ | |
1031 | @echo #undef UVof>>$@ | |
1032 | @echo #undef UVxf>>$@ | |
1033 | @echo #undef UVXf>>$@ | |
1034 | @echo #undef USE_64_BIT_INT>>$@ | |
1035 | @echo #undef Size_t_size>>$@ | |
1036 | .IF "$(WIN64)"=="define" | |
1037 | @echo #define PTRSIZE ^8>>$@ | |
1038 | @echo #define SSize_t $(INT64)>>$@ | |
1039 | @echo #define HAS_ATOLL>>$@ | |
1040 | @echo #define HAS_STRTOLL>>$@ | |
1041 | @echo #define HAS_STRTOULL>>$@ | |
1042 | @echo #define Size_t_size ^8>>$@ | |
1043 | .ELSE | |
1044 | @echo #define PTRSIZE ^4>>$@ | |
1045 | @echo #define SSize_t int>>$@ | |
1046 | @echo #undef HAS_ATOLL>>$@ | |
1047 | @echo #undef HAS_STRTOLL>>$@ | |
1048 | @echo #undef HAS_STRTOULL>>$@ | |
1049 | @echo #define Size_t_size ^4>>$@ | |
1050 | .ENDIF | |
1051 | .IF "$(USE_64_BIT_INT)"=="define" | |
1052 | @echo #define IVTYPE $(INT64)>>$@ | |
1053 | @echo #define UVTYPE unsigned $(INT64)>>$@ | |
1054 | @echo #define IVSIZE ^8>>$@ | |
1055 | @echo #define UVSIZE ^8>>$@ | |
1056 | @echo #undef NV_PRESERVES_UV>>$@ | |
1057 | @echo #define NV_PRESERVES_UV_BITS 53>>$@ | |
1058 | @echo #define IVdf "$(INT64f)d">>$@ | |
1059 | @echo #define UVuf "$(INT64f)u">>$@ | |
1060 | @echo #define UVof "$(INT64f)o">>$@ | |
1061 | @echo #define UVxf "$(INT64f)x">>$@ | |
1062 | @echo #define UVXf "$(INT64f)X">>$@ | |
1063 | @echo #define USE_64_BIT_INT>>$@ | |
1064 | .ELSE | |
1065 | @echo #define IVTYPE long>>$@ | |
1066 | @echo #define UVTYPE unsigned long>>$@ | |
1067 | @echo #define IVSIZE ^4>>$@ | |
1068 | @echo #define UVSIZE ^4>>$@ | |
1069 | @echo #define NV_PRESERVES_UV>>$@ | |
1070 | @echo #define NV_PRESERVES_UV_BITS 32>>$@ | |
1071 | @echo #define IVdf "ld">>$@ | |
1072 | @echo #define UVuf "lu">>$@ | |
1073 | @echo #define UVof "lo">>$@ | |
1074 | @echo #define UVxf "lx">>$@ | |
1075 | @echo #define UVXf "lX">>$@ | |
1076 | @echo #undef USE_64_BIT_INT>>$@ | |
1077 | .ENDIF | |
1078 | @echo #endif>>$@ | |
1e71036e | 1079 | |
fcd65f8d | 1080 | ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl |
16ad9bfa | 1081 | cd .. && miniperl -Ilib make_patchnum.pl |
a148edb6 | 1082 | |
931482b7 NC |
1083 | # make sure that we recompile perl.c if the git version changes |
1084 | ..\perl$(o) : ..\git_version.h | |
a148edb6 | 1085 | |
1e71036e JH |
1086 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm |
1087 | $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \ | |
1088 | $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh | |
1089 | ||
1f64ae15 SH |
1090 | # This target is for when changes to the main config.sh happen. |
1091 | # Edit config.gc, then make perl using GCC in a minimal configuration (i.e. | |
3d39cce8 | 1092 | # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make |
76febb1c | 1093 | # this target to regenerate config_H.gc. |
1e71036e | 1094 | regen_config_h: |
76febb1c | 1095 | $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \ |
1e71036e | 1096 | $(CFGSH_TMPL) > ..\config.sh |
4e73d6a4 | 1097 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
1e71036e | 1098 | -del /f $(CFGH_TMPL) |
f6b3c354 | 1099 | -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" |
1e71036e JH |
1100 | rename config.h $(CFGH_TMPL) |
1101 | ||
7b4d95f7 | 1102 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL |
4e73d6a4 | 1103 | $(MINIPERL) -I..\lib ..\configpm --chdir=.. |
1e71036e JH |
1104 | if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) |
1105 | $(XCOPY) ..\*.h $(COREDIR)\*.* | |
1106 | $(XCOPY) *.h $(COREDIR)\*.* | |
1e71036e | 1107 | $(RCOPY) include $(COREDIR)\*.* |
f6b3c354 | 1108 | $(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \ |
1e71036e JH |
1109 | || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE) |
1110 | ||
cb251201 NC |
1111 | # See the comment in Makefile.SH explaining this seemingly cranky ordering |
1112 | $(MINIPERL) : ..\lib\buildcustomize.pl | |
5e4c4c91 | 1113 | |
cb251201 | 1114 | ..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl |
378eeda7 | 1115 | .IF "$(CCTYPE)" == "GCC" |
cb251201 | 1116 | $(LINK32) -v -mconsole -o $(MINIPERL) $(BLINK_FLAGS) \ |
13631a73 | 1117 | $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST)) |
1e71036e | 1118 | .ELSE |
cb251201 | 1119 | $(LINK32) -subsystem:console -out:$(MINIPERL) $(BLINK_FLAGS) \ |
19253ae6 | 1120 | @$(mktmp $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ)) |
02bfb73b | 1121 | $(EMBED_EXE_MANI:s/$@/$(MINIPERL)/) |
1e71036e | 1122 | .ENDIF |
b78ac715 | 1123 | $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl .. |
1e71036e JH |
1124 | |
1125 | $(MINIDIR) : | |
1126 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" | |
1127 | ||
1128 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) | |
8c4561fb | 1129 | $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*B).c |
1e71036e JH |
1130 | |
1131 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) | |
a19baa61 | 1132 | $(CC) -c $(CFLAGS) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*B).c |
1e71036e JH |
1133 | |
1134 | # -DPERL_IMPLICIT_SYS needs C++ for perllib.c | |
1135 | # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless | |
1136 | # unless the .IF is true), so instead we use a .ELSE with the default. | |
1137 | # This is the only file that depends on perlhost.h, vmem.h, and vdir.h | |
1138 | ||
1139 | perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h | |
acfe0abc | 1140 | .IF "$(USE_IMP_SYS)" == "define" |
322fd642 | 1141 | $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c |
1e71036e | 1142 | .ELSE |
322fd642 | 1143 | $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c |
1e71036e JH |
1144 | .ENDIF |
1145 | ||
1146 | # 1. we don't want to rebuild miniperl.exe when config.h changes | |
1147 | # 2. we don't want to rebuild miniperl.exe with non-default config.h | |
931482b7 | 1148 | # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it |
1e71036e JH |
1149 | $(MINI_OBJ) : $(CORE_NOCFG_H) |
1150 | ||
1151 | $(WIN32_OBJ) : $(CORE_H) | |
9848074e | 1152 | |
1e71036e | 1153 | $(CORE_OBJ) : $(CORE_H) |
9848074e | 1154 | |
1e71036e | 1155 | $(DLL_OBJ) : $(CORE_H) |
9848074e | 1156 | |
1e71036e JH |
1157 | $(X2P_OBJ) : $(CORE_H) |
1158 | ||
d500e60d | 1159 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl |
c6d234b8 | 1160 | $(MINIPERL) -I..\lib create_perllibst_h.pl |
c1effa61 | 1161 | $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \ |
080c3729 | 1162 | $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def |
1e71036e | 1163 | |
d2b25974 | 1164 | $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static |
378eeda7 | 1165 | .IF "$(CCTYPE)" == "GCC" |
1e71036e | 1166 | $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \ |
13631a73 SH |
1167 | $(mktmp $(LKPRE) $(PERLDLL_OBJ) \ |
1168 | $(shell @type Extensions_static) \ | |
1169 | $(LIBFILES) $(LKPOST)) | |
fa58a56f | 1170 | $(IMPLIB) --output-lib $(PERLIMPLIB) \ |
1e71036e JH |
1171 | --dllname $(PERLDLL:b).dll \ |
1172 | --def perldll.def \ | |
1173 | --base-file perl.base \ | |
1174 | --output-exp perl.exp | |
1175 | $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \ | |
13631a73 SH |
1176 | $(mktmp $(LKPRE) $(PERLDLL_OBJ) \ |
1177 | $(shell @type Extensions_static) \ | |
1178 | $(LIBFILES) perl.exp $(LKPOST)) | |
1e71036e | 1179 | .ELSE |
78d58004 | 1180 | $(LINK32) -dll -def:perldll.def -out:$@ $(BLINK_FLAGS) \ |
9e7cf449 | 1181 | @Extensions_static \ |
78d58004 | 1182 | @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \ |
13631a73 | 1183 | $(PERLDLL_RES) $(PERLDLL_OBJ)) |
c8e599d3 | 1184 | $(EMBED_DLL_MANI) |
1e71036e JH |
1185 | .ENDIF |
1186 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) | |
1187 | ||
cc0b589a | 1188 | $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static |
378eeda7 | 1189 | .IF "$(CCTYPE)" == "GCC" |
b520de4a | 1190 | $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ) |
cc0b589a | 1191 | if exist $(STATICDIR) rmdir /s /q $(STATICDIR) |
b520de4a SH |
1192 | for %i in ($(shell @type Extensions_static)) do \ |
1193 | @mkdir $(STATICDIR) && cd $(STATICDIR) && \ | |
1194 | $(ARCHPREFIX)ar x ..\%i && \ | |
1195 | $(ARCHPREFIX)ar q ..\$@ *$(o) && \ | |
1196 | cd .. && rmdir /s /q $(STATICDIR) | |
ed2eab3f SH |
1197 | .ELSE |
1198 | $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \ | |
13631a73 | 1199 | @$(mktmp $(PERLDLL_OBJ)) |
ed2eab3f SH |
1200 | .ENDIF |
1201 | $(XCOPY) $(PERLSTATICLIB) $(COREDIR) | |
d2b25974 | 1202 | |
4ebea3c6 | 1203 | $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO) |
e84ac4e2 | 1204 | |
1e71036e JH |
1205 | ..\x2p\a2p$(o) : ..\x2p\a2p.c |
1206 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c | |
1207 | ||
1208 | ..\x2p\hash$(o) : ..\x2p\hash.c | |
1209 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c | |
1210 | ||
1211 | ..\x2p\str$(o) : ..\x2p\str.c | |
1212 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c | |
1213 | ||
1214 | ..\x2p\util$(o) : ..\x2p\util.c | |
1215 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c | |
1216 | ||
1217 | ..\x2p\walk$(o) : ..\x2p\walk.c | |
1218 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c | |
1219 | ||
403f501d | 1220 | $(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions |
c1effa61 NC |
1221 | $(MINIPERL) -I..\lib ..\x2p\find2perl.PL |
1222 | $(MINIPERL) -I..\lib ..\x2p\s2p.PL | |
378eeda7 | 1223 | .IF "$(CCTYPE)" == "GCC" |
1e71036e | 1224 | $(LINK32) -v -o $@ $(BLINK_FLAGS) \ |
13631a73 | 1225 | $(mktmp $(LKPRE) $(X2P_OBJ) $(LIBFILES) $(LKPOST)) |
1e71036e | 1226 | .ELSE |
78d58004 | 1227 | $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \ |
13631a73 | 1228 | @$(mktmp $(LIBFILES) $(X2P_OBJ)) |
c8e599d3 | 1229 | $(EMBED_EXE_MANI) |
1e71036e JH |
1230 | .ENDIF |
1231 | ||
9387abf8 | 1232 | $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS) |
9444d213 | 1233 | |
6f83ef0e | 1234 | $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H) |
6999193b NC |
1235 | |
1236 | $(BITCOUNT_H) : $(GENUUDMAP) | |
9387abf8 | 1237 | $(GENUUDMAP) $(GENERATED_HEADERS) |
6f83ef0e NC |
1238 | |
1239 | $(GENUUDMAP_OBJ) : ..\mg_raw.h | |
9444d213 | 1240 | |
202d1001 | 1241 | $(GENUUDMAP) : $(GENUUDMAP_OBJ) |
378eeda7 | 1242 | .IF "$(CCTYPE)" == "GCC" |
9444d213 | 1243 | $(LINK32) -v -o $@ $(BLINK_FLAGS) \ |
13631a73 | 1244 | $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST)) |
9444d213 NC |
1245 | .ELSE |
1246 | $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \ | |
13631a73 | 1247 | @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ)) |
202d1001 | 1248 | $(EMBED_EXE_MANI) |
9444d213 NC |
1249 | .ENDIF |
1250 | ||
1e71036e JH |
1251 | perlmain.c : runperl.c |
1252 | copy runperl.c perlmain.c | |
1253 | ||
1254 | perlmain$(o) : perlmain.c | |
88c9158a | 1255 | $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ -c perlmain.c |
1e71036e | 1256 | |
ed2eab3f SH |
1257 | perlmainst.c : runperl.c |
1258 | copy runperl.c perlmainst.c | |
1259 | ||
1260 | perlmainst$(o) : perlmainst.c | |
88c9158a | 1261 | $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c |
ed2eab3f | 1262 | |
931482b7 | 1263 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) |
378eeda7 | 1264 | .IF "$(CCTYPE)" == "GCC" |
1e71036e | 1265 | $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ |
f721bdf3 | 1266 | $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) |
1e71036e | 1267 | .ELSE |
56a86867 | 1268 | $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \ |
aafd2430 | 1269 | $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ) |
c8e599d3 | 1270 | $(EMBED_EXE_MANI) |
1e71036e JH |
1271 | .ENDIF |
1272 | copy $(PERLEXE) $(WPERLEXE) | |
1273 | $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS | |
1e71036e | 1274 | |
931482b7 | 1275 | $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) |
378eeda7 | 1276 | .IF "$(CCTYPE)" == "GCC" |
ed2eab3f | 1277 | $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ |
aafd2430 | 1278 | $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) |
ed2eab3f | 1279 | .ELSE |
56a86867 | 1280 | $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \ |
aafd2430 | 1281 | $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ) |
ed2eab3f SH |
1282 | $(EMBED_EXE_MANI) |
1283 | .ENDIF | |
1284 | ||
d1a21686 | 1285 | MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs |
f6b3c354 | 1286 | $(MINIPERL) -I..\lib ..\mkppport |
42e07562 | 1287 | |
9dcb9602 | 1288 | #------------------------------------------------------------------------------- |
281da5ea | 1289 | # There's no direct way to mark a dependency on |
6afd19bc | 1290 | # DynaLoader.pm, so this will have to do |
5e4c4c91 | 1291 | Extensions : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER) |
250c5aad | 1292 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1293 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic |
d2b25974 | 1294 | |
5e4c4c91 | 1295 | Extensions_reonly : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER) |
250c5aad | 1296 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1297 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re |
250c5aad | 1298 | |
5e4c4c91 | 1299 | Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) |
250c5aad | 1300 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1301 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static |
c6d234b8 | 1302 | $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static |
1e71036e | 1303 | |
291c8c21 | 1304 | Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod |
a34ce875 | 1305 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
a193a2db | 1306 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs |
a34ce875 | 1307 | |
5e4c4c91 | 1308 | $(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs |
281da5ea NC |
1309 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
1310 | $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader | |
1311 | ||
ba14dd9a | 1312 | Extensions_clean : |
a193a2db | 1313 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean |
1e71036e | 1314 | |
b4dc1df6 | 1315 | Extensions_realclean : |
a193a2db | 1316 | -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean |
b4dc1df6 | 1317 | |
9dcb9602 | 1318 | #------------------------------------------------------------------------------- |
1e71036e JH |
1319 | |
1320 | ||
0195b144 | 1321 | doc: $(PERLEXE) ..\pod\perltoc.pod |
b4a41557 | 1322 | $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \ |
f8dbed5a | 1323 | --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\ |
9b1d99d7 | 1324 | --recurse |
1e71036e | 1325 | |
0827416d NC |
1326 | ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL |
1327 | $(MINIPERL) -I..\lib ..\utils\Makefile.PL .. | |
1328 | ||
b0b6bf2b AT |
1329 | # Note that this next section is parsed (and regenerated) by pod/buildtoc |
1330 | # so please check that script before making structural changes here | |
0827416d | 1331 | utils: $(PERLEXE) $(X2P) ..\utils\Makefile |
1e71036e | 1332 | cd ..\utils && $(MAKE) PERL=$(MINIPERL) |
b0b6bf2b AT |
1333 | copy ..\README.aix ..\pod\perlaix.pod |
1334 | copy ..\README.amiga ..\pod\perlamiga.pod | |
b0b6bf2b AT |
1335 | copy ..\README.bs2000 ..\pod\perlbs2000.pod |
1336 | copy ..\README.ce ..\pod\perlce.pod | |
1337 | copy ..\README.cn ..\pod\perlcn.pod | |
1338 | copy ..\README.cygwin ..\pod\perlcygwin.pod | |
b0b6bf2b | 1339 | copy ..\README.dos ..\pod\perldos.pod |
b0b6bf2b | 1340 | copy ..\README.freebsd ..\pod\perlfreebsd.pod |
9f968a8d | 1341 | copy ..\README.haiku ..\pod\perlhaiku.pod |
b0b6bf2b AT |
1342 | copy ..\README.hpux ..\pod\perlhpux.pod |
1343 | copy ..\README.hurd ..\pod\perlhurd.pod | |
1344 | copy ..\README.irix ..\pod\perlirix.pod | |
1345 | copy ..\README.jp ..\pod\perljp.pod | |
1346 | copy ..\README.ko ..\pod\perlko.pod | |
6477b319 | 1347 | copy ..\README.linux ..\pod\perllinux.pod |
b0b6bf2b AT |
1348 | copy ..\README.macos ..\pod\perlmacos.pod |
1349 | copy ..\README.macosx ..\pod\perlmacosx.pod | |
b0b6bf2b | 1350 | copy ..\README.netware ..\pod\perlnetware.pod |
b0846812 | 1351 | copy ..\README.openbsd ..\pod\perlopenbsd.pod |
b0b6bf2b AT |
1352 | copy ..\README.os2 ..\pod\perlos2.pod |
1353 | copy ..\README.os390 ..\pod\perlos390.pod | |
1354 | copy ..\README.os400 ..\pod\perlos400.pod | |
1355 | copy ..\README.plan9 ..\pod\perlplan9.pod | |
1356 | copy ..\README.qnx ..\pod\perlqnx.pod | |
2f08ed66 | 1357 | copy ..\README.riscos ..\pod\perlriscos.pod |
b0b6bf2b | 1358 | copy ..\README.solaris ..\pod\perlsolaris.pod |
27da23d5 | 1359 | copy ..\README.symbian ..\pod\perlsymbian.pod |
58534900 | 1360 | copy ..\README.synology ..\pod\perlsynology.pod |
b0b6bf2b AT |
1361 | copy ..\README.tru64 ..\pod\perltru64.pod |
1362 | copy ..\README.tw ..\pod\perltw.pod | |
b0b6bf2b AT |
1363 | copy ..\README.vos ..\pod\perlvos.pod |
1364 | copy ..\README.win32 ..\pod\perlwin32.pod | |
03057ffb | 1365 | copy ..\pod\perldelta.pod ..\pod\perl5198delta.pod |
1e71036e | 1366 | $(PERLEXE) $(PL2BAT) $(UTILS) |
f8d6280f | 1367 | $(MINIPERL) -I..\lib ..\autodoc.pl .. |
f556af6c | 1368 | $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q .. |
0195b144 NC |
1369 | |
1370 | ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs | |
b78c1104 | 1371 | $(PERLEXE) -f ..\pod\buildtoc -q |
1e71036e | 1372 | |
b0b6bf2b AT |
1373 | # Note that the pod cleanup in this next section is parsed (and regenerated |
1374 | # by pod/buildtoc so please check that script before making changes here | |
1375 | ||
b4dc1df6 | 1376 | distclean: realclean |
1e71036e | 1377 | -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ |
7b4d95f7 | 1378 | $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB) |
ca67812f SH |
1379 | -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm |
1380 | -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm | |
48462a74 | 1381 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm |
1e71036e | 1382 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm |
a9bf183d | 1383 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm |
1e71036e JH |
1384 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm |
1385 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm | |
1e71036e JH |
1386 | -del /f $(LIBDIR)\File\Glob.pm |
1387 | -del /f $(LIBDIR)\Storable.pm | |
ca67812f | 1388 | -del /f $(LIBDIR)\Sys\Hostname.pm |
1e71036e | 1389 | -del /f $(LIBDIR)\Time\HiRes.pm |
ac5ea531 | 1390 | -del /f $(LIBDIR)\Unicode\Normalize.pm |
4e74047c | 1391 | -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm |
b4ad57f4 | 1392 | -del /f $(LIBDIR)\Win32.pm |
37ca3c28 | 1393 | -del /f $(LIBDIR)\Win32CORE.pm |
00701878 SH |
1394 | -del /f $(LIBDIR)\Win32API\File.pm |
1395 | -del /f $(LIBDIR)\Win32API\File\cFile.pc | |
5e4c4c91 | 1396 | -del /f $(LIBDIR)\buildcustomize.pl |
a85e0e8c | 1397 | -del /f $(DISTDIR)\XSLoader\XSLoader.pm |
5daeb5b0 | 1398 | -del /f *.def *.map |
1a6c65ed SH |
1399 | -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App |
1400 | -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive | |
1401 | -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute | |
1402 | -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie | |
7afc9753 | 1403 | -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp |
1a6c65ed | 1404 | -if exist $(LIBDIR)\CGI rmdir /s /q $(LIBDIR)\CGI |
46ffdcf0 | 1405 | -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress |
7afc9753 NC |
1406 | -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl |
1407 | -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN | |
522078af | 1408 | -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data |
1a6c65ed SH |
1409 | -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel |
1410 | -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest | |
ca67812f | 1411 | -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode |
1a6c65ed | 1412 | -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding |
7afc9753 | 1413 | -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter |
1a6c65ed SH |
1414 | -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder |
1415 | -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command | |
1416 | -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant | |
1417 | -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist | |
1418 | -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker | |
7afc9753 NC |
1419 | -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS |
1420 | -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps | |
1a6c65ed SH |
1421 | -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec |
1422 | -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter | |
96c33d98 | 1423 | -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash |
7afc9753 NC |
1424 | -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP |
1425 | -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N | |
1a6c65ed | 1426 | -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc |
1a6c65ed SH |
1427 | -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO |
1428 | -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC | |
7afc9753 | 1429 | -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON |
69f57184 | 1430 | -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List |
1a6c65ed | 1431 | -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale |
1a6c65ed SH |
1432 | -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math |
1433 | -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize | |
69f57184 | 1434 | -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME |
1a6c65ed | 1435 | -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module |
1a6c65ed | 1436 | -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP |
1a6c65ed SH |
1437 | -if exist $(LIBDIR)\Package rmdir /s /q $(LIBDIR)\Package |
1438 | -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params | |
1439 | -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse | |
7afc9753 | 1440 | -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl |
1a6c65ed SH |
1441 | -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO |
1442 | -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc | |
1443 | -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple | |
1444 | -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text | |
522078af | 1445 | -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar |
7afc9753 | 1446 | -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search |
6c4b87ea | 1447 | -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys |
1a6c65ed | 1448 | -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP |
7afc9753 | 1449 | -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term |
1a6c65ed | 1450 | -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test |
7afc9753 | 1451 | -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text |
1a6c65ed | 1452 | -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread |
6c4b87ea | 1453 | -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads |
8cf6f931 | 1454 | -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash |
1a6c65ed | 1455 | -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate |
7afc9753 | 1456 | -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale |
fb794281 | 1457 | -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version |
7afc9753 | 1458 | -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS |
00701878 | 1459 | -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API |
7afc9753 | 1460 | -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS |
60f0ee9d | 1461 | -cd $(PODDIR) && del /f *.html *.bat roffitall \ |
03057ffb | 1462 | perl5198delta.pod perlaix.pod perlamiga.pod perlapi.pod \ |
8d87852b NC |
1463 | perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod perldos.pod \ |
1464 | perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \ | |
1465 | perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \ | |
1466 | perlmacos.pod perlmacosx.pod perlmodlib.pod perlnetware.pod \ | |
1467 | perlopenbsd.pod perlos2.pod perlos390.pod perlos400.pod \ | |
1468 | perlplan9.pod perlqnx.pod perlriscos.pod perlsolaris.pod \ | |
58534900 MB |
1469 | perlsymbian.pod perlsynology.pod perltoc.pod perltru64.pod \ |
1470 | perltw.pod perluniprops.pod perlvos.pod perlwin32.pod | |
827a599d | 1471 | -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \ |
c9dab4e9 | 1472 | perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \ |
fb598ba5 | 1473 | xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist config_data zipdetails |
827a599d | 1474 | -cd ..\x2p && del /f find2perl s2p psed *.bat |
19ec6f53 | 1475 | -del /f ..\config.sh perlmain.c dlutils.c config.h.new \ |
ed2eab3f | 1476 | perlmainst.c |
1e71036e | 1477 | -del /f $(CONFIGPM) |
a148edb6 | 1478 | -del /f ..\lib\Config_git.pl |
1e71036e | 1479 | -del /f bin\*.bat |
d2b25974 | 1480 | -del /f perllibst.h |
4ebea3c6 | 1481 | -del /f $(PERLEXE_RES) perl.base |
fd081d74 | 1482 | -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h |
827a599d | 1483 | -cd $(EXTDIR) && del /s *.def Makefile Makefile.old |
a193a2db | 1484 | -cd $(DISTDIR) && del /s *.def Makefile Makefile.old |
83d5895a | 1485 | -cd $(CPANDIR) && del /s *.def Makefile Makefile.old |
0827416d | 1486 | -del /s ..\utils\Makefile |
522078af | 1487 | -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) |
522078af | 1488 | -if exist $(COREDIR) rmdir /s /q $(COREDIR) |
b4a41557 | 1489 | -if exist pod2htmd.tmp del pod2htmd.tmp |
b4a41557 | 1490 | -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR) |
0279961e | 1491 | -del /f ..\t\test_state |
1e71036e JH |
1492 | |
1493 | install : all installbare installhtml | |
1494 | ||
7c3b4d00 | 1495 | installbare : utils ..\pod\perltoc.pod |
1e71036e JH |
1496 | $(PERLEXE) ..\installperl |
1497 | if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* | |
5548433c | 1498 | if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.* |
1e71036e | 1499 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
ec25c072 SH |
1500 | if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.* |
1501 | if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.* | |
1e71036e JH |
1502 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* |
1503 | ||
1504 | installhtml : doc | |
b4a41557 | 1505 | $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.* |
1e71036e JH |
1506 | |
1507 | inst_lib : $(CONFIGPM) | |
1e71036e JH |
1508 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
1509 | ||
58fa074c | 1510 | $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs |
27a8011f | 1511 | cd ..\lib\unicore && \ |
2a6dc374 | 1512 | ..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p |
ca12659b NC |
1513 | |
1514 | minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils | |
6c85d12e SH |
1515 | $(XCOPY) $(MINIPERL) ..\t\$(NULL) |
1516 | if exist ..\t\perl.exe del /f ..\t\perl.exe | |
1517 | rename ..\t\miniperl.exe perl.exe | |
1e71036e | 1518 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
1e71036e | 1519 | attrib -r ..\t\*.* |
1e71036e | 1520 | cd ..\t && \ |
32ac41f2 | 1521 | $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t |
1e71036e | 1522 | |
3bef022b | 1523 | test-prep : all utils ..\pod\perltoc.pod |
1e71036e JH |
1524 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
1525 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1e71036e | 1526 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
fa58a56f | 1527 | .IF "$(CCTYPE)" == "GCC" |
4cef65c2 S |
1528 | # If building with gcc versions 4.x.x or greater, then |
1529 | # the GCC helper DLL will also need copied to the test directory. | |
1530 | # The name of the dll can change, depending upon which vendor has supplied | |
1531 | # your compiler, and upon the values of "x". | |
1532 | # libstdc++-6.dll is copied if it exists as it, too, may then be needed. | |
1533 | # Without this copying, the op/taint.t test script will fail. | |
20634986 SH |
1534 | if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL) |
1535 | if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL) | |
1536 | if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL) | |
fa58a56f | 1537 | .ENDIF |
1e71036e | 1538 | |
7c3b4d00 | 1539 | test : test-prep |
0b4dcbc1 JD |
1540 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
1541 | cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) | |
1e71036e | 1542 | |
106cf76e CBW |
1543 | test_porting : test-prep |
1544 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ | |
1545 | cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t | |
1546 | ||
250c5aad SH |
1547 | test-reonly : reonly utils |
1548 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) | |
1549 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
1550 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
1551 | cd ..\t && \ | |
a4499558 | 1552 | $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \ |
250c5aad SH |
1553 | cd ..\win32 |
1554 | ||
1555 | regen : | |
1556 | cd .. && regen.pl && cd win32 | |
1557 | ||
1e71036e | 1558 | test-notty : test-prep |
0b4dcbc1 JD |
1559 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
1560 | set PERL_SKIP_TTY_TEST=1 && \ | |
89087c85 | 1561 | cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES) |
1e71036e | 1562 | |
7c3b4d00 | 1563 | _test : |
a01cf021 JH |
1564 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
1565 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
a01cf021 | 1566 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
0b4dcbc1 JD |
1567 | set PERL_STATIC_EXT=$(STATIC_EXT) && \ |
1568 | cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) | |
b4a93add | 1569 | |
b4dc1df6 | 1570 | _clean : |
1e71036e JH |
1571 | -@erase miniperlmain$(o) |
1572 | -@erase $(MINIPERL) | |
1573 | -@erase perlglob$(o) | |
1574 | -@erase perlmain$(o) | |
ed2eab3f | 1575 | -@erase perlmainst$(o) |
1e71036e JH |
1576 | -@erase config.w32 |
1577 | -@erase /f config.h | |
a148edb6 | 1578 | -@erase /f ..\git_version.h |
1e71036e JH |
1579 | -@erase $(GLOBEXE) |
1580 | -@erase $(PERLEXE) | |
1581 | -@erase $(WPERLEXE) | |
ed2eab3f SH |
1582 | -@erase $(PERLEXESTATIC) |
1583 | -@erase $(PERLSTATICLIB) | |
1e71036e JH |
1584 | -@erase $(PERLDLL) |
1585 | -@erase $(CORE_OBJ) | |
9387abf8 | 1586 | -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS) |
522078af | 1587 | -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) |
27a8011f | 1588 | -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1) |
27a8011f | 1589 | -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2) |
ca12659b | 1590 | -@erase $(UNIDATAFILES) |
1e71036e JH |
1591 | -@erase $(WIN32_OBJ) |
1592 | -@erase $(DLL_OBJ) | |
1593 | -@erase $(X2P_OBJ) | |
1594 | -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res | |
1595 | -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat | |
1596 | -@erase ..\x2p\*.exe ..\x2p\*.bat | |
1597 | -@erase *.ilk | |
1598 | -@erase *.pdb | |
9e7cf449 | 1599 | -@erase Extensions_static |
1e71036e | 1600 | |
b4dc1df6 | 1601 | |
1266ad8f | 1602 | |
6e2cec71 | 1603 | clean : Extensions_clean _clean |
1266ad8f | 1604 | |
85741d00 | 1605 | realclean : Extensions_realclean _clean |
b4dc1df6 | 1606 | |
1e71036e JH |
1607 | # Handy way to run perlbug -ok without having to install and run the |
1608 | # installed perlbug. We don't re-run the tests here - we trust the user. | |
1609 | # Please *don't* use this unless all tests pass. | |
1610 | # If you want to report test failures, use "dmake nok" instead. | |
1611 | ok: utils | |
1612 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" | |
1613 | ||
1614 | okfile: utils | |
1615 | $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok | |
1616 | ||
1617 | nok: utils | |
1618 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" | |
1619 | ||
1620 | nokfile: utils | |
1621 | $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok |