Commit | Line | Data |
08aa1457 |
1 | # |
d56e6723 |
2 | # Makefile to build perl on Windowns NT using DMAKE. |
3 | # Supported compilers: |
4 | # Visual C++ 2.0 thro 5.0 |
5 | # Borland C++ 5.02 |
6 | # Mingw32-0.1.4 with gcc-2.7.2 |
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 | |
12 | # |
13 | # Set these to wherever you want "nmake install" to put your |
14 | # newly built perl. |
d56e6723 |
15 | INST_DRV *= c: |
16 | INST_TOP *= $(INST_DRV)\perl5004.5x |
17 | |
18 | # |
d07c2202 |
19 | # uncomment to enable threads-capabilities |
20 | #USE_THREADS *= -DUSE_THREADS |
08aa1457 |
21 | |
22 | # |
d56e6723 |
23 | # uncomment one |
24 | #CCTYPE *= MSVC20 |
25 | #CCTYPE *= MSVC |
26 | CCTYPE *= BORLAND |
27 | #CCTYPE *= GCC |
08aa1457 |
28 | |
29 | # |
8f818fa0 |
30 | # uncomment next line if you want to use the perl object |
31 | #OBJECT *= -DPERL_OBJECT |
32 | |
33 | # |
08aa1457 |
34 | # uncomment next line if you want debug version of perl (big,slow) |
d56e6723 |
35 | #CFG *= Debug |
08aa1457 |
36 | |
37 | # |
26618a56 |
38 | # if you have the source for des_fcrypt(), uncomment this and make sure the |
39 | # file exists (see README.win32) |
40 | #CRYPT_SRC *= des_fcrypt.c |
41 | |
42 | # |
43 | # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a |
44 | # library, uncomment this, and make sure the library exists (see README.win32) |
45 | #CRYPT_LIB *= des_fcrypt.lib |
46 | |
47 | # |
08aa1457 |
48 | # set the install locations of the compiler include/libraries |
d56e6723 |
49 | #CCHOME *= f:\msdev\vc |
50 | CCHOME *= C:\bc5 |
4a52a3da |
51 | #CCHOME *= D:\packages\mingw32 |
d56e6723 |
52 | CCINCDIR *= $(CCHOME)\include |
53 | CCLIBDIR *= $(CCHOME)\lib |
08aa1457 |
54 | |
55 | # |
56 | # set this to point to cmd.exe (only needed if you use some |
57 | # alternate shell that doesn't grok cmd.exe style commands) |
d56e6723 |
58 | #SHELL *= g:\winnt\system32\cmd.exe |
08aa1457 |
59 | |
60 | # |
61 | # set this to your email address (perl will guess a value from |
62 | # from your loginname and your hostname, which may not be right) |
d56e6723 |
63 | #EMAIL *= |
08aa1457 |
64 | |
65 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### |
66 | |
26618a56 |
67 | .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" |
68 | D_CRYPT=undef |
69 | .ELSE |
70 | D_CRYPT=define |
71 | CRYPT_FLAG=-DHAVE_DES_FCRYPT |
72 | .ENDIF |
73 | |
d07c2202 |
74 | BUILDOPT *= $(USE_THREADS) |
75 | #BUILDOPT *= $(USE_THREADS) -DMULTIPLICITY |
76 | #BUILDOPT *= $(USE_THREADS) -DPERL_GLOBAL_STRUCT -DMULTIPLICITY |
77 | # -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include |
78 | |
79 | .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE |
80 | |
81 | PROCESSOR_ARCHITECTURE *= x86 |
82 | |
83 | .IF "$(USE_THREADS)" == "" |
84 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) |
85 | .ELSE |
86 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread |
87 | .ENDIF |
88 | |
89 | ARCHDIR = ..\lib\$(ARCHNAME) |
90 | COREDIR = ..\lib\CORE |
91 | |
08aa1457 |
92 | # |
93 | # Programs to compile, build .lib files and link |
94 | # |
95 | |
96 | .USESHELL : |
97 | |
98 | .IF "$(CCTYPE)" == "BORLAND" |
99 | |
100 | CC = bcc32 |
101 | LINK32 = tlink32 |
102 | LIB32 = tlib |
c31fac66 |
103 | IMPLIB = implib -c |
08aa1457 |
104 | |
105 | # |
106 | # Options |
107 | # |
108 | RUNTIME = -D_RTLDLL |
109 | INCLUDES = -I.\include -I. -I.. -I$(CCINCDIR) |
110 | #PCHFLAGS = -H -H$(INTDIR)\bcmoduls.pch |
8f818fa0 |
111 | DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG) $(OBJECT) |
c31fac66 |
112 | LOCDEFS = -DPERLDLL -DPERL_CORE |
08aa1457 |
113 | SUBSYS = console |
114 | LIBC = cw32mti.lib |
26618a56 |
115 | LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC) odbc32.lib odbccp32.lib |
08aa1457 |
116 | |
117 | WINIOMAYBE = |
118 | |
119 | .IF "$(CFG)" == "Debug" |
910dfcc8 |
120 | OPTIMIZE = -v $(RUNTIME) -DDEBUGGING |
08aa1457 |
121 | LINK_DBG = -v |
122 | .ELSE |
d55594ae |
123 | OPTIMIZE = -5 -O2 $(RUNTIME) |
08aa1457 |
124 | LINK_DBG = |
125 | .ENDIF |
126 | |
8f818fa0 |
127 | .IF "$(OBJECT)" == "-DPERL_OBJECT" |
128 | CFLAGS = -w -d -tWM -tWD -P $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) |
129 | .ELSE |
910dfcc8 |
130 | CFLAGS = -w -d -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) |
8f818fa0 |
131 | .ENDIF |
08aa1457 |
132 | LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) |
133 | OBJOUT_FLAG = -o |
d56e6723 |
134 | EXEOUT_FLAG = -e |
135 | |
136 | .ELIF "$(CCTYPE)" == "GCC" |
137 | |
138 | CC = gcc -pipe |
4a52a3da |
139 | LINK32 = gcc -pipe |
d56e6723 |
140 | LIB32 = ar |
141 | IMPLIB = dlltool |
142 | |
143 | o = .o |
144 | |
145 | # |
146 | # Options |
147 | # |
148 | RUNTIME = |
149 | INCLUDES = -I.\include -I. -I.. |
8f818fa0 |
150 | DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG) $(OBJECT) |
d56e6723 |
151 | LOCDEFS = -DPERLDLL -DPERL_CORE |
152 | SUBSYS = console |
153 | LIBC = -lcrtdll |
26618a56 |
154 | LIBFILES = $(CRYPT_LIB) -ladvapi32 -luser32 -lwsock32 -lmingw32 -lgcc -lmoldname $(LIBC) \ |
d56e6723 |
155 | -lkernel32 |
156 | |
157 | WINIOMAYBE = |
158 | |
159 | .IF "$(CFG)" == "Debug" |
160 | OPTIMIZE = -g -O2 $(RUNTIME) -DDEBUGGING |
161 | LINK_DBG = -g |
162 | .ELSE |
163 | OPTIMIZE = -g -O2 $(RUNTIME) |
164 | LINK_DBG = |
165 | .ENDIF |
166 | |
8f818fa0 |
167 | .IF "$(OBJECT)" == "-DPERL_OBJECT" |
d56e6723 |
168 | CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) |
8f818fa0 |
169 | .ELSE |
170 | CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) |
171 | .ENDIF |
d56e6723 |
172 | LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) |
173 | OBJOUT_FLAG = -o |
174 | EXEOUT_FLAG = -o |
08aa1457 |
175 | |
176 | .ELSE |
177 | |
178 | CC=cl.exe |
179 | LINK32=link.exe |
180 | LIB32=$(LINK32) -lib |
181 | # |
182 | # Options |
183 | # |
184 | .IF "$(RUNTIME)" == "" |
185 | RUNTIME = -MD |
186 | .ENDIF |
187 | INCLUDES = -I.\include -I. -I.. |
188 | #PCHFLAGS = -Fp$(INTDIR)\vcmoduls.pch -YX |
8f818fa0 |
189 | DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG) $(OBJECT) |
c31fac66 |
190 | LOCDEFS = -DPERLDLL -DPERL_CORE |
08aa1457 |
191 | SUBSYS = console |
192 | |
193 | .IF "$(RUNTIME)" == "-MD" |
194 | LIBC = msvcrt.lib |
195 | WINIOMAYBE = |
196 | .ELSE |
197 | LIBC = libcmt.lib |
390b85e7 |
198 | WINIOMAYBE = |
08aa1457 |
199 | .ENDIF |
200 | |
201 | .IF "$(CFG)" == "Debug" |
202 | .IF "$(CCTYPE)" == "MSVC20" |
910dfcc8 |
203 | OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING |
08aa1457 |
204 | .ELSE |
910dfcc8 |
205 | OPTIMIZE = -Od $(RUNTIME)d -Z7 -D_DEBUG -DDEBUGGING |
08aa1457 |
206 | .ENDIF |
207 | LINK_DBG = -debug -pdb:none |
208 | .ELSE |
209 | .IF "$(CCTYPE)" == "MSVC20" |
31948633 |
210 | OPTIMIZE = -O1 $(RUNTIME) -DNDEBUG |
08aa1457 |
211 | .ELSE |
31948633 |
212 | OPTIMIZE = -O1 $(RUNTIME) -DNDEBUG |
08aa1457 |
213 | .ENDIF |
214 | LINK_DBG = -release |
215 | .ENDIF |
216 | |
217 | # we don't add LIBC here, the compiler do it based on -MD/-MT |
26618a56 |
218 | LIBFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \ |
08aa1457 |
219 | winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \ |
220 | oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \ |
221 | version.lib odbc32.lib odbccp32.lib |
222 | |
8f818fa0 |
223 | .IF "$(OBJECT)" == "-DPERL_OBJECT" |
224 | CFLAGS = -nologo -Gf -W3 -TP $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) |
225 | .ELSE |
d56e6723 |
226 | CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) |
8f818fa0 |
227 | .ENDIF |
dc050285 |
228 | LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) |
08aa1457 |
229 | OBJOUT_FLAG = -Fo |
d56e6723 |
230 | EXEOUT_FLAG = -Fe |
08aa1457 |
231 | |
232 | .ENDIF |
233 | |
234 | #################### do not edit below this line ####################### |
235 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## |
236 | |
d56e6723 |
237 | o *= .obj |
238 | |
08aa1457 |
239 | # |
240 | # Rules |
241 | # |
08aa1457 |
242 | |
d56e6723 |
243 | .SUFFIXES : .c $(o) .dll .lib .exe .a |
244 | |
245 | .c$(o): |
3730b96e |
246 | $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS) $(OBJOUT_FLAG)$@ $< |
d07c2202 |
247 | |
248 | .y.c: |
249 | $(NOOP) |
08aa1457 |
250 | |
d56e6723 |
251 | $(o).dll: |
08aa1457 |
252 | .IF "$(CCTYPE)" == "BORLAND" |
d56e6723 |
253 | $(LINK32) -Tpd -ap $(LINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def |
08aa1457 |
254 | $(IMPLIB) $(*B).lib $@ |
d56e6723 |
255 | .ELIF "$(CCTYPE)" == "GCC" |
256 | $(LINK32) -o $@ $(LINK_FLAGS) $< $(LIBFILES) |
257 | $(IMPLIB) -def $(*B).def $(*B).lib $@ |
08aa1457 |
258 | .ELSE |
08aa1457 |
259 | $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ |
dc050285 |
260 | -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL) |
08aa1457 |
261 | .ENDIF |
262 | |
263 | # |
264 | INST_BIN=$(INST_TOP)\bin |
265 | INST_LIB=$(INST_TOP)\lib |
266 | INST_POD=$(INST_LIB)\pod |
267 | INST_HTML=$(INST_POD)\html |
268 | LIBDIR=..\lib |
269 | EXTDIR=..\ext |
270 | PODDIR=..\pod |
271 | EXTUTILSDIR=$(LIBDIR)\extutils |
272 | |
273 | # |
274 | # various targets |
275 | PERLIMPLIB=..\perl.lib |
276 | MINIPERL=..\miniperl.exe |
277 | PERLDLL=..\perl.dll |
278 | PERLEXE=..\perl.exe |
279 | GLOBEXE=..\perlglob.exe |
280 | CONFIGPM=..\lib\Config.pm |
281 | MINIMOD=..\lib\ExtUtils\Miniperl.pm |
d07c2202 |
282 | X2P=..\x2p\a2p.exe |
08aa1457 |
283 | |
d444a431 |
284 | PL2BAT=bin\pl2bat.pl |
285 | GLOBBAT = bin\perlglob.bat |
08aa1457 |
286 | |
287 | .IF "$(CCTYPE)" == "BORLAND" |
288 | |
08aa1457 |
289 | CFGSH_TMPL = config.bc |
290 | CFGH_TMPL = config_H.bc |
d56e6723 |
291 | |
292 | .ELIF "$(CCTYPE)" == "GCC" |
293 | |
294 | CFGSH_TMPL = config.gc |
295 | CFGH_TMPL = config_H.gc |
08aa1457 |
296 | |
297 | .ELSE |
298 | |
299 | MAKE = nmake -nologo |
300 | CFGSH_TMPL = config.vc |
301 | CFGH_TMPL = config_H.vc |
302 | PERL95EXE=..\perl95.exe |
303 | |
304 | .ENDIF |
305 | |
306 | XCOPY=xcopy /f /r /i /d |
307 | RCOPY=xcopy /f /r /i /e /d |
d07c2202 |
308 | NOOP=@echo |
08aa1457 |
309 | #NULL= |
310 | |
26618a56 |
311 | .IF "$(CRYPT_SRC)" != "" |
312 | CRYPT_OBJ=$(CRYPT_SRC:db:+$(o)) |
313 | .ENDIF |
314 | |
08aa1457 |
315 | # |
316 | # filenames given to xsubpp must have forward slashes (since it puts |
317 | # full pathnames in #line strings) |
318 | XSUBPP=..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes |
319 | |
320 | CORE_C= ..\av.c \ |
321 | ..\deb.c \ |
322 | ..\doio.c \ |
323 | ..\doop.c \ |
324 | ..\dump.c \ |
325 | ..\globals.c \ |
326 | ..\gv.c \ |
327 | ..\hv.c \ |
328 | ..\mg.c \ |
329 | ..\op.c \ |
330 | ..\perl.c \ |
331 | ..\perlio.c \ |
332 | ..\perly.c \ |
333 | ..\pp.c \ |
334 | ..\pp_ctl.c \ |
335 | ..\pp_hot.c \ |
336 | ..\pp_sys.c \ |
337 | ..\regcomp.c \ |
338 | ..\regexec.c \ |
339 | ..\run.c \ |
340 | ..\scope.c \ |
341 | ..\sv.c \ |
342 | ..\taint.c \ |
343 | ..\toke.c \ |
344 | ..\universal.c \ |
bbc8f9de |
345 | ..\util.c \ |
26618a56 |
346 | ..\malloc.c \ |
347 | $(CRYPT_SRC) |
08aa1457 |
348 | |
d56e6723 |
349 | CORE_OBJ= ..\av$(o) \ |
350 | ..\deb$(o) \ |
351 | ..\doio$(o) \ |
352 | ..\doop$(o) \ |
353 | ..\dump$(o) \ |
354 | ..\globals$(o) \ |
355 | ..\gv$(o) \ |
356 | ..\hv$(o) \ |
357 | ..\mg$(o) \ |
358 | ..\op$(o) \ |
359 | ..\perl$(o) \ |
360 | ..\perlio$(o) \ |
361 | ..\perly$(o) \ |
362 | ..\pp$(o) \ |
363 | ..\pp_ctl$(o) \ |
364 | ..\pp_hot$(o) \ |
365 | ..\pp_sys$(o) \ |
366 | ..\regcomp$(o) \ |
367 | ..\regexec$(o) \ |
368 | ..\run$(o) \ |
369 | ..\scope$(o) \ |
370 | ..\sv$(o) \ |
371 | ..\taint$(o) \ |
372 | ..\toke$(o) \ |
373 | ..\universal$(o)\ |
374 | ..\util$(o) \ |
26618a56 |
375 | ..\malloc$(o) \ |
376 | $(CRYPT_OBJ) |
08aa1457 |
377 | |
378 | WIN32_C = perllib.c \ |
379 | win32.c \ |
d55594ae |
380 | win32sck.c \ |
381 | win32thread.c |
08aa1457 |
382 | |
d56e6723 |
383 | WIN32_OBJ = win32$(o) \ |
384 | win32sck$(o) \ |
385 | win32thread$(o) |
08aa1457 |
386 | |
d56e6723 |
387 | PERL95_OBJ = perl95$(o) \ |
388 | win32mt$(o) \ |
26618a56 |
389 | win32sckmt$(o) \ |
390 | $(CRYPT_OBJ) |
fb73857a |
391 | |
d56e6723 |
392 | DLL_OBJ = perllib$(o) $(DYNALOADER)$(o) |
08aa1457 |
393 | |
d07c2202 |
394 | X2P_OBJ = ..\x2p\a2p$(o) \ |
395 | ..\x2p\hash$(o) \ |
396 | ..\x2p\str$(o) \ |
397 | ..\x2p\util$(o) \ |
398 | ..\x2p\walk$(o) |
399 | |
08aa1457 |
400 | CORE_H = ..\av.h \ |
401 | ..\cop.h \ |
402 | ..\cv.h \ |
403 | ..\dosish.h \ |
404 | ..\embed.h \ |
405 | ..\form.h \ |
406 | ..\gv.h \ |
407 | ..\handy.h \ |
408 | ..\hv.h \ |
409 | ..\mg.h \ |
410 | ..\nostdio.h \ |
411 | ..\op.h \ |
412 | ..\opcode.h \ |
413 | ..\perl.h \ |
414 | ..\perlio.h \ |
415 | ..\perlsdio.h \ |
416 | ..\perlsfio.h \ |
417 | ..\perly.h \ |
418 | ..\pp.h \ |
419 | ..\proto.h \ |
420 | ..\regexp.h \ |
421 | ..\scope.h \ |
422 | ..\sv.h \ |
5d925967 |
423 | ..\thread.h \ |
08aa1457 |
424 | ..\unixish.h \ |
425 | ..\util.h \ |
426 | ..\XSUB.h \ |
427 | .\config.h \ |
428 | ..\EXTERN.h \ |
910dfcc8 |
429 | ..\perlvars.h \ |
430 | ..\intrpvar.h \ |
431 | ..\thrdvar.h \ |
08aa1457 |
432 | .\include\dirent.h \ |
433 | .\include\netdb.h \ |
434 | .\include\sys\socket.h \ |
435 | .\win32.h |
436 | |
2a321948 |
437 | DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread B |
dc050285 |
438 | STATIC_EXT=DynaLoader |
08aa1457 |
439 | |
440 | DYNALOADER=$(EXTDIR)\DynaLoader\DynaLoader |
441 | SOCKET=$(EXTDIR)\Socket\Socket |
442 | FCNTL=$(EXTDIR)\Fcntl\Fcntl |
443 | OPCODE=$(EXTDIR)\Opcode\Opcode |
444 | SDBM_FILE=$(EXTDIR)\SDBM_File\SDBM_File |
445 | IO=$(EXTDIR)\IO\IO |
5d925967 |
446 | ATTRS=$(EXTDIR)\attrs\attrs |
a98bd6f4 |
447 | THREAD=$(EXTDIR)\Thread\Thread |
2a321948 |
448 | B=$(EXTDIR)\B\B |
08aa1457 |
449 | |
450 | SOCKET_DLL=..\lib\auto\Socket\Socket.dll |
451 | FCNTL_DLL=..\lib\auto\Fcntl\Fcntl.dll |
452 | OPCODE_DLL=..\lib\auto\Opcode\Opcode.dll |
453 | SDBM_FILE_DLL=..\lib\auto\SDBM_File\SDBM_File.dll |
454 | IO_DLL=..\lib\auto\IO\IO.dll |
5d925967 |
455 | ATTRS_DLL=..\lib\auto\attrs\attrs.dll |
a98bd6f4 |
456 | THREAD_DLL=..\lib\auto\Thread\Thread.dll |
2a321948 |
457 | B_DLL=..\lib\auto\B\B.dll |
08aa1457 |
458 | |
459 | STATICLINKMODULES=DynaLoader |
460 | DYNALOADMODULES= \ |
461 | $(SOCKET_DLL) \ |
462 | $(FCNTL_DLL) \ |
463 | $(OPCODE_DLL) \ |
464 | $(SDBM_FILE_DLL)\ |
5d925967 |
465 | $(IO_DLL) \ |
a98bd6f4 |
466 | $(ATTRS_DLL) \ |
2a321948 |
467 | $(THREAD_DLL) \ |
468 | $(B_DLL) |
08aa1457 |
469 | |
470 | POD2HTML=$(PODDIR)\pod2html |
471 | POD2MAN=$(PODDIR)\pod2man |
472 | POD2LATEX=$(PODDIR)\pod2latex |
473 | POD2TEXT=$(PODDIR)\pod2text |
474 | |
475 | # |
476 | # Top targets |
477 | # |
478 | |
d07c2202 |
479 | all: $(PERLEXE) $(PERL95EXE) $(GLOBEXE) $(DYNALOADMODULES) $(MINIMOD) \ |
dfb634a9 |
480 | $(X2P) |
08aa1457 |
481 | |
d56e6723 |
482 | $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c |
08aa1457 |
483 | |
484 | #------------------------------------------------------------ |
485 | |
d56e6723 |
486 | $(GLOBEXE): perlglob$(o) |
08aa1457 |
487 | .IF "$(CCTYPE)" == "BORLAND" |
488 | $(CC) -c -w -v -tWM -I$(CCINCDIR) perlglob.c |
d56e6723 |
489 | $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \ |
490 | $(CCLIBDIR)\32BIT\wildargs$(o),$@,,import32.lib cw32mt.lib, |
491 | .ELIF "$(CCTYPE)" == "GCC" |
492 | $(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES) |
08aa1457 |
493 | .ELSE |
dc050285 |
494 | $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ |
d56e6723 |
495 | perlglob$(o) setargv$(o) |
08aa1457 |
496 | .ENDIF |
497 | |
d56e6723 |
498 | perlglob$(o) : perlglob.c |
08aa1457 |
499 | |
d56e6723 |
500 | ..\miniperlmain$(o) : ..\miniperlmain.c $(CORE_H) |
08aa1457 |
501 | |
502 | config.w32 : $(CFGSH_TMPL) |
503 | copy $(CFGSH_TMPL) config.w32 |
504 | |
d55594ae |
505 | .\config.h : $(CFGH_TMPL) |
08aa1457 |
506 | -del /f config.h |
507 | copy $(CFGH_TMPL) config.h |
508 | |
509 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL |
910dfcc8 |
510 | $(MINIPERL) -I..\lib config_sh.PL \ |
511 | "INST_DRV=$(INST_DRV)" \ |
512 | "INST_TOP=$(INST_TOP)" \ |
d07c2202 |
513 | "archname=$(ARCHNAME)" \ |
910dfcc8 |
514 | "cc=$(CC)" \ |
515 | "ccflags=$(OPTIMIZE) $(DEFINES)" \ |
516 | "cf_email=$(EMAIL)" \ |
26618a56 |
517 | "d_crypt=$(D_CRYPT)" \ |
910dfcc8 |
518 | "libs=$(LIBFILES:f)" \ |
519 | "incpath=$(CCINCDIR)" \ |
520 | "libpth=$(strip $(CCLIBDIR) $(LIBFILES:d))" \ |
521 | "libc=$(LIBC)" \ |
522 | "static_ext=$(STATIC_EXT)" \ |
523 | "dynamic_ext=$(DYNAMIC_EXT)" \ |
aa4575bf |
524 | "LINK_FLAGS=$(LINK_FLAGS)" \ |
910dfcc8 |
525 | "optimize=$(OPTIMIZE)" \ |
526 | config.w32 > ..\config.sh |
08aa1457 |
527 | |
528 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl |
529 | cd .. && miniperl configpm |
530 | if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) |
d07c2202 |
531 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
532 | $(XCOPY) *.h $(COREDIR)\*.* |
533 | $(RCOPY) include $(COREDIR)\*.* |
08aa1457 |
534 | $(MINIPERL) -I..\lib config_h.PL || $(MAKE) CCTYPE=$(CCTYPE) \ |
d56e6723 |
535 | CFG=$(CFG) $(CONFIGPM) |
08aa1457 |
536 | |
d56e6723 |
537 | LKPRE = INPUT ( |
538 | LKPOST = ) |
539 | |
540 | $(MINIPERL) : ..\miniperlmain$(o) $(CORE_OBJ) $(WIN32_OBJ) |
08aa1457 |
541 | .IF "$(CCTYPE)" == "BORLAND" |
542 | $(LINK32) -Tpe -ap $(LINK_FLAGS) \ |
d56e6723 |
543 | @$(mktmp c0x32$(o) ..\miniperlmain$(o) \ |
d07c2202 |
544 | $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) |
d56e6723 |
545 | .ELIF "$(CCTYPE)" == "GCC" |
546 | $(LINK32) -v -o $@ $(LINK_FLAGS) \ |
547 | $(mktmp $(LKPRE) ..\miniperlmain$(o) \ |
548 | $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
08aa1457 |
549 | .ELSE |
550 | $(LINK32) -subsystem:console -out:$@ \ |
d56e6723 |
551 | @$(mktmp $(LINK_FLAGS) $(LIBFILES) ..\miniperlmain$(o) \ |
08aa1457 |
552 | $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\)) |
553 | .ENDIF |
554 | |
555 | $(WIN32_OBJ) : $(CORE_H) |
556 | $(CORE_OBJ) : $(CORE_H) |
557 | $(DLL_OBJ) : $(CORE_H) |
d07c2202 |
558 | $(X2P_OBJ) : $(CORE_H) |
08aa1457 |
559 | |
d55594ae |
560 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl |
910dfcc8 |
561 | $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) \ |
562 | CCTYPE=$(CCTYPE) > perldll.def |
08aa1457 |
563 | |
564 | $(PERLDLL): perldll.def $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) |
565 | .IF "$(CCTYPE)" == "BORLAND" |
566 | $(LINK32) -Tpd -ap $(LINK_FLAGS) \ |
d56e6723 |
567 | @$(mktmp c0d32$(o) $(CORE_OBJ:s,\,\\) \ |
08aa1457 |
568 | $(WIN32_OBJ:s,\,\\) $(DLL_OBJ:s,\,\\)\n \ |
569 | $@,\n \ |
570 | $(LIBFILES)\n \ |
571 | perldll.def\n) |
572 | $(IMPLIB) $*.lib $@ |
d56e6723 |
573 | .ELIF "$(CCTYPE)" == "GCC" |
3730b96e |
574 | $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \ |
d56e6723 |
575 | $(mktmp $(LKPRE) $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\) \ |
576 | $(DLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
577 | dlltool --output-lib $(PERLIMPLIB) \ |
578 | --dllname perl.dll \ |
579 | --def perldll.def \ |
580 | --base-file perl.base \ |
581 | --output-exp perl.exp |
3730b96e |
582 | $(LINK32) -mdll -o $@ $(LINK_FLAGS) \ |
d56e6723 |
583 | $(mktmp $(LKPRE) $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\) \ |
584 | $(DLL_OBJ:s,\,\\) $(LIBFILES) perl.exp $(LKPOST)) |
08aa1457 |
585 | .ELSE |
586 | $(LINK32) -dll -def:perldll.def -out:$@ \ |
dc050285 |
587 | @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ:s,\,\\) \ |
08aa1457 |
588 | $(WIN32_OBJ:s,\,\\) $(DLL_OBJ:s,\,\\)) |
589 | .ENDIF |
d07c2202 |
590 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) |
08aa1457 |
591 | |
592 | perl.def : $(MINIPERL) makeperldef.pl |
593 | $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def |
594 | |
595 | $(MINIMOD) : $(MINIPERL) ..\minimod.pl |
596 | cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm |
597 | |
d07c2202 |
598 | $(X2P) : $(X2P_OBJ) |
599 | $(MINIPERL) ..\x2p\find2perl.PL |
600 | $(MINIPERL) ..\x2p\s2p.PL |
601 | .IF "$(CCTYPE)" == "BORLAND" |
602 | $(LINK32) -Tpe -ap $(LINK_FLAGS) \ |
603 | @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),) |
604 | .ELIF "$(CCTYPE)" == "GCC" |
605 | $(LINK32) -v -o $@ $(LINK_FLAGS) \ |
606 | $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST)) |
607 | .ELSE |
608 | $(LINK32) -subsystem:console -out:$@ \ |
609 | @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\) |
610 | .ENDIF |
611 | |
08aa1457 |
612 | perlmain.c : runperl.c |
613 | copy runperl.c perlmain.c |
614 | |
d56e6723 |
615 | perlmain$(o) : perlmain.c |
616 | $(CC) $(CFLAGS) -UPERLDLL $(EXEOUT_FLAG)$@ -c perlmain.c |
08aa1457 |
617 | |
d56e6723 |
618 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) perlmain$(o) |
08aa1457 |
619 | .IF "$(CCTYPE)" == "BORLAND" |
620 | $(LINK32) -Tpe -ap $(LINK_FLAGS) \ |
d56e6723 |
621 | @$(mktmp c0x32$(o) perlmain$(o) $(WINIOMAYBE)\n \ |
08aa1457 |
622 | $@,\n \ |
623 | $(PERLIMPLIB) $(LIBFILES)\n) |
d56e6723 |
624 | .ELIF "$(CCTYPE)" == "GCC" |
625 | $(LINK32) -o $@ $(LINK_FLAGS) \ |
626 | perlmain.o $(WINIOMAYBE) $(PERLIMPLIB) $(LIBFILES) |
08aa1457 |
627 | .ELSE |
d56e6723 |
628 | $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \ |
629 | perlmain$(o) $(WINIOMAYBE) $(PERLIMPLIB) |
08aa1457 |
630 | .ENDIF |
631 | copy splittree.pl .. |
632 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" "../LIB/auto" |
08aa1457 |
633 | |
634 | .IF "$(CCTYPE)" != "BORLAND" |
d56e6723 |
635 | .IF "$(CCTYPE)" != "GCC" |
08aa1457 |
636 | |
637 | perl95.c : runperl.c |
638 | copy runperl.c perl95.c |
639 | |
d56e6723 |
640 | perl95$(o) : perl95.c |
910dfcc8 |
641 | $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c perl95.c |
08aa1457 |
642 | |
d56e6723 |
643 | win32sckmt$(o) : win32sck.c |
644 | $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c |
fb73857a |
645 | |
d56e6723 |
646 | win32mt$(o) : win32.c |
647 | $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c $(OBJOUT_FLAG)win32mt$(o) win32.c |
fb73857a |
648 | |
649 | $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ) |
d56e6723 |
650 | $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \ |
fb73857a |
651 | $(PERL95_OBJ) $(PERLIMPLIB) |
08aa1457 |
652 | |
653 | .ENDIF |
d56e6723 |
654 | .ENDIF |
08aa1457 |
655 | |
656 | $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) |
657 | if not exist ..\lib\auto mkdir ..\lib\auto |
658 | $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) |
659 | cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c |
660 | $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c . |
661 | |
662 | $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs |
663 | copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs |
664 | |
2a321948 |
665 | $(B_DLL): $(PERLEXE) $(B).xs |
666 | cd $(EXTDIR)\$(*B) && \ |
667 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
668 | cd $(EXTDIR)\$(*B) && $(MAKE) |
669 | |
a98bd6f4 |
670 | $(THREAD_DLL): $(PERLEXE) $(THREAD).xs |
671 | cd $(EXTDIR)\$(*B) && \ |
672 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
673 | cd $(EXTDIR)\$(*B) && $(MAKE) |
674 | |
5d925967 |
675 | $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs |
676 | cd $(EXTDIR)\$(*B) && \ |
677 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
678 | cd $(EXTDIR)\$(*B) && $(MAKE) |
679 | |
680 | $(IO_DLL): $(PERLEXE) $(IO).xs |
08aa1457 |
681 | cd $(EXTDIR)\$(*B) && \ |
682 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
683 | cd $(EXTDIR)\$(*B) && $(MAKE) |
684 | |
685 | $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs |
686 | cd $(EXTDIR)\$(*B) && \ |
687 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
688 | cd $(EXTDIR)\$(*B) && $(MAKE) |
689 | |
690 | $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs |
691 | cd $(EXTDIR)\$(*B) && \ |
692 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
693 | cd $(EXTDIR)\$(*B) && $(MAKE) |
694 | |
695 | $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs |
696 | cd $(EXTDIR)\$(*B) && \ |
697 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
698 | cd $(EXTDIR)\$(*B) && $(MAKE) |
699 | |
5d925967 |
700 | $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs |
08aa1457 |
701 | cd $(EXTDIR)\$(*B) && \ |
702 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
703 | cd $(EXTDIR)\$(*B) && $(MAKE) |
704 | |
705 | doc: $(PERLEXE) |
84902520 |
706 | cd ..\pod && $(MAKE) -f ..\win32\pod.mak checkpods \ |
707 | pod2html pod2latex pod2man pod2text |
708 | cd ..\pod && $(XCOPY) *.bat ..\win32\bin\*.* |
08aa1457 |
709 | copy ..\README.win32 ..\pod\perlwin32.pod |
d07c2202 |
710 | $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \ |
08aa1457 |
711 | --podpath=pod:lib:ext:utils --htmlroot="//$(INST_HTML:s,:,|,)" \ |
712 | --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse |
713 | |
714 | utils: $(PERLEXE) |
715 | cd ..\utils && $(MAKE) PERL=$(MINIPERL) |
716 | cd ..\utils && $(PERLEXE) ..\win32\$(PL2BAT) h2ph splain perlbug \ |
717 | pl2pm c2ph h2xs perldoc pstruct |
d444a431 |
718 | $(XCOPY) ..\utils\*.bat bin\*.* |
d07c2202 |
719 | $(PERLEXE) -I..\lib $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \ |
dfb634a9 |
720 | bin\pl2bat.pl bin\perlglob.pl |
08aa1457 |
721 | |
722 | distclean: clean |
dc050285 |
723 | -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \ |
08aa1457 |
724 | $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) |
725 | -del /f *.def *.map |
726 | -del /f $(SOCKET_DLL) $(IO_DLL) $(SDBM_FILE_DLL) $(FCNTL_DLL) \ |
2a321948 |
727 | $(OPCODE_DLL) $(ATTRS_DLL) $(THREAD_DLL) $(B_DLL) |
08aa1457 |
728 | -del /f $(SOCKET).c $(IO).c $(SDBM_FILE).c $(FCNTL).c $(OPCODE).c \ |
2a321948 |
729 | $(DYNALOADER).c $(ATTRS).c $(THREAD).c $(B).c |
08aa1457 |
730 | -del /f $(PODDIR)\*.html |
731 | -del /f $(PODDIR)\*.bat |
d444a431 |
732 | -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new |
733 | .IF "$(PERL95EXE)" != "" |
734 | -del /f perl95.c |
735 | .ENDIF |
736 | -del /f bin\*.bat |
d56e6723 |
737 | -cd $(EXTDIR) && del /s *.lib *.def *.map *.bs Makefile *$(o) pm_to_blib |
d07c2202 |
738 | -rmdir /s /q ..\lib\auto || rmdir /s ..\lib\auto |
739 | -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR) |
08aa1457 |
740 | |
741 | install : all doc utils |
d07c2202 |
742 | $(PERLEXE) ..\installperl |
08aa1457 |
743 | .IF "$(PERL95EXE)" != "" |
744 | $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.* |
745 | .ENDIF |
746 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
d444a431 |
747 | $(XCOPY) bin\*.bat $(INST_BIN)\*.* |
08aa1457 |
748 | $(XCOPY) ..\pod\*.bat $(INST_BIN)\*.* |
08aa1457 |
749 | $(RCOPY) html\*.* $(INST_HTML)\*.* |
750 | |
751 | inst_lib : $(CONFIGPM) |
752 | copy splittree.pl .. |
753 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" "../LIB/auto" |
754 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
755 | |
dfb634a9 |
756 | minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils |
08aa1457 |
757 | $(XCOPY) $(MINIPERL) ..\t\perl.exe |
758 | .IF "$(CCTYPE)" == "BORLAND" |
759 | $(XCOPY) $(GLOBBAT) ..\t\$(NULL) |
760 | .ELSE |
761 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
762 | .ENDIF |
763 | attrib -r ..\t\*.* |
764 | copy test ..\t |
765 | cd ..\t && \ |
766 | $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t |
767 | |
dfb634a9 |
768 | test-prep : all utils |
08aa1457 |
769 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
770 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) |
771 | .IF "$(CCTYPE)" == "BORLAND" |
772 | $(XCOPY) $(GLOBBAT) ..\t\$(NULL) |
773 | .ELSE |
774 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) |
775 | .ENDIF |
32f822de |
776 | |
777 | test : test-prep |
08aa1457 |
778 | cd ..\t && $(PERLEXE) -I..\lib harness |
779 | |
32f822de |
780 | test-notty : test-prep |
781 | set PERL_SKIP_TTY_TEST=1 && \ |
782 | cd ..\t && $(PERLEXE) -I.\lib harness |
783 | |
08aa1457 |
784 | clean : |
d56e6723 |
785 | -@erase miniperlmain$(o) |
08aa1457 |
786 | -@erase $(MINIPERL) |
d56e6723 |
787 | -@erase perlglob$(o) |
788 | -@erase perlmain$(o) |
08aa1457 |
789 | -@erase config.w32 |
790 | -@erase /f config.h |
791 | -@erase $(GLOBEXE) |
792 | -@erase $(PERLEXE) |
793 | -@erase $(PERLDLL) |
794 | -@erase $(CORE_OBJ) |
795 | -@erase $(WIN32_OBJ) |
796 | -@erase $(DLL_OBJ) |
d07c2202 |
797 | -@erase $(X2P_OBJ) |
d56e6723 |
798 | -@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp |
d444a431 |
799 | -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat |
d07c2202 |
800 | -@erase ..\x2p\*.exe ..\x2p\*.bat |
08aa1457 |
801 | -@erase *.ilk |
802 | -@erase *.pdb |
803 | |
804 | |