Commit | Line | Data |
08aa1457 |
1 | # |
e7083a8c |
2 | # Makefile to build perl on Windows NT using DMAKE. |
d56e6723 |
3 | # Supported compilers: |
4 | # Visual C++ 2.0 thro 5.0 |
5 | # Borland C++ 5.02 |
a29d2910 |
6 | # Mingw32 with gcc-2.8.1 or egcs-1.0.2 **experimental** |
08aa1457 |
7 | # |
8 | # This is set up to build a perl.exe that runs off a shared library |
9 | # (perl.dll). Also makes individual DLLs for the XS extensions. |
10 | # |
11 | |
e7083a8c |
12 | ## |
13 | ## Build configuration. Edit the values below to suit your needs. |
14 | ## |
15 | |
08aa1457 |
16 | # |
17 | # Set these to wherever you want "nmake install" to put your |
18 | # newly built perl. |
e7083a8c |
19 | # |
d56e6723 |
20 | INST_DRV *= c: |
e5a95ffb |
21 | INST_TOP *= $(INST_DRV)\perl |
22 | |
e7083a8c |
23 | # |
e5a95ffb |
24 | # Comment this out if you DON'T want your perl installation to be versioned. |
25 | # This means that the new installation will overwrite any files from the |
26 | # old installation at the same INST_TOP location. Leaving it enabled is |
27 | # the safest route, as perl adds the extra version directory to all the |
28 | # locations it installs files to. If you disable it, an alternative |
29 | # versioned installation can be obtained by setting INST_TOP above to a |
30 | # path that includes an arbitrary version string. |
e7083a8c |
31 | # |
46124e9e |
32 | INST_VER *= \5.00552 |
d56e6723 |
33 | |
34 | # |
d07c2202 |
35 | # uncomment to enable threads-capabilities |
e7083a8c |
36 | # |
07ba5892 |
37 | #USE_THREADS *= define |
08aa1457 |
38 | |
39 | # |
d56e6723 |
40 | # uncomment one |
e7083a8c |
41 | # |
d56e6723 |
42 | #CCTYPE *= MSVC20 |
43 | #CCTYPE *= MSVC |
4a52a3da |
44 | CCTYPE *= BORLAND |
45 | #CCTYPE *= GCC |
08aa1457 |
46 | |
47 | # |
8f818fa0 |
48 | # uncomment next line if you want to use the perl object |
a29d2910 |
49 | # Currently, this cannot be enabled if you ask for threads above, or |
50 | # if you are using GCC or EGCS. |
e7083a8c |
51 | # |
26ca90b6 |
52 | #OBJECT *= -DPERL_OBJECT |
8f818fa0 |
53 | |
54 | # |
08aa1457 |
55 | # uncomment next line if you want debug version of perl (big,slow) |
e7083a8c |
56 | # |
d56e6723 |
57 | #CFG *= Debug |
08aa1457 |
58 | |
59 | # |
74593e1f |
60 | # uncomment next option if you want to use the VC++ compiler optimization. |
61 | # This option is only relevant for the Microsoft compiler; we automatically |
62 | # use maximum optimization with the other compilers (unless you specify a |
63 | # DEBUGGING build). |
64 | # Warning: This is known to produce incorrect code for compiler versions |
65 | # earlier than VC++ 98 (Visual Studio 6.0). VC++ 98 generates code that |
66 | # successfully passes the Perl regression test suite. It hasn't yet been |
67 | # widely tested with real applications though. |
68 | # |
69 | #CFG *= Optimize |
70 | |
71 | # |
e9ee4811 |
72 | # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler. |
73 | # Highly recommended. It has patches that fix known bugs in MSVCRT.DLL. |
b89743e8 |
74 | # This currently requires VC 5.0 with Service Pack 3. |
75 | # Get it from CPAN at http://www.perl.com/CPAN/authors/id/D/DO/DOUGL/ |
e9ee4811 |
76 | # and follow the directions in the package to install. |
e7083a8c |
77 | # |
78 | #USE_PERLCRT *= define |
79 | |
80 | # |
baed7233 |
81 | # uncomment to enable linking with setargv.obj under the Visual C |
82 | # compiler. Setting this options enables perl to expand wildcards in |
83 | # arguments, but it may be harder to use alternate methods like |
84 | # File::DosGlob that are more powerful. This option is supported only with |
85 | # Visual C. |
86 | # |
87 | #USE_SETARGV *= define |
88 | |
89 | # |
26618a56 |
90 | # if you have the source for des_fcrypt(), uncomment this and make sure the |
8d9b2e3c |
91 | # file exists (see README.win32). File should be located in the same |
ff95b63e |
92 | # directory as this file. |
e7083a8c |
93 | # |
2d77217b |
94 | #CRYPT_SRC *= fcrypt.c |
26618a56 |
95 | |
96 | # |
97 | # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a |
98 | # library, uncomment this, and make sure the library exists (see README.win32) |
a1dd9325 |
99 | # Specify the full pathname of the library. |
e7083a8c |
100 | # |
2d77217b |
101 | #CRYPT_LIB *= fcrypt.lib |
26618a56 |
102 | |
103 | # |
1c1c7f20 |
104 | # set this if you wish to use perl's malloc |
105 | # WARNING: Turning this on/off WILL break binary compatibility with extensions |
5fd76c3e |
106 | # you may have compiled with/without it. Be prepared to recompile all |
107 | # extensions if you change the default. Currently, this cannot be enabled |
108 | # if you ask for PERL_OBJECT above. |
e7083a8c |
109 | # |
ac4c12e7 |
110 | #PERL_MALLOC *= define |
1c1c7f20 |
111 | |
112 | # |
08aa1457 |
113 | # set the install locations of the compiler include/libraries |
95883bf3 |
114 | # Some versions of Visual C don't define MSVCDIR in the environment, |
115 | # so you may have to set CCHOME explicitly. |
eb480a0b |
116 | # |
4a52a3da |
117 | CCHOME *= C:\bc5 |
95883bf3 |
118 | #CCHOME *= $(MSVCDIR) |
4a52a3da |
119 | #CCHOME *= D:\packages\mingw32 |
d56e6723 |
120 | CCINCDIR *= $(CCHOME)\include |
121 | CCLIBDIR *= $(CCHOME)\lib |
08aa1457 |
122 | |
123 | # |
fa4efe8e |
124 | # specify space-separated list of extra directories to look for libraries |
125 | # |
126 | EXTRALIBDIRS *= |
127 | |
128 | # |
08aa1457 |
129 | # set this to point to cmd.exe (only needed if you use some |
130 | # alternate shell that doesn't grok cmd.exe style commands) |
e7083a8c |
131 | # |
d56e6723 |
132 | #SHELL *= g:\winnt\system32\cmd.exe |
08aa1457 |
133 | |
134 | # |
135 | # set this to your email address (perl will guess a value from |
136 | # from your loginname and your hostname, which may not be right) |
e7083a8c |
137 | # |
eb480a0b |
138 | #EMAIL *= |
08aa1457 |
139 | |
e7083a8c |
140 | ## |
141 | ## Build configuration ends. |
142 | ## |
143 | |
08aa1457 |
144 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### |
145 | |
26618a56 |
146 | .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" |
eb480a0b |
147 | D_CRYPT = undef |
26618a56 |
148 | .ELSE |
eb480a0b |
149 | D_CRYPT = define |
150 | CRYPT_FLAG = -DHAVE_DES_FCRYPT |
26618a56 |
151 | .ENDIF |
152 | |
eb480a0b |
153 | .IF "$(OBJECT)" != "" |
154 | PERL_MALLOC != undef |
e2f80c04 |
155 | USE_THREADS != undef |
1c1c7f20 |
156 | .ENDIF |
157 | |
eb480a0b |
158 | PERL_MALLOC *= undef |
159 | |
160 | USE_THREADS *= undef |
161 | |
924b3ec4 |
162 | #BUILDOPT *= -DMULTIPLICITY |
163 | #BUILDOPT *= -DPERL_GLOBAL_STRUCT -DMULTIPLICITY |
d07c2202 |
164 | # -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include |
165 | |
166 | .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE |
167 | |
168 | PROCESSOR_ARCHITECTURE *= x86 |
169 | |
b83ac84c |
170 | .IF "$(OBJECT)" != "" |
171 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-object |
172 | .ELIF "$(USE_THREADS)" == "define" |
d07c2202 |
173 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread |
924b3ec4 |
174 | .ELSE |
175 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) |
d07c2202 |
176 | .ENDIF |
177 | |
178 | ARCHDIR = ..\lib\$(ARCHNAME) |
179 | COREDIR = ..\lib\CORE |
eb480a0b |
180 | AUTODIR = ..\lib\auto |
d07c2202 |
181 | |
08aa1457 |
182 | # |
183 | # Programs to compile, build .lib files and link |
184 | # |
185 | |
186 | .USESHELL : |
187 | |
188 | .IF "$(CCTYPE)" == "BORLAND" |
189 | |
eb480a0b |
190 | CC = bcc32 |
191 | LINK32 = tlink32 |
064a70d4 |
192 | LIB32 = tlib /P128 |
eb480a0b |
193 | IMPLIB = implib -c |
08aa1457 |
194 | |
195 | # |
196 | # Options |
197 | # |
eb480a0b |
198 | RUNTIME = -D_RTLDLL |
9036c72f |
199 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I$(CCINCDIR) |
eb480a0b |
200 | #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch |
201 | DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG) |
202 | LOCDEFS = -DPERLDLL -DPERL_CORE |
203 | SUBSYS = console |
204 | CXX_FLAG = -P |
08aa1457 |
205 | |
eb480a0b |
206 | LIBC = cw32mti.lib |
207 | LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib |
08aa1457 |
208 | |
209 | .IF "$(CFG)" == "Debug" |
eb480a0b |
210 | OPTIMIZE = -v $(RUNTIME) -DDEBUGGING |
211 | LINK_DBG = -v |
08aa1457 |
212 | .ELSE |
6a6688c3 |
213 | OPTIMIZE = -O2 $(RUNTIME) |
eb480a0b |
214 | LINK_DBG = |
08aa1457 |
215 | .ENDIF |
216 | |
dfe13c55 |
217 | CFLAGS = -w -g0 -d -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
eb480a0b |
218 | $(PCHFLAGS) $(OPTIMIZE) |
fa4efe8e |
219 | LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L") |
eb480a0b |
220 | OBJOUT_FLAG = -o |
221 | EXEOUT_FLAG = -e |
064a70d4 |
222 | LIBOUT_FLAG = |
d56e6723 |
223 | |
224 | .ELIF "$(CCTYPE)" == "GCC" |
225 | |
3b657871 |
226 | CC = gcc |
227 | LINK32 = gcc |
064a70d4 |
228 | LIB32 = ar rc |
eb480a0b |
229 | IMPLIB = dlltool |
d56e6723 |
230 | |
231 | o = .o |
eda5ff31 |
232 | a = .a |
d56e6723 |
233 | |
234 | # |
235 | # Options |
236 | # |
eb480a0b |
237 | RUNTIME = |
9036c72f |
238 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. |
eb480a0b |
239 | DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG) |
240 | LOCDEFS = -DPERLDLL -DPERL_CORE |
241 | SUBSYS = console |
242 | CXX_FLAG = -xc++ |
d56e6723 |
243 | |
eb480a0b |
244 | LIBC = -lcrtdll |
db15561c |
245 | LIBFILES = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 \ |
246 | -lmingw32 -lgcc -lmoldname $(LIBC) -lkernel32 |
d56e6723 |
247 | |
248 | .IF "$(CFG)" == "Debug" |
eb480a0b |
249 | OPTIMIZE = -g -O2 $(RUNTIME) -DDEBUGGING |
250 | LINK_DBG = -g |
d56e6723 |
251 | .ELSE |
eb480a0b |
252 | OPTIMIZE = -g -O2 $(RUNTIME) |
253 | LINK_DBG = |
d56e6723 |
254 | .ENDIF |
255 | |
eb480a0b |
256 | CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) |
fa4efe8e |
257 | LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L") |
eb480a0b |
258 | OBJOUT_FLAG = -o |
259 | EXEOUT_FLAG = -o |
064a70d4 |
260 | LIBOUT_FLAG = |
08aa1457 |
261 | |
262 | .ELSE |
263 | |
eb480a0b |
264 | CC = cl.exe |
265 | LINK32 = link.exe |
266 | LIB32 = $(LINK32) -lib |
267 | |
08aa1457 |
268 | # |
269 | # Options |
270 | # |
eb480a0b |
271 | |
af883608 |
272 | RUNTIME = -MD |
9036c72f |
273 | INCLUDES = -I$(COREDIR) -I.\include -I. -I.. |
eb480a0b |
274 | #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX |
b3e5c95e |
275 | DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(BUILDOPT) $(CRYPT_FLAG) |
eb480a0b |
276 | LOCDEFS = -DPERLDLL -DPERL_CORE |
277 | SUBSYS = console |
278 | CXX_FLAG = -TP -GX |
08aa1457 |
279 | |
e7083a8c |
280 | .IF "$(USE_PERLCRT)" == "" |
281 | .IF "$(CFG)" == "Debug" |
282 | PERLCRTLIBC = msvcrtd.lib |
283 | .ELSE |
284 | PERLCRTLIBC = msvcrt.lib |
285 | .ENDIF |
286 | .ELSE |
287 | .IF "$(CFG)" == "Debug" |
288 | PERLCRTLIBC = PerlCRTD.lib |
289 | .ELSE |
290 | PERLCRTLIBC = PerlCRT.lib |
291 | .ENDIF |
292 | .ENDIF |
293 | |
08aa1457 |
294 | .IF "$(RUNTIME)" == "-MD" |
e7083a8c |
295 | LIBC = $(PERLCRTLIBC) |
08aa1457 |
296 | .ELSE |
eb480a0b |
297 | LIBC = libcmt.lib |
08aa1457 |
298 | .ENDIF |
299 | |
300 | .IF "$(CFG)" == "Debug" |
301 | .IF "$(CCTYPE)" == "MSVC20" |
eb480a0b |
302 | OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING |
08aa1457 |
303 | .ELSE |
3dfd1da1 |
304 | OPTIMIZE = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING |
08aa1457 |
305 | .ENDIF |
eb480a0b |
306 | LINK_DBG = -debug -pdb:none |
08aa1457 |
307 | .ELSE |
74593e1f |
308 | .IF "$(CFG)" == "Optimize" |
309 | OPTIMIZE = -O2 $(RUNTIME) -DNDEBUG |
08aa1457 |
310 | .ELSE |
af883608 |
311 | OPTIMIZE = -Od $(RUNTIME) -DNDEBUG |
08aa1457 |
312 | .ENDIF |
eb480a0b |
313 | LINK_DBG = -release |
08aa1457 |
314 | .ENDIF |
315 | |
e7083a8c |
316 | LIBBASEFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \ |
eb480a0b |
317 | winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \ |
318 | oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \ |
319 | version.lib odbc32.lib odbccp32.lib |
08aa1457 |
320 | |
e7083a8c |
321 | # we add LIBC here, since we may be using PerlCRT.dll |
322 | LIBFILES = $(LIBBASEFILES) $(LIBC) |
323 | |
eb480a0b |
324 | CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \ |
325 | $(PCHFLAGS) $(OPTIMIZE) |
e7083a8c |
326 | LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) |
eb480a0b |
327 | OBJOUT_FLAG = -Fo |
328 | EXEOUT_FLAG = -Fe |
064a70d4 |
329 | LIBOUT_FLAG = /out: |
08aa1457 |
330 | |
331 | .ENDIF |
332 | |
eb480a0b |
333 | .IF "$(OBJECT)" != "" |
334 | OPTIMIZE += $(CXX_FLAG) |
335 | .ENDIF |
336 | |
337 | CFLAGS_O = $(CFLAGS) $(OBJECT) |
338 | |
08aa1457 |
339 | #################### do not edit below this line ####################### |
340 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## |
341 | |
d56e6723 |
342 | o *= .obj |
eda5ff31 |
343 | a *= .lib |
d56e6723 |
344 | |
eb480a0b |
345 | LKPRE = INPUT ( |
346 | LKPOST = ) |
347 | |
08aa1457 |
348 | # |
349 | # Rules |
350 | # |
08aa1457 |
351 | |
eda5ff31 |
352 | .SUFFIXES : .c $(o) .dll $(a) .exe |
d56e6723 |
353 | |
354 | .c$(o): |
eb480a0b |
355 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< |
d07c2202 |
356 | |
357 | .y.c: |
358 | $(NOOP) |
08aa1457 |
359 | |
d56e6723 |
360 | $(o).dll: |
08aa1457 |
361 | .IF "$(CCTYPE)" == "BORLAND" |
d56e6723 |
362 | $(LINK32) -Tpd -ap $(LINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def |
08aa1457 |
363 | $(IMPLIB) $(*B).lib $@ |
d56e6723 |
364 | .ELIF "$(CCTYPE)" == "GCC" |
365 | $(LINK32) -o $@ $(LINK_FLAGS) $< $(LIBFILES) |
eda5ff31 |
366 | $(IMPLIB) -def $(*B).def $(*B).a $@ |
08aa1457 |
367 | .ELSE |
08aa1457 |
368 | $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ |
dc050285 |
369 | -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL) |
08aa1457 |
370 | .ENDIF |
371 | |
372 | # |
e5a95ffb |
373 | INST_BIN = $(INST_TOP)$(INST_VER)\bin\$(ARCHNAME) |
374 | INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin |
375 | INST_LIB = $(INST_TOP)$(INST_VER)\lib |
eb480a0b |
376 | INST_POD = $(INST_LIB)\pod |
377 | INST_HTML = $(INST_POD)\html |
378 | LIBDIR = ..\lib |
379 | EXTDIR = ..\ext |
380 | PODDIR = ..\pod |
381 | EXTUTILSDIR = $(LIBDIR)\extutils |
08aa1457 |
382 | |
383 | # |
384 | # various targets |
eb480a0b |
385 | MINIPERL = ..\miniperl.exe |
386 | MINIDIR = .\mini |
387 | PERLEXE = ..\perl.exe |
388 | GLOBEXE = ..\perlglob.exe |
389 | CONFIGPM = ..\lib\Config.pm |
390 | MINIMOD = ..\lib\ExtUtils\Miniperl.pm |
391 | X2P = ..\x2p\a2p.exe |
392 | |
393 | PL2BAT = bin\pl2bat.pl |
394 | GLOBBAT = bin\perlglob.bat |
08aa1457 |
395 | |
4a71ed0c |
396 | UTILS = \ |
397 | ..\utils\h2ph \ |
398 | ..\utils\splain \ |
399 | ..\utils\perlbug \ |
400 | ..\utils\pl2pm \ |
401 | ..\utils\c2ph \ |
402 | ..\utils\h2xs \ |
403 | ..\utils\perldoc \ |
404 | ..\utils\pstruct \ |
405 | ..\utils\perlcc \ |
406 | ..\pod\checkpods \ |
407 | ..\pod\pod2html \ |
408 | ..\pod\pod2latex \ |
409 | ..\pod\pod2man \ |
410 | ..\pod\pod2text \ |
411 | ..\x2p\find2perl \ |
412 | ..\x2p\s2p \ |
4a71ed0c |
413 | bin\runperl.pl \ |
414 | bin\pl2bat.pl \ |
415 | bin\perlglob.pl \ |
416 | bin\search.pl |
417 | |
08aa1457 |
418 | .IF "$(CCTYPE)" == "BORLAND" |
419 | |
eb480a0b |
420 | CFGSH_TMPL = config.bc |
421 | CFGH_TMPL = config_H.bc |
d56e6723 |
422 | |
423 | .ELIF "$(CCTYPE)" == "GCC" |
424 | |
eb480a0b |
425 | CFGSH_TMPL = config.gc |
426 | CFGH_TMPL = config_H.gc |
db15561c |
427 | .IF "$(OBJECT)" == "-DPERL_OBJECT" |
428 | PERLIMPLIB = ..\libperlcore$(a) |
429 | .ELSE |
430 | PERLIMPLIB = ..\libperl$(a) |
431 | .ENDIF |
08aa1457 |
432 | |
433 | .ELSE |
434 | |
eb480a0b |
435 | CFGSH_TMPL = config.vc |
436 | CFGH_TMPL = config_H.vc |
e7083a8c |
437 | .IF "$(USE_PERLCRT)" == "" |
eb480a0b |
438 | PERL95EXE = ..\perl95.exe |
e7083a8c |
439 | .ENDIF |
08aa1457 |
440 | |
441 | .ENDIF |
442 | |
eda5ff31 |
443 | .IF "$(OBJECT)" == "-DPERL_OBJECT" |
444 | PERLIMPLIB *= ..\perlcore$(a) |
445 | PERLDLL = ..\perlcore.dll |
6de196ee |
446 | CAPILIB = $(COREDIR)\perlCAPI$(a) |
eda5ff31 |
447 | .ELSE |
448 | PERLIMPLIB *= ..\perl$(a) |
449 | PERLDLL = ..\perl.dll |
450 | CAPILIB = |
451 | .ENDIF |
452 | |
eb480a0b |
453 | XCOPY = xcopy /f /r /i /d |
454 | RCOPY = xcopy /f /r /i /e /d |
455 | NOOP = @echo |
08aa1457 |
456 | |
eb480a0b |
457 | # |
458 | # filenames given to xsubpp must have forward slashes (since it puts |
459 | # full pathnames in #line strings) |
460 | XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \ |
461 | -C++ -prototypes |
462 | |
852c2e52 |
463 | MICROCORE_SRC = \ |
eb480a0b |
464 | ..\av.c \ |
465 | ..\byterun.c \ |
466 | ..\deb.c \ |
467 | ..\doio.c \ |
468 | ..\doop.c \ |
469 | ..\dump.c \ |
470 | ..\globals.c \ |
471 | ..\gv.c \ |
472 | ..\hv.c \ |
473 | ..\mg.c \ |
474 | ..\op.c \ |
475 | ..\perl.c \ |
476 | ..\perly.c \ |
477 | ..\pp.c \ |
478 | ..\pp_ctl.c \ |
479 | ..\pp_hot.c \ |
480 | ..\pp_sys.c \ |
481 | ..\regcomp.c \ |
482 | ..\regexec.c \ |
483 | ..\run.c \ |
484 | ..\scope.c \ |
485 | ..\sv.c \ |
486 | ..\taint.c \ |
487 | ..\toke.c \ |
488 | ..\universal.c \ |
a176fa2a |
489 | ..\utf8.c \ |
eb480a0b |
490 | ..\util.c |
491 | |
1c1c7f20 |
492 | .IF "$(PERL_MALLOC)" == "define" |
852c2e52 |
493 | EXTRACORE_SRC += ..\malloc.c |
1c1c7f20 |
494 | .ENDIF |
495 | |
eb480a0b |
496 | .IF "$(OBJECT)" == "" |
852c2e52 |
497 | EXTRACORE_SRC += ..\perlio.c |
eb480a0b |
498 | .ENDIF |
499 | |
500 | WIN32_SRC = \ |
501 | .\win32.c \ |
502 | .\win32sck.c |
503 | |
504 | .IF "$(USE_THREADS)" == "define" |
505 | WIN32_SRC += .\win32thread.c |
506 | .ENDIF |
507 | |
8d9b2e3c |
508 | .IF "$(CRYPT_SRC)" != "" |
509 | WIN32_SRC += .\$(CRYPT_SRC) |
510 | .ENDIF |
511 | |
eb480a0b |
512 | PERL95_SRC = \ |
513 | perl95.c \ |
514 | win32mt.c \ |
515 | win32sckmt.c |
516 | |
a1dd9325 |
517 | .IF "$(CRYPT_SRC)" != "" |
8d9b2e3c |
518 | PERL95_SRC += .\$(CRYPT_SRC) |
a1dd9325 |
519 | .ENDIF |
520 | |
eb480a0b |
521 | DLL_SRC = $(DYNALOADER).c |
522 | |
523 | |
524 | .IF "$(OBJECT)" == "" |
525 | DLL_SRC += perllib.c |
526 | .ENDIF |
527 | |
528 | X2P_SRC = \ |
529 | ..\x2p\a2p.c \ |
530 | ..\x2p\hash.c \ |
531 | ..\x2p\str.c \ |
532 | ..\x2p\util.c \ |
533 | ..\x2p\walk.c |
534 | |
852c2e52 |
535 | CORE_NOCFG_H = \ |
eb480a0b |
536 | ..\av.h \ |
537 | ..\byterun.h \ |
538 | ..\bytecode.h \ |
539 | ..\cop.h \ |
540 | ..\cv.h \ |
541 | ..\dosish.h \ |
542 | ..\embed.h \ |
543 | ..\form.h \ |
544 | ..\gv.h \ |
545 | ..\handy.h \ |
546 | ..\hv.h \ |
0f4eea8f |
547 | ..\iperlsys.h \ |
eb480a0b |
548 | ..\mg.h \ |
549 | ..\nostdio.h \ |
550 | ..\op.h \ |
551 | ..\opcode.h \ |
552 | ..\perl.h \ |
eb480a0b |
553 | ..\perlsdio.h \ |
554 | ..\perlsfio.h \ |
555 | ..\perly.h \ |
556 | ..\pp.h \ |
557 | ..\proto.h \ |
558 | ..\regexp.h \ |
559 | ..\scope.h \ |
560 | ..\sv.h \ |
561 | ..\thread.h \ |
562 | ..\unixish.h \ |
a176fa2a |
563 | ..\utf8.h \ |
eb480a0b |
564 | ..\util.h \ |
dfe13c55 |
565 | ..\warning.h \ |
eb480a0b |
566 | ..\XSUB.h \ |
eb480a0b |
567 | ..\EXTERN.h \ |
568 | ..\perlvars.h \ |
569 | ..\intrpvar.h \ |
570 | ..\thrdvar.h \ |
571 | .\include\dirent.h \ |
572 | .\include\netdb.h \ |
573 | .\include\sys\socket.h \ |
574 | .\win32.h |
575 | |
852c2e52 |
576 | CORE_H = $(CORE_NOCFG_H) .\config.h |
577 | |
578 | MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o)) |
579 | CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o)) |
eb480a0b |
580 | WIN32_OBJ = $(WIN32_SRC:db:+$(o)) |
5fd76c3e |
581 | MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)} |
eb480a0b |
582 | MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)} |
583 | MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) |
af883608 |
584 | PERL95_OBJ = $(PERL95_SRC:db:+$(o)) |
eb480a0b |
585 | DLL_OBJ = $(DLL_SRC:db:+$(o)) |
586 | X2P_OBJ = $(X2P_SRC:db:+$(o)) |
587 | |
eb480a0b |
588 | PERLDLL_OBJ = $(CORE_OBJ) |
589 | PERLEXE_OBJ = perlmain$(o) |
590 | |
591 | .IF "$(OBJECT)" == "" |
592 | PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ) |
593 | .ELSE |
594 | PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ) |
af883608 |
595 | PERL95_OBJ += DynaLoadmt$(o) |
eb480a0b |
596 | .ENDIF |
597 | |
baed7233 |
598 | .IF "$(USE_SETARGV)" != "" |
599 | SETARGV_OBJ = setargv$(o) |
600 | .ENDIF |
601 | |
823edd99 |
602 | DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \ |
603 | Data/Dumper |
eb480a0b |
604 | STATIC_EXT = DynaLoader |
eab60bb1 |
605 | NONXS_EXT = Errno |
eb480a0b |
606 | |
607 | DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader |
608 | SOCKET = $(EXTDIR)\Socket\Socket |
609 | FCNTL = $(EXTDIR)\Fcntl\Fcntl |
610 | OPCODE = $(EXTDIR)\Opcode\Opcode |
611 | SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File |
612 | IO = $(EXTDIR)\IO\IO |
613 | POSIX = $(EXTDIR)\POSIX\POSIX |
614 | ATTRS = $(EXTDIR)\attrs\attrs |
615 | THREAD = $(EXTDIR)\Thread\Thread |
616 | B = $(EXTDIR)\B\B |
15e52e56 |
617 | RE = $(EXTDIR)\re\re |
823edd99 |
618 | DUMPER = $(EXTDIR)\Data\Dumper\Dumper |
eab60bb1 |
619 | ERRNO = $(EXTDIR)\Errno\Errno |
eb480a0b |
620 | |
621 | SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll |
622 | FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll |
623 | OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll |
624 | SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll |
625 | IO_DLL = $(AUTODIR)\IO\IO.dll |
626 | POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll |
627 | ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll |
628 | THREAD_DLL = $(AUTODIR)\Thread\Thread.dll |
629 | B_DLL = $(AUTODIR)\B\B.dll |
823edd99 |
630 | DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll |
15e52e56 |
631 | RE_DLL = $(AUTODIR)\re\re.dll |
eb480a0b |
632 | |
eab60bb1 |
633 | ERRNO_PM = $(LIBDIR)\Errno.pm |
634 | |
ac4c12e7 |
635 | EXTENSION_C = \ |
eb480a0b |
636 | $(SOCKET).c \ |
637 | $(FCNTL).c \ |
638 | $(OPCODE).c \ |
639 | $(SDBM_FILE).c \ |
640 | $(IO).c \ |
641 | $(POSIX).c \ |
642 | $(ATTRS).c \ |
643 | $(THREAD).c \ |
15e52e56 |
644 | $(RE).c \ |
823edd99 |
645 | $(DUMPER).c \ |
eb480a0b |
646 | $(B).c |
647 | |
ac4c12e7 |
648 | EXTENSION_DLL = \ |
eb480a0b |
649 | $(SOCKET_DLL) \ |
650 | $(FCNTL_DLL) \ |
651 | $(OPCODE_DLL) \ |
652 | $(SDBM_FILE_DLL)\ |
653 | $(IO_DLL) \ |
654 | $(POSIX_DLL) \ |
51aa15f3 |
655 | $(ATTRS_DLL) \ |
823edd99 |
656 | $(DUMPER_DLL) \ |
51aa15f3 |
657 | $(B_DLL) |
26ca90b6 |
658 | |
eab60bb1 |
659 | EXTENSION_PM = \ |
660 | $(ERRNO_PM) |
661 | |
15e52e56 |
662 | # re.dll doesn't build with PERL_OBJECT yet |
26ca90b6 |
663 | .IF "$(OBJECT)" == "" |
664 | EXTENSION_DLL += \ |
15e52e56 |
665 | $(THREAD_DLL) \ |
666 | $(RE_DLL) |
26ca90b6 |
667 | .ENDIF |
eb480a0b |
668 | |
669 | POD2HTML = $(PODDIR)\pod2html |
670 | POD2MAN = $(PODDIR)\pod2man |
671 | POD2LATEX = $(PODDIR)\pod2latex |
672 | POD2TEXT = $(PODDIR)\pod2text |
673 | |
674 | CFG_VARS = \ |
675 | "INST_DRV=$(INST_DRV)" \ |
676 | "INST_TOP=$(INST_TOP)" \ |
e5a95ffb |
677 | "INST_VER=$(INST_VER)" \ |
eb480a0b |
678 | "archname=$(ARCHNAME)" \ |
679 | "cc=$(CC)" \ |
ac4c12e7 |
680 | "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)" \ |
eb480a0b |
681 | "cf_email=$(EMAIL)" \ |
682 | "d_crypt=$(D_CRYPT)" \ |
683 | "d_mymalloc=$(PERL_MALLOC)" \ |
684 | "libs=$(LIBFILES:f)" \ |
685 | "incpath=$(CCINCDIR)" \ |
eda5ff31 |
686 | "libperl=$(PERLIMPLIB:f)" \ |
fa4efe8e |
687 | "libpth=$(strip $(CCLIBDIR) $(EXTRALIBDIRS) $(LIBFILES:d))" \ |
eb480a0b |
688 | "libc=$(LIBC)" \ |
689 | "make=dmake" \ |
eda5ff31 |
690 | "_o=$(o)" "obj_ext=$(o)" \ |
691 | "_a=$(a)" "lib_ext=$(a)" \ |
eb480a0b |
692 | "static_ext=$(STATIC_EXT)" \ |
693 | "dynamic_ext=$(DYNAMIC_EXT)" \ |
eab60bb1 |
694 | "nonxs_ext=$(NONXS_EXT)" \ |
eb480a0b |
695 | "usethreads=$(USE_THREADS)" \ |
696 | "LINK_FLAGS=$(LINK_FLAGS)" \ |
697 | "optimize=$(OPTIMIZE)" |
924b3ec4 |
698 | |
08aa1457 |
699 | # |
700 | # Top targets |
701 | # |
702 | |
852c2e52 |
703 | all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \ |
eab60bb1 |
704 | $(CAPILIB) $(X2P) $(EXTENSION_DLL) $(EXTENSION_PM) |
08aa1457 |
705 | |
d56e6723 |
706 | $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c |
08aa1457 |
707 | |
708 | #------------------------------------------------------------ |
709 | |
eb480a0b |
710 | $(GLOBEXE) : perlglob$(o) |
08aa1457 |
711 | .IF "$(CCTYPE)" == "BORLAND" |
712 | $(CC) -c -w -v -tWM -I$(CCINCDIR) perlglob.c |
d56e6723 |
713 | $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \ |
714 | $(CCLIBDIR)\32BIT\wildargs$(o),$@,,import32.lib cw32mt.lib, |
715 | .ELIF "$(CCTYPE)" == "GCC" |
716 | $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES) |
08aa1457 |
717 | .ELSE |
dc050285 |
718 | $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ |
d56e6723 |
719 | perlglob$(o) setargv$(o) |
08aa1457 |
720 | .ENDIF |
721 | |
d56e6723 |
722 | perlglob$(o) : perlglob.c |
08aa1457 |
723 | |
08aa1457 |
724 | config.w32 : $(CFGSH_TMPL) |
725 | copy $(CFGSH_TMPL) config.w32 |
726 | |
852c2e52 |
727 | .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H) |
08aa1457 |
728 | -del /f config.h |
729 | copy $(CFGH_TMPL) config.h |
730 | |
731 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL |
924b3ec4 |
732 | $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh |
733 | |
734 | # this target is for when changes to the main config.sh happen |
735 | # edit config.{b,v,g}c and make this target once for each supported |
736 | # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`) |
737 | regen_config_h: |
738 | perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh |
739 | -cd .. && del /f perl.exe |
740 | cd .. && perl configpm |
741 | -del /f $(CFGH_TMPL) |
742 | -mkdir ..\lib\CORE |
e5a95ffb |
743 | -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)" |
924b3ec4 |
744 | rename config.h $(CFGH_TMPL) |
08aa1457 |
745 | |
746 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl |
747 | cd .. && miniperl configpm |
748 | if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) |
d07c2202 |
749 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
750 | $(XCOPY) *.h $(COREDIR)\*.* |
15e52e56 |
751 | $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.* |
d07c2202 |
752 | $(RCOPY) include $(COREDIR)\*.* |
e5a95ffb |
753 | $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \ |
754 | || $(MAKE) $(MAKEMACROS) $(CONFIGPM) |
08aa1457 |
755 | |
eb480a0b |
756 | $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) |
08aa1457 |
757 | .IF "$(CCTYPE)" == "BORLAND" |
758 | $(LINK32) -Tpe -ap $(LINK_FLAGS) \ |
eb480a0b |
759 | @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) |
d56e6723 |
760 | .ELIF "$(CCTYPE)" == "GCC" |
761 | $(LINK32) -v -o $@ $(LINK_FLAGS) \ |
eb480a0b |
762 | $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
08aa1457 |
763 | .ELSE |
764 | $(LINK32) -subsystem:console -out:$@ \ |
eb480a0b |
765 | @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\)) |
08aa1457 |
766 | .ENDIF |
767 | |
eb480a0b |
768 | $(MINIDIR) : |
769 | if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" |
770 | |
852c2e52 |
771 | $(MINICORE_OBJ) : $(CORE_NOCFG_H) |
eb480a0b |
772 | $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c |
773 | |
852c2e52 |
774 | $(MINIWIN32_OBJ) : $(CORE_NOCFG_H) |
eb480a0b |
775 | $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c |
776 | |
852c2e52 |
777 | # 1. we don't want to rebuild miniperl.exe when config.h changes |
778 | # 2. we don't want to rebuild miniperl.exe with non-default config.h |
779 | $(MINI_OBJ) : $(CORE_NOCFG_H) |
780 | |
eb480a0b |
781 | $(WIN32_OBJ) : $(CORE_H) |
782 | $(CORE_OBJ) : $(CORE_H) |
eb480a0b |
783 | $(DLL_OBJ) : $(CORE_H) |
784 | $(PERL95_OBJ) : $(CORE_H) |
785 | $(X2P_OBJ) : $(CORE_H) |
08aa1457 |
786 | |
d55594ae |
787 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl |
eb480a0b |
788 | $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \ |
910dfcc8 |
789 | CCTYPE=$(CCTYPE) > perldll.def |
08aa1457 |
790 | |
eb480a0b |
791 | $(PERLDLL): perldll.def $(PERLDLL_OBJ) |
08aa1457 |
792 | .IF "$(CCTYPE)" == "BORLAND" |
793 | $(LINK32) -Tpd -ap $(LINK_FLAGS) \ |
eb480a0b |
794 | @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \ |
08aa1457 |
795 | $@,\n \ |
796 | $(LIBFILES)\n \ |
797 | perldll.def\n) |
798 | $(IMPLIB) $*.lib $@ |
d56e6723 |
799 | .ELIF "$(CCTYPE)" == "GCC" |
3730b96e |
800 | $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \ |
eb480a0b |
801 | $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
d56e6723 |
802 | dlltool --output-lib $(PERLIMPLIB) \ |
803 | --dllname perl.dll \ |
804 | --def perldll.def \ |
805 | --base-file perl.base \ |
806 | --output-exp perl.exp |
3730b96e |
807 | $(LINK32) -mdll -o $@ $(LINK_FLAGS) \ |
eb480a0b |
808 | $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \ |
809 | perl.exp $(LKPOST)) |
08aa1457 |
810 | .ELSE |
811 | $(LINK32) -dll -def:perldll.def -out:$@ \ |
eb480a0b |
812 | @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ:s,\,\\)) |
08aa1457 |
813 | .ENDIF |
d07c2202 |
814 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) |
08aa1457 |
815 | |
816 | perl.def : $(MINIPERL) makeperldef.pl |
817 | $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def |
818 | |
819 | $(MINIMOD) : $(MINIPERL) ..\minimod.pl |
820 | cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm |
821 | |
eb480a0b |
822 | ..\x2p\a2p$(o) : ..\x2p\a2p.c |
823 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c |
824 | |
825 | ..\x2p\hash$(o) : ..\x2p\hash.c |
826 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c |
827 | |
828 | ..\x2p\str$(o) : ..\x2p\str.c |
829 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c |
830 | |
831 | ..\x2p\util$(o) : ..\x2p\util.c |
832 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c |
833 | |
834 | ..\x2p\walk$(o) : ..\x2p\walk.c |
835 | $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c |
836 | |
837 | $(X2P) : $(MINIPERL) $(X2P_OBJ) |
d07c2202 |
838 | $(MINIPERL) ..\x2p\find2perl.PL |
839 | $(MINIPERL) ..\x2p\s2p.PL |
840 | .IF "$(CCTYPE)" == "BORLAND" |
841 | $(LINK32) -Tpe -ap $(LINK_FLAGS) \ |
842 | @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) |
843 | .ELIF "$(CCTYPE)" == "GCC" |
844 | $(LINK32) -v -o $@ $(LINK_FLAGS) \ |
845 | $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
846 | .ELSE |
847 | $(LINK32) -subsystem:console -out:$@ \ |
422938c9 |
848 | @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\)) |
d07c2202 |
849 | .ENDIF |
850 | |
08aa1457 |
851 | perlmain.c : runperl.c |
852 | copy runperl.c perlmain.c |
853 | |
d56e6723 |
854 | perlmain$(o) : perlmain.c |
8957be0a |
855 | $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c |
08aa1457 |
856 | |
eb480a0b |
857 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) |
08aa1457 |
858 | .IF "$(CCTYPE)" == "BORLAND" |
859 | $(LINK32) -Tpe -ap $(LINK_FLAGS) \ |
8957be0a |
860 | @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \ |
861 | $(@:s,\,\\),\n \ |
08aa1457 |
862 | $(PERLIMPLIB) $(LIBFILES)\n) |
d56e6723 |
863 | .ELIF "$(CCTYPE)" == "GCC" |
864 | $(LINK32) -o $@ $(LINK_FLAGS) \ |
eb480a0b |
865 | $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES) |
08aa1457 |
866 | .ELSE |
d56e6723 |
867 | $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \ |
baed7233 |
868 | $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) |
08aa1457 |
869 | .ENDIF |
870 | copy splittree.pl .. |
eb480a0b |
871 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) |
08aa1457 |
872 | |
873 | .IF "$(CCTYPE)" != "BORLAND" |
d56e6723 |
874 | .IF "$(CCTYPE)" != "GCC" |
e7083a8c |
875 | .IF "$(USE_PERLCRT)" == "" |
08aa1457 |
876 | |
877 | perl95.c : runperl.c |
878 | copy runperl.c perl95.c |
879 | |
d56e6723 |
880 | perl95$(o) : perl95.c |
eb480a0b |
881 | $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c perl95.c |
08aa1457 |
882 | |
d56e6723 |
883 | win32sckmt$(o) : win32sck.c |
eb480a0b |
884 | $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \ |
885 | $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c |
fb73857a |
886 | |
d56e6723 |
887 | win32mt$(o) : win32.c |
eb480a0b |
888 | $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \ |
889 | $(OBJOUT_FLAG)win32mt$(o) win32.c |
fb73857a |
890 | |
ac4c12e7 |
891 | DynaLoadmt$(o) : $(DYNALOADER).c |
892 | $(CC) $(CFLAGS_O) -MT -UPERLDLL -DWIN95FIX -c \ |
893 | $(OBJOUT_FLAG)DynaLoadmt$(o) $(DYNALOADER).c |
fb73857a |
894 | |
895 | $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ) |
eb480a0b |
896 | $(LINK32) -subsystem:console -nodefaultlib -out:$@ $(LINK_FLAGS) \ |
baed7233 |
897 | $(LIBBASEFILES) $(PERL95_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) \ |
898 | libcmt.lib |
08aa1457 |
899 | |
900 | .ENDIF |
d56e6723 |
901 | .ENDIF |
e7083a8c |
902 | .ENDIF |
08aa1457 |
903 | |
904 | $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) |
eb480a0b |
905 | if not exist $(AUTODIR) mkdir $(AUTODIR) |
bfab39a2 |
906 | cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL |
08aa1457 |
907 | $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) |
908 | cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c |
909 | $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c . |
910 | |
064a70d4 |
911 | .IF "$(OBJECT)" == "-DPERL_OBJECT" |
912 | |
6de196ee |
913 | perlCAPI.cpp : $(MINIPERL) |
58a50f62 |
914 | $(MINIPERL) GenCAPI.pl $(COREDIR) |
915 | |
6de196ee |
916 | perlCAPI$(o) : perlCAPI.cpp |
064a70d4 |
917 | .IF "$(CCTYPE)" == "BORLAND" |
6de196ee |
918 | $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp |
064a70d4 |
919 | .ELIF "$(CCTYPE)" == "GCC" |
6de196ee |
920 | $(CC) $(CFLAGS_O) -c $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp |
064a70d4 |
921 | .ELSE |
d17537aa |
922 | $(CC) $(CFLAGS_O) $(RUNTIME) -UPERLDLL -c \ |
6de196ee |
923 | $(OBJOUT_FLAG)perlCAPI$(o) perlCAPI.cpp |
064a70d4 |
924 | .ENDIF |
58a50f62 |
925 | |
6de196ee |
926 | $(CAPILIB) : perlCAPI.cpp perlCAPI$(o) |
064a70d4 |
927 | .IF "$(CCTYPE)" == "BORLAND" |
6de196ee |
928 | $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) +perlCAPI$(o) |
064a70d4 |
929 | .ELSE |
6de196ee |
930 | $(LIB32) $(LIBOUT_FLAG)$(CAPILIB) perlCAPI$(o) |
064a70d4 |
931 | .ENDIF |
932 | |
933 | .ENDIF |
58a50f62 |
934 | |
08aa1457 |
935 | $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs |
936 | copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs |
937 | |
823edd99 |
938 | $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs |
939 | cd $(EXTDIR)\Data\$(*B) && \ |
940 | ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl |
941 | cd $(EXTDIR)\Data\$(*B) && $(MAKE) |
942 | |
15e52e56 |
943 | $(RE_DLL): $(PERLEXE) $(RE).xs |
944 | cd $(EXTDIR)\$(*B) && \ |
945 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
946 | cd $(EXTDIR)\$(*B) && $(MAKE) |
947 | |
2a321948 |
948 | $(B_DLL): $(PERLEXE) $(B).xs |
949 | cd $(EXTDIR)\$(*B) && \ |
950 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
951 | cd $(EXTDIR)\$(*B) && $(MAKE) |
952 | |
a98bd6f4 |
953 | $(THREAD_DLL): $(PERLEXE) $(THREAD).xs |
954 | cd $(EXTDIR)\$(*B) && \ |
955 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
956 | cd $(EXTDIR)\$(*B) && $(MAKE) |
957 | |
5d925967 |
958 | $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs |
959 | cd $(EXTDIR)\$(*B) && \ |
960 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
961 | cd $(EXTDIR)\$(*B) && $(MAKE) |
962 | |
6dead956 |
963 | $(POSIX_DLL): $(PERLEXE) $(POSIX).xs |
964 | cd $(EXTDIR)\$(*B) && \ |
965 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
966 | cd $(EXTDIR)\$(*B) && $(MAKE) |
967 | |
5d925967 |
968 | $(IO_DLL): $(PERLEXE) $(IO).xs |
08aa1457 |
969 | cd $(EXTDIR)\$(*B) && \ |
970 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
971 | cd $(EXTDIR)\$(*B) && $(MAKE) |
972 | |
973 | $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs |
974 | cd $(EXTDIR)\$(*B) && \ |
975 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
976 | cd $(EXTDIR)\$(*B) && $(MAKE) |
977 | |
978 | $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs |
979 | cd $(EXTDIR)\$(*B) && \ |
980 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
981 | cd $(EXTDIR)\$(*B) && $(MAKE) |
982 | |
983 | $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs |
984 | cd $(EXTDIR)\$(*B) && \ |
985 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
986 | cd $(EXTDIR)\$(*B) && $(MAKE) |
987 | |
5d925967 |
988 | $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs |
08aa1457 |
989 | cd $(EXTDIR)\$(*B) && \ |
990 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
991 | cd $(EXTDIR)\$(*B) && $(MAKE) |
992 | |
eab60bb1 |
993 | $(ERRNO_PM): $(PERLEXE) $(ERRNO)_pm.PL |
994 | cd $(EXTDIR)\$(*B) && \ |
995 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
996 | cd $(EXTDIR)\$(*B) && $(MAKE) |
997 | |
08aa1457 |
998 | doc: $(PERLEXE) |
d07c2202 |
999 | $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \ |
b3b61bd8 |
1000 | --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\ |
08aa1457 |
1001 | --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse |
1002 | |
4a71ed0c |
1003 | utils: $(PERLEXE) $(X2P) |
08aa1457 |
1004 | cd ..\utils && $(MAKE) PERL=$(MINIPERL) |
66aa1127 |
1005 | copy ..\README.win32 ..\pod\perlwin32.pod |
4a71ed0c |
1006 | cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters |
1007 | $(PERLEXE) $(PL2BAT) $(UTILS) |
08aa1457 |
1008 | |
1009 | distclean: clean |
dc050285 |
1010 | -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \ |
eda5ff31 |
1011 | $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD) |
08aa1457 |
1012 | -del /f *.def *.map |
eab60bb1 |
1013 | -del /f $(EXTENSION_DLL) $(EXTENSION_PM) |
1014 | -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm |
eb480a0b |
1015 | -del /f $(EXTDIR)\DynaLoader\dl_win32.xs |
1016 | -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm |
1017 | -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm |
1018 | -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm |
1019 | -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm |
15e52e56 |
1020 | -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm |
823edd99 |
1021 | -del /f $(LIBDIR)\Data\Dumper.pm |
eb480a0b |
1022 | -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO |
1023 | -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread |
1024 | -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B |
823edd99 |
1025 | -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data |
08aa1457 |
1026 | -del /f $(PODDIR)\*.html |
1027 | -del /f $(PODDIR)\*.bat |
eb480a0b |
1028 | -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct *.bat |
1029 | -cd ..\x2p && del /f find2perl s2p *.bat |
d444a431 |
1030 | -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new |
eb480a0b |
1031 | -del /f $(CONFIGPM) |
d444a431 |
1032 | .IF "$(PERL95EXE)" != "" |
1033 | -del /f perl95.c |
1034 | .ENDIF |
1035 | -del /f bin\*.bat |
eda5ff31 |
1036 | -cd $(EXTDIR) && del /s *$(a) *.def *.map *.bs Makefile *$(o) pm_to_blib |
eb480a0b |
1037 | -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR) |
d07c2202 |
1038 | -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR) |
08aa1457 |
1039 | |
4a71ed0c |
1040 | install : all installbare installhtml |
6dead956 |
1041 | |
4a71ed0c |
1042 | installbare : utils |
d07c2202 |
1043 | $(PERLEXE) ..\installperl |
08aa1457 |
1044 | .IF "$(PERL95EXE)" != "" |
1045 | $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.* |
1046 | .ENDIF |
1047 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
e5a95ffb |
1048 | $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* |
6dead956 |
1049 | |
1050 | installhtml : doc |
08aa1457 |
1051 | $(RCOPY) html\*.* $(INST_HTML)\*.* |
1052 | |
1053 | inst_lib : $(CONFIGPM) |
1054 | copy splittree.pl .. |
eb480a0b |
1055 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) |
08aa1457 |
1056 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
1057 | |
dfb634a9 |
1058 | minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils |
08aa1457 |
1059 | $(XCOPY) $(MINIPERL) ..\t\perl.exe |
1060 | .IF "$(CCTYPE)" == "BORLAND" |
1061 | $(XCOPY) $(GLOBBAT) ..\t\$(NULL) |
1062 | .ELSE |
1063 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
1064 | .ENDIF |
1065 | attrib -r ..\t\*.* |
1066 | copy test ..\t |
1067 | cd ..\t && \ |
1068 | $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t |
1069 | |
dfb634a9 |
1070 | test-prep : all utils |
08aa1457 |
1071 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
1072 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) |
1073 | .IF "$(CCTYPE)" == "BORLAND" |
1074 | $(XCOPY) $(GLOBBAT) ..\t\$(NULL) |
1075 | .ELSE |
1076 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
1077 | .ENDIF |
32f822de |
1078 | |
1079 | test : test-prep |
08aa1457 |
1080 | cd ..\t && $(PERLEXE) -I..\lib harness |
1081 | |
32f822de |
1082 | test-notty : test-prep |
1083 | set PERL_SKIP_TTY_TEST=1 && \ |
1084 | cd ..\t && $(PERLEXE) -I.\lib harness |
1085 | |
08aa1457 |
1086 | clean : |
d56e6723 |
1087 | -@erase miniperlmain$(o) |
08aa1457 |
1088 | -@erase $(MINIPERL) |
d56e6723 |
1089 | -@erase perlglob$(o) |
1090 | -@erase perlmain$(o) |
6de196ee |
1091 | -@erase perlCAPI.cpp |
08aa1457 |
1092 | -@erase config.w32 |
1093 | -@erase /f config.h |
1094 | -@erase $(GLOBEXE) |
1095 | -@erase $(PERLEXE) |
1096 | -@erase $(PERLDLL) |
1097 | -@erase $(CORE_OBJ) |
eb480a0b |
1098 | -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR) |
08aa1457 |
1099 | -@erase $(WIN32_OBJ) |
1100 | -@erase $(DLL_OBJ) |
d07c2202 |
1101 | -@erase $(X2P_OBJ) |
eda5ff31 |
1102 | -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp |
d444a431 |
1103 | -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat |
d07c2202 |
1104 | -@erase ..\x2p\*.exe ..\x2p\*.bat |
08aa1457 |
1105 | -@erase *.ilk |
1106 | -@erase *.pdb |