Commit | Line | Data |
---|---|---|
68dc0745 | 1 | # |
2 | # Makefile to build perl on Windowns NT using Microsoft NMAKE. | |
3 | # | |
4 | # | |
5 | # This is set up to build a perl.exe that runs off a shared library | |
6 | # (perl.dll). Also makes individual DLLs for the XS extensions. | |
7 | # | |
137443ea | 8 | |
9 | # | |
10 | # Set these to wherever you want "nmake install" to put your | |
11 | # newly built perl. | |
137443ea | 12 | INST_DRV=c: |
dc86dda3 | 13 | INST_TOP=$(INST_DRV)\perl5004.5x |
d07c2202 | 14 | |
15 | # | |
16 | # uncomment to enable threads-capabilities | |
17 | #USE_THREADS=-DUSE_THREADS | |
137443ea | 18 | |
c90c0ff4 | 19 | # |
c90c0ff4 | 20 | # uncomment next line if you are using Visual C++ 2.x |
21 | #CCTYPE=MSVC20 | |
22 | ||
23 | # | |
76e3520e | 24 | # uncomment next line if you want to use the perl object |
25 | #OBJECT=-DPERL_OBJECT | |
26 | ||
27 | # | |
c90c0ff4 | 28 | # uncomment next line if you want debug version of perl (big,slow) |
dc86dda3 | 29 | #CFG=Debug |
137443ea | 30 | |
d484a829 | 31 | # |
26618a56 | 32 | # if you have the source for des_fcrypt(), uncomment this and make sure the |
33 | # file exists (see README.win32) | |
34 | #CRYPT_SRC=des_fcrypt.c | |
35 | ||
36 | # | |
37 | # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a | |
38 | # library, uncomment this, and make sure the library exists (see README.win32) | |
39 | #CRYPT_LIB=des_fcrypt.lib | |
40 | ||
41 | # | |
3e3baf6d | 42 | # set the install locations of the compiler include/libraries |
43 | #CCHOME = f:\msvc20 | |
44 | CCHOME = $(MSVCDIR) | |
45 | CCINCDIR = $(CCHOME)\include | |
46 | CCLIBDIR = $(CCHOME)\lib | |
47 | ||
48 | # | |
d484a829 | 49 | # set this to your email address (perl will guess a value from |
50 | # from your loginname and your hostname, which may not be right) | |
51 | #EMAIL = | |
52 | ||
137443ea | 53 | ##################### CHANGE THESE ONLY IF YOU MUST ##################### |
54 | ||
26618a56 | 55 | !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" |
56 | D_CRYPT=undef | |
57 | !ELSE | |
58 | D_CRYPT=define | |
59 | CRYPT_FLAG=-DHAVE_DES_FCRYPT | |
60 | !ENDIF | |
61 | ||
d07c2202 | 62 | BUILDOPT = $(USE_THREADS) |
63 | #BUILDOPT = $(USE_THREADS) -DMULTIPLICITY | |
64 | #BUILDOPT = $(USE_THREADS) -DPERL_GLOBAL_STRUCT -DMULTIPLICITY | |
65 | # -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include | |
66 | ||
67 | !IF "$(PROCESSOR_ARCHITECTURE)" == "" | |
68 | PROCESSOR_ARCHITECTURE = x86 | |
69 | !ENDIF | |
70 | ||
71 | !IF "$(USE_THREADS)" == "" | |
72 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) | |
73 | !ELSE | |
74 | ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread | |
75 | !ENDIF | |
76 | ||
77 | ARCHDIR = ..\lib\$(ARCHNAME) | |
78 | COREDIR = ..\lib\CORE | |
79 | ||
137443ea | 80 | # |
81 | # Programs to compile, build .lib files and link | |
82 | # | |
68dc0745 | 83 | |
137443ea | 84 | CC=cl.exe |
85 | LINK32=link.exe | |
86 | LIB32=$(LINK32) -lib | |
68dc0745 | 87 | # |
137443ea | 88 | # Options |
89 | # | |
c90c0ff4 | 90 | !IF "$(RUNTIME)" == "" |
137443ea | 91 | RUNTIME = -MD |
c90c0ff4 | 92 | !ENDIF |
3e3baf6d | 93 | INCLUDES = -I.\include -I. -I.. |
137443ea | 94 | #PCHFLAGS = -Fp"$(INTDIR)/modules.pch" -YX |
76e3520e | 95 | DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG) $(OBJECT) |
910dfcc8 | 96 | LOCDEFS = -DPERLDLL -DPERL_CORE |
137443ea | 97 | SUBSYS = console |
137443ea | 98 | |
99 | !IF "$(RUNTIME)" == "-MD" | |
3e3baf6d | 100 | LIBC = msvcrt.lib |
137443ea | 101 | WINIOMAYBE = |
102 | !ELSE | |
3e3baf6d | 103 | LIBC = libcmt.lib |
390b85e7 | 104 | WINIOMAYBE = |
137443ea | 105 | !ENDIF |
106 | ||
107 | !IF "$(CFG)" == "Debug" | |
108 | ! IF "$(CCTYPE)" == "MSVC20" | |
910dfcc8 | 109 | OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING |
137443ea | 110 | ! ELSE |
910dfcc8 | 111 | OPTIMIZE = -Od $(RUNTIME)d -Z7 -D_DEBUG -DDEBUGGING |
137443ea | 112 | ! ENDIF |
96e4d5b1 | 113 | LINK_DBG = -debug -pdb:none |
137443ea | 114 | !ELSE |
115 | ! IF "$(CCTYPE)" == "MSVC20" | |
31948633 | 116 | OPTIMIZE = -O1 $(RUNTIME) -DNDEBUG |
137443ea | 117 | ! ELSE |
31948633 | 118 | OPTIMIZE = -O1 $(RUNTIME) -DNDEBUG |
137443ea | 119 | ! ENDIF |
120 | LINK_DBG = -release | |
121 | !ENDIF | |
68dc0745 | 122 | |
3e3baf6d | 123 | # we don't add LIBC here, the compiler do it based on -MD/-MT |
26618a56 | 124 | LIBFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \ |
3e3baf6d | 125 | winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \ |
126 | oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \ | |
127 | version.lib odbc32.lib odbccp32.lib | |
128 | ||
76e3520e | 129 | !IF "$(OBJECT)" == "-DPERL_OBJECT" |
130 | CFLAGS = -nologo -Gf -W3 -TP $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) | |
131 | !ELSE | |
d56e6723 | 132 | CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) |
76e3520e | 133 | !ENDIF |
dc050285 | 134 | LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) |
3e3baf6d | 135 | OBJOUT_FLAG = -Fo |
d56e6723 | 136 | EXEOUT_FLAG = -Fe |
137443ea | 137 | |
138 | #################### do not edit below this line ####################### | |
139 | ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## | |
140 | ||
d56e6723 | 141 | o = .obj |
142 | ||
137443ea | 143 | # |
144 | # Rules | |
145 | # | |
137443ea | 146 | |
d56e6723 | 147 | .SUFFIXES : .c $(o) .dll .lib .exe |
148 | ||
149 | .c$(o): | |
d07c2202 | 150 | $(CC) -c -I$(<D) $(CFLAGS) $(OBJOUT_FLAG)$@ $< |
137443ea | 151 | |
d56e6723 | 152 | $(o).dll: |
3e3baf6d | 153 | $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ |
dc050285 | 154 | -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL) |
68dc0745 | 155 | |
d07c2202 | 156 | .y.c: |
157 | $(NOOP) | |
158 | ||
68dc0745 | 159 | # |
160 | INST_BIN=$(INST_TOP)\bin | |
161 | INST_LIB=$(INST_TOP)\lib | |
137443ea | 162 | INST_POD=$(INST_LIB)\pod |
68dc0745 | 163 | INST_HTML=$(INST_POD)\html |
164 | LIBDIR=..\lib | |
0a753a76 | 165 | EXTDIR=..\ext |
68dc0745 | 166 | PODDIR=..\pod |
0a753a76 | 167 | EXTUTILSDIR=$(LIBDIR)\extutils |
68dc0745 | 168 | |
169 | # | |
170 | # various targets | |
54310121 | 171 | PERLIMPLIB=..\perl.lib |
68dc0745 | 172 | MINIPERL=..\miniperl.exe |
173 | PERLDLL=..\perl.dll | |
174 | PERLEXE=..\perl.exe | |
175 | GLOBEXE=..\perlglob.exe | |
137443ea | 176 | CONFIGPM=..\lib\Config.pm |
83437bec | 177 | MINIMOD=..\lib\ExtUtils\Miniperl.pm |
d07c2202 | 178 | X2P=..\x2p\a2p.exe |
68dc0745 | 179 | |
d444a431 | 180 | PL2BAT=bin\pl2bat.pl |
181 | GLOBBAT = bin\perlglob.bat | |
3e3baf6d | 182 | |
137443ea | 183 | MAKE=nmake -nologo |
3e3baf6d | 184 | CFGSH_TMPL = config.vc |
185 | CFGH_TMPL = config_H.vc | |
186 | PERL95EXE=..\perl95.exe | |
c90c0ff4 | 187 | XCOPY=xcopy /f /r /i /d |
188 | RCOPY=xcopy /f /r /i /e /d | |
d07c2202 | 189 | NOOP=@echo |
68dc0745 | 190 | NULL= |
191 | ||
26618a56 | 192 | !IF "$(CRYPT_SRC)" != "" |
193 | CRYPT_OBJ=$(CRYPT_SRC:.c=.obj) | |
194 | !ENDIF | |
195 | ||
68dc0745 | 196 | # |
197 | # filenames given to xsubpp must have forward slashes (since it puts | |
198 | # full pathnames in #line strings) | |
137443ea | 199 | XSUBPP=..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes |
68dc0745 | 200 | |
137443ea | 201 | CORE_C= ..\av.c \ |
68dc0745 | 202 | ..\deb.c \ |
203 | ..\doio.c \ | |
204 | ..\doop.c \ | |
205 | ..\dump.c \ | |
206 | ..\globals.c \ | |
207 | ..\gv.c \ | |
208 | ..\hv.c \ | |
209 | ..\mg.c \ | |
210 | ..\op.c \ | |
211 | ..\perl.c \ | |
212 | ..\perlio.c \ | |
213 | ..\perly.c \ | |
214 | ..\pp.c \ | |
215 | ..\pp_ctl.c \ | |
216 | ..\pp_hot.c \ | |
217 | ..\pp_sys.c \ | |
218 | ..\regcomp.c \ | |
219 | ..\regexec.c \ | |
220 | ..\run.c \ | |
221 | ..\scope.c \ | |
222 | ..\sv.c \ | |
223 | ..\taint.c \ | |
224 | ..\toke.c \ | |
225 | ..\universal.c \ | |
bbc8f9de | 226 | ..\util.c \ |
26618a56 | 227 | ..\malloc.c \ |
228 | $(CRYPT_SRC) | |
0a753a76 | 229 | |
d56e6723 | 230 | CORE_OBJ= ..\av$(o) \ |
231 | ..\deb$(o) \ | |
232 | ..\doio$(o) \ | |
233 | ..\doop$(o) \ | |
234 | ..\dump$(o) \ | |
235 | ..\globals$(o) \ | |
236 | ..\gv$(o) \ | |
237 | ..\hv$(o) \ | |
238 | ..\mg$(o) \ | |
239 | ..\op$(o) \ | |
240 | ..\perl$(o) \ | |
241 | ..\perlio$(o) \ | |
242 | ..\perly$(o) \ | |
243 | ..\pp$(o) \ | |
244 | ..\pp_ctl$(o) \ | |
245 | ..\pp_hot$(o) \ | |
246 | ..\pp_sys$(o) \ | |
247 | ..\regcomp$(o) \ | |
248 | ..\regexec$(o) \ | |
249 | ..\run$(o) \ | |
250 | ..\scope$(o) \ | |
251 | ..\sv$(o) \ | |
252 | ..\taint$(o) \ | |
253 | ..\toke$(o) \ | |
254 | ..\universal$(o)\ | |
255 | ..\util$(o) \ | |
26618a56 | 256 | ..\malloc$(o) \ |
257 | $(CRYPT_OBJ) | |
137443ea | 258 | |
259 | WIN32_C = perllib.c \ | |
260 | win32.c \ | |
d55594ae | 261 | win32sck.c \ |
262 | win32thread.c | |
137443ea | 263 | |
d56e6723 | 264 | WIN32_OBJ = win32$(o) \ |
265 | win32sck$(o) \ | |
266 | win32thread$(o) | |
137443ea | 267 | |
d56e6723 | 268 | PERL95_OBJ = perl95$(o) \ |
269 | win32mt$(o) \ | |
26618a56 | 270 | win32sckmt$(o) \ |
271 | $(CRYPT_OBJ) | |
fb73857a | 272 | |
d56e6723 | 273 | DLL_OBJ = perllib$(o) $(DYNALOADER)$(o) |
137443ea | 274 | |
d07c2202 | 275 | X2P_OBJ = ..\x2p\a2p$(o) \ |
276 | ..\x2p\hash$(o) \ | |
277 | ..\x2p\str$(o) \ | |
278 | ..\x2p\util$(o) \ | |
279 | ..\x2p\walk$(o) | |
280 | ||
3e3baf6d | 281 | CORE_H = ..\av.h \ |
282 | ..\cop.h \ | |
283 | ..\cv.h \ | |
284 | ..\dosish.h \ | |
285 | ..\embed.h \ | |
286 | ..\form.h \ | |
287 | ..\gv.h \ | |
288 | ..\handy.h \ | |
289 | ..\hv.h \ | |
290 | ..\mg.h \ | |
291 | ..\nostdio.h \ | |
292 | ..\op.h \ | |
293 | ..\opcode.h \ | |
294 | ..\perl.h \ | |
295 | ..\perlio.h \ | |
296 | ..\perlsdio.h \ | |
297 | ..\perlsfio.h \ | |
298 | ..\perly.h \ | |
299 | ..\pp.h \ | |
300 | ..\proto.h \ | |
301 | ..\regexp.h \ | |
302 | ..\scope.h \ | |
303 | ..\sv.h \ | |
059e4e88 | 304 | ..\thread.h \ |
3e3baf6d | 305 | ..\unixish.h \ |
306 | ..\util.h \ | |
307 | ..\XSUB.h \ | |
308 | .\config.h \ | |
309 | ..\EXTERN.h \ | |
49f531da | 310 | ..\perlvars.h \ |
311 | ..\intrpvar.h \ | |
d4cce5f1 | 312 | ..\thrdvar.h \ |
3e3baf6d | 313 | .\include\dirent.h \ |
314 | .\include\netdb.h \ | |
315 | .\include\sys\socket.h \ | |
316 | .\win32.h | |
137443ea | 317 | |
2a321948 | 318 | DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread B |
dc050285 | 319 | STATIC_EXT=DynaLoader |
0a753a76 | 320 | |
68dc0745 | 321 | DYNALOADER=$(EXTDIR)\DynaLoader\DynaLoader |
322 | SOCKET=$(EXTDIR)\Socket\Socket | |
323 | FCNTL=$(EXTDIR)\Fcntl\Fcntl | |
324 | OPCODE=$(EXTDIR)\Opcode\Opcode | |
325 | SDBM_FILE=$(EXTDIR)\SDBM_File\SDBM_File | |
326 | IO=$(EXTDIR)\IO\IO | |
059e4e88 | 327 | ATTRS=$(EXTDIR)\attrs\attrs |
a98bd6f4 | 328 | THREAD=$(EXTDIR)\Thread\Thread |
2a321948 | 329 | B=$(EXTDIR)\B\B |
68dc0745 | 330 | |
331 | SOCKET_DLL=..\lib\auto\Socket\Socket.dll | |
332 | FCNTL_DLL=..\lib\auto\Fcntl\Fcntl.dll | |
333 | OPCODE_DLL=..\lib\auto\Opcode\Opcode.dll | |
334 | SDBM_FILE_DLL=..\lib\auto\SDBM_File\SDBM_File.dll | |
335 | IO_DLL=..\lib\auto\IO\IO.dll | |
059e4e88 | 336 | ATTRS_DLL=..\lib\auto\attrs\attrs.dll |
a98bd6f4 | 337 | THREAD_DLL=..\lib\auto\Thread\Thread.dll |
2a321948 | 338 | B_DLL=..\lib\auto\B\B.dll |
68dc0745 | 339 | |
340 | STATICLINKMODULES=DynaLoader | |
341 | DYNALOADMODULES= \ | |
342 | $(SOCKET_DLL) \ | |
343 | $(FCNTL_DLL) \ | |
344 | $(OPCODE_DLL) \ | |
345 | $(SDBM_FILE_DLL)\ | |
059e4e88 | 346 | $(IO_DLL) \ |
910dfcc8 | 347 | $(ATTRS_DLL) \ |
2a321948 | 348 | $(THREAD_DLL) \ |
349 | $(B_DLL) | |
68dc0745 | 350 | |
351 | POD2HTML=$(PODDIR)\pod2html | |
352 | POD2MAN=$(PODDIR)\pod2man | |
353 | POD2LATEX=$(PODDIR)\pod2latex | |
354 | POD2TEXT=$(PODDIR)\pod2text | |
355 | ||
137443ea | 356 | # |
357 | # Top targets | |
358 | # | |
0a753a76 | 359 | |
d07c2202 | 360 | all: $(PERLEXE) $(PERL95EXE) $(GLOBEXE) $(DYNALOADMODULES) $(MINIMOD) \ |
dfb634a9 | 361 | $(X2P) |
0a753a76 | 362 | |
d56e6723 | 363 | $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c |
0a753a76 | 364 | |
137443ea | 365 | #------------------------------------------------------------ |
0a753a76 | 366 | |
d56e6723 | 367 | $(GLOBEXE): perlglob$(o) |
dc050285 | 368 | $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ |
d56e6723 | 369 | perlglob$(o) setargv$(o) |
0a753a76 | 370 | |
d56e6723 | 371 | perlglob$(o) : perlglob.c |
137443ea | 372 | |
d56e6723 | 373 | ..\miniperlmain$(o) : ..\miniperlmain.c $(CORE_H) |
137443ea | 374 | |
3e3baf6d | 375 | config.w32 : $(CFGSH_TMPL) |
376 | copy $(CFGSH_TMPL) config.w32 | |
377 | ||
d55594ae | 378 | .\config.h : $(CFGH_TMPL) |
3e3baf6d | 379 | -del /f config.h |
380 | copy $(CFGH_TMPL) config.h | |
381 | ||
137443ea | 382 | ..\config.sh : config.w32 $(MINIPERL) config_sh.PL |
910dfcc8 | 383 | $(MINIPERL) -I..\lib config_sh.PL \ |
384 | "INST_DRV=$(INST_DRV)" \ | |
385 | "INST_TOP=$(INST_TOP)" \ | |
d07c2202 | 386 | "archname=$(ARCHNAME)" \ |
910dfcc8 | 387 | "cc=$(CC)" \ |
388 | "ccflags=$(OPTIMIZE) $(DEFINES)" \ | |
389 | "cf_email=$(EMAIL)" \ | |
26618a56 | 390 | "d_crypt=$(D_CRYPT)" \ |
910dfcc8 | 391 | "libs=$(LIBFILES)" \ |
392 | "incpath=$(CCINCDIR)" \ | |
393 | "libpth=$(CCLIBDIR)" \ | |
394 | "libc=$(LIBC)" \ | |
395 | "static_ext=$(STATIC_EXT)" \ | |
396 | "dynamic_ext=$(DYNAMIC_EXT)" \ | |
aa4575bf | 397 | "LINK_FLAGS=$(LINK_FLAGS)" \ |
910dfcc8 | 398 | "optimize=$(OPTIMIZE)" \ |
399 | config.w32 > ..\config.sh | |
137443ea | 400 | |
83437bec | 401 | $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl |
137443ea | 402 | cd .. && miniperl configpm |
c90c0ff4 | 403 | if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) |
d07c2202 | 404 | $(XCOPY) ..\*.h $(COREDIR)\*.* |
405 | $(XCOPY) *.h $(COREDIR)\*.* | |
406 | $(RCOPY) include $(COREDIR)\*.* | |
3e3baf6d | 407 | $(MINIPERL) -I..\lib config_h.PL || $(MAKE) CCTYPE=$(CCTYPE) \ |
408 | RUNTIME=$(RUNTIME) CFG=$(CFG) $(CONFIGPM) | |
137443ea | 409 | |
d56e6723 | 410 | $(MINIPERL) : ..\miniperlmain$(o) $(CORE_OBJ) $(WIN32_OBJ) |
137443ea | 411 | $(LINK32) -subsystem:console -out:$@ @<< |
d56e6723 | 412 | $(LINK_FLAGS) $(LIBFILES) ..\miniperlmain$(o) $(CORE_OBJ) $(WIN32_OBJ) |
137443ea | 413 | << |
414 | ||
dc86dda3 | 415 | $(WIN32_OBJ) : $(CORE_H) |
416 | $(CORE_OBJ) : $(CORE_H) | |
417 | $(DLL_OBJ) : $(CORE_H) | |
418 | $(PERL95_OBJ) : $(CORE_H) | |
d07c2202 | 419 | $(X2P_OBJ) : $(CORE_H) |
0a753a76 | 420 | |
910dfcc8 | 421 | perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl |
422 | $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) \ | |
423 | CCTYPE=$(CCTYPE) > perldll.def | |
0a753a76 | 424 | |
137443ea | 425 | $(PERLDLL): perldll.def $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) |
426 | $(LINK32) -dll -def:perldll.def -out:$@ @<< | |
dc050285 | 427 | $(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) |
137443ea | 428 | << |
d07c2202 | 429 | $(XCOPY) $(PERLIMPLIB) $(COREDIR) |
137443ea | 430 | |
431 | perl.def : $(MINIPERL) makeperldef.pl | |
432 | $(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def | |
433 | ||
83437bec | 434 | $(MINIMOD) : $(MINIPERL) ..\minimod.pl |
435 | cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm | |
436 | ||
d07c2202 | 437 | $(X2P) : $(X2P_OBJ) |
438 | $(LINK32) -subsystem:console -out:$@ @<< | |
439 | $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ) | |
440 | << | |
441 | ||
83437bec | 442 | perlmain.c : runperl.c |
0a753a76 | 443 | copy runperl.c perlmain.c |
137443ea | 444 | |
d56e6723 | 445 | perlmain$(o) : perlmain.c |
3e3baf6d | 446 | $(CC) $(CFLAGS) -UPERLDLL -c perlmain.c |
137443ea | 447 | |
d56e6723 | 448 | $(PERLEXE): $(PERLDLL) $(CONFIGPM) perlmain$(o) |
dc050285 | 449 | $(LINK32) -subsystem:console -out:perl.exe $(LINK_FLAGS) $(LIBFILES) \ |
d56e6723 | 450 | perlmain$(o) $(WINIOMAYBE) $(PERLIMPLIB) |
137443ea | 451 | copy perl.exe $@ |
452 | del perl.exe | |
0a753a76 | 453 | copy splittree.pl .. |
137443ea | 454 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" "../LIB/auto" |
0a753a76 | 455 | |
3e3baf6d | 456 | perl95.c : runperl.c |
457 | copy runperl.c perl95.c | |
458 | ||
d56e6723 | 459 | perl95$(o) : perl95.c |
22239a37 | 460 | $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c perl95.c |
3e3baf6d | 461 | |
d56e6723 | 462 | win32sckmt$(o) : win32sck.c |
463 | $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c $(OBJOUT_FLAG)win32sckmt$(o) win32sck.c | |
fb73857a | 464 | |
d56e6723 | 465 | win32mt$(o) : win32.c |
466 | $(CC) $(CFLAGS) -MT -UPERLDLL -DWIN95FIX -c $(OBJOUT_FLAG)win32mt$(o) win32.c | |
fb73857a | 467 | |
468 | $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ) | |
dc050285 | 469 | $(LINK32) -subsystem:console -out:perl95.exe $(LINK_FLAGS) $(LIBFILES) \ |
fb73857a | 470 | $(PERL95_OBJ) $(PERLIMPLIB) |
3e3baf6d | 471 | copy perl95.exe $@ |
472 | del perl95.exe | |
473 | ||
137443ea | 474 | $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) |
32f822de | 475 | if not exist ..\lib\auto mkdir ..\lib\auto |
68dc0745 | 476 | $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) |
477 | cd $(EXTDIR)\$(*B) | |
478 | $(XSUBPP) dl_win32.xs > $(*B).c | |
0a753a76 | 479 | cd ..\..\win32 |
480 | ||
68dc0745 | 481 | $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs |
482 | copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs | |
0a753a76 | 483 | |
2a321948 | 484 | $(B_DLL): $(PERLEXE) $(B).xs |
a98bd6f4 | 485 | cd $(EXTDIR)\$(*B) |
486 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
487 | $(MAKE) | |
488 | cd ..\..\win32 | |
489 | ||
d55594ae | 490 | $(THREAD_DLL): $(PERLEXE) $(THREAD).xs |
059e4e88 | 491 | cd $(EXTDIR)\$(*B) |
492 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
493 | $(MAKE) | |
494 | cd ..\..\win32 | |
495 | ||
2a321948 | 496 | $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs |
497 | cd $(EXTDIR)\$(*B) | |
498 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl | |
499 | $(MAKE) | |
500 | cd ..\..\win32 | |
d55594ae | 501 | |
502 | $(IO_DLL): $(PERLEXE) $(CONFIGPM) $(IO).xs | |
68dc0745 | 503 | cd $(EXTDIR)\$(*B) |
137443ea | 504 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
505 | $(MAKE) | |
0a753a76 | 506 | cd ..\..\win32 |
507 | ||
137443ea | 508 | $(SDBM_FILE_DLL) : $(PERLEXE) $(SDBM_FILE).xs |
68dc0745 | 509 | cd $(EXTDIR)\$(*B) |
137443ea | 510 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
511 | $(MAKE) | |
68dc0745 | 512 | cd ..\..\win32 |
0a753a76 | 513 | |
137443ea | 514 | $(FCNTL_DLL): $(PERLEXE) $(FCNTL).xs |
68dc0745 | 515 | cd $(EXTDIR)\$(*B) |
137443ea | 516 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
517 | $(MAKE) | |
0a753a76 | 518 | cd ..\..\win32 |
519 | ||
137443ea | 520 | $(OPCODE_DLL): $(PERLEXE) $(OPCODE).xs |
68dc0745 | 521 | cd $(EXTDIR)\$(*B) |
137443ea | 522 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
523 | $(MAKE) | |
68dc0745 | 524 | cd ..\..\win32 |
0a753a76 | 525 | |
059e4e88 | 526 | $(SOCKET_DLL): $(PERLEXE) $(SOCKET).xs |
68dc0745 | 527 | cd $(EXTDIR)\$(*B) |
137443ea | 528 | ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl |
529 | $(MAKE) | |
0a753a76 | 530 | cd ..\..\win32 |
531 | ||
68dc0745 | 532 | doc: $(PERLEXE) |
84902520 | 533 | cd ..\pod |
534 | $(MAKE) -f ..\win32\pod.mak checkpods pod2html pod2latex \ | |
535 | pod2man pod2text | |
536 | $(XCOPY) *.bat ..\win32\bin\*.* | |
537 | cd ..\win32 | |
3e3baf6d | 538 | copy ..\README.win32 ..\pod\perlwin32.pod |
d07c2202 | 539 | $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \ |
3e3baf6d | 540 | --podpath=pod:lib:ext:utils --htmlroot="//$(INST_HTML::=|)" \ |
541 | --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse | |
68dc0745 | 542 | |
3fe9a6f1 | 543 | utils: $(PERLEXE) |
544 | cd ..\utils | |
545 | nmake PERL=$(MINIPERL) | |
d07c2202 | 546 | $(PERLEXE) -I..\lib ..\win32\$(PL2BAT) h2ph splain perlbug pl2pm c2ph |
d444a431 | 547 | $(PERLEXE) ..\win32\$(PL2BAT) h2xs perldoc pstruct |
3fe9a6f1 | 548 | $(XCOPY) *.bat ..\win32\bin\*.* |
549 | cd ..\win32 | |
d444a431 | 550 | $(PERLEXE) $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \ |
dfb634a9 | 551 | bin\pl2bat.pl bin\perlglob.pl |
3fe9a6f1 | 552 | |
137443ea | 553 | distclean: clean |
dc050285 | 554 | -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \ |
83437bec | 555 | $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) |
3e3baf6d | 556 | -del /f *.def *.map |
54310121 | 557 | -del /f $(SOCKET_DLL) $(IO_DLL) $(SDBM_FILE_DLL) $(FCNTL_DLL) \ |
2a321948 | 558 | $(OPCODE_DLL) $(ATTRS_DLL) $(THREAD_DLL) $(B_DLL) |
54310121 | 559 | -del /f $(SOCKET).c $(IO).c $(SDBM_FILE).c $(FCNTL).c $(OPCODE).c \ |
2a321948 | 560 | $(DYNALOADER).c $(ATTRS).c $(THREAD).c $(B).c |
68dc0745 | 561 | -del /f $(PODDIR)\*.html |
562 | -del /f $(PODDIR)\*.bat | |
d444a431 | 563 | -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c \ |
564 | config.h.new perl95.c | |
565 | -del /f bin\*.bat | |
d07c2202 | 566 | -rmdir /s /q ..\lib\auto || rmdir /s ..\lib\auto |
567 | -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR) | |
3e3baf6d | 568 | cd $(EXTDIR) |
d56e6723 | 569 | -del /s *.lib *.def *.map *.bs Makefile *$(o) pm_to_blib |
3e3baf6d | 570 | cd ..\win32 |
68dc0745 | 571 | |
3e3baf6d | 572 | install : all doc utils |
d07c2202 | 573 | $(PERLEXE) ..\installperl |
3e3baf6d | 574 | $(XCOPY) $(PERL95EXE) $(INST_BIN)\*.* |
68dc0745 | 575 | $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* |
d444a431 | 576 | $(XCOPY) bin\*.bat $(INST_BIN)\*.* |
68dc0745 | 577 | $(XCOPY) ..\pod\*.bat $(INST_BIN)\*.* |
3e3baf6d | 578 | $(RCOPY) html\*.* $(INST_HTML)\*.* |
68dc0745 | 579 | |
137443ea | 580 | inst_lib : $(CONFIGPM) |
68dc0745 | 581 | copy splittree.pl .. |
137443ea | 582 | $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" "../LIB/auto" |
c90c0ff4 | 583 | $(RCOPY) ..\lib $(INST_LIB)\*.* |
0a753a76 | 584 | |
dfb634a9 | 585 | minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils |
137443ea | 586 | $(XCOPY) $(MINIPERL) ..\t\perl.exe |
587 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
588 | attrib -r ..\t\*.* | |
589 | copy test ..\t | |
590 | cd ..\t | |
591 | $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t | |
592 | cd ..\win32 | |
593 | ||
dfb634a9 | 594 | test-prep : all utils |
68dc0745 | 595 | $(XCOPY) $(PERLEXE) ..\t\$(NULL) |
596 | $(XCOPY) $(PERLDLL) ..\t\$(NULL) | |
597 | $(XCOPY) $(GLOBEXE) ..\t\$(NULL) | |
fb73857a | 598 | |
599 | test : test-prep | |
600 | cd ..\t | |
601 | $(PERLEXE) -I..\lib harness | |
602 | cd ..\win32 | |
603 | ||
604 | test-notty : test-prep | |
605 | set PERL_SKIP_TTY_TEST=1 | |
137443ea | 606 | cd ..\t |
607 | $(PERLEXE) -I..\lib harness | |
68dc0745 | 608 | cd ..\win32 |
137443ea | 609 | |
610 | clean : | |
d56e6723 | 611 | -@erase miniperlmain$(o) |
137443ea | 612 | -@erase $(MINIPERL) |
d56e6723 | 613 | -@erase perlglob$(o) |
614 | -@erase perlmain$(o) | |
3e3baf6d | 615 | -@erase config.w32 |
616 | -@erase /f config.h | |
137443ea | 617 | -@erase $(GLOBEXE) |
618 | -@erase $(PERLEXE) | |
619 | -@erase $(PERLDLL) | |
620 | -@erase $(CORE_OBJ) | |
621 | -@erase $(WIN32_OBJ) | |
622 | -@erase $(DLL_OBJ) | |
d07c2202 | 623 | -@erase $(X2P_OBJ) |
d56e6723 | 624 | -@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp |
d444a431 | 625 | -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat |
d07c2202 | 626 | -@erase ..\x2p\*.exe ..\x2p\*.bat |
137443ea | 627 | -@erase *.ilk |
628 | -@erase *.pdb | |
629 | ||
630 |