This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
bump perl version number to 5.15.1
[perl5.git] / win32 / Makefile.ce
CommitLineData
b0f06652 1#
e4451f11 2# perl makefile for wince
b0f06652
VK
3# During the cross-compilation, it first uses Makefile file to build
4# miniperl on HOST and then build required platform
e4451f11 5#
e4451f11
JH
6
7SRCDIR = ..
78a7c709 8PV = 59
507b4ec1 9INST_VER = 5.15.1
42165d27 10
18f68570 11# INSTALL_ROOT specifies a path where this perl will be installed on CE device
42165d27 12INSTALL_ROOT=/netzwerk/sprache/perl
18f68570
VK
13INST_TOP=$(INSTALL_ROOT)
14INST_VER=
42165d27
VK
15
16# PERLCEDIR shoud be set to current directory
f4257e4d 17PERLCEDIR = H:\src\wince\perl\win32
42165d27 18
18f68570 19# WCEROOT is a directory where Windows CE Tools was installed
ca6c63e1 20WCEROOT = D:\Windows CE Tools
18f68570
VK
21
22# HPERL stands for host perl, which is perl on local desktop machine
23# which is usually ..\miniperl.exe
24#HPERL = N:\Programme\perl\bin\perl.exe
25HPERL = $(MAKEDIR)\..\miniperl.exe
26
ca6c63e1
JH
27CEPATH = D:\Programme\Microsoft eMbedded Tools\EVC\WCE211\BIN
28CELIBDLLDIR = h:\src\wince\celib-palm-3.0
e4451f11 29CECONSOLEDIR = h:\src\wince\w32console
18f68570
VK
30
31# specify following options to build perl on local machine, by MSVC
32MSVCDIR = D:\MSVStudio\VC98
33CCHOME = $(MSVCDIR)
34CCINCDIR = $(CCHOME)\include
35CCLIBDIR = $(CCHOME)\lib
36
e4451f11 37# Only for WIN2000
ca6c63e1 38#YES = /y
e4451f11
JH
39COPY = copy $(YES)
40XCOPY = xcopy $(YES) /f /r /i /d
41RCOPY = xcopy $(YES) /f /r /i /e /d
42165d27
VK
42
43# cecopy program. Make shure it is in your path, as well as cemkdir, cedel
44CECOPY = cecopy
45
18f68570 46#
f4257e4d
YO
47# Comment out next assign to disable perl's I/O subsystem and use compiler's
48# stdio for IO - depending on your compiler vendor and run time library you may
49# then get a number of fails from make test i.e. bugs - complain to them not us ;-).
50# You will also be unable to take full advantage of perl5.8's support for multiple
18f68570
VK
51# encodings and may see lower IO performance. You have been warned.
52USE_PERLIO = define
53
2e64bfdb
JH
54#
55# set this if you wish to use perl's malloc
56# This will make perl run few times faster
57# WARNING: Turning this on/off WILL break binary compatibility with extensions
58# you may have compiled with/without it.
59#
60PERL_MALLOC = define
61
18f68570 62
e4451f11
JH
63NOOP = @echo
64# keep this untouched!
65NULL =
66
42165d27 67
aebd5ec7
VK
68#CFG=DEBUG
69CFG=RELEASE
e4451f11
JH
70
71!if "$(MACHINE)" == ""
72MACHINE=wince-arm-hpc-wce300
73#MACHINE=wince-arm-hpc-wce211
74#MACHINE=wince-sh3-hpc-wce211
75#MACHINE=wince-mips-hpc-wce211
76#MACHINE=wince-sh3-hpc-wce200
77#MACHINE=wince-mips-hpc-wce200
78#MACHINE=wince-arm-pocket-wce300
79#MACHINE=wince-mips-pocket-wce300
80#MACHINE=wince-sh3-pocket-wce300
81#MACHINE=wince-x86em-pocket-wce300
82#MACHINE=wince-mips-palm-wce211
83#MACHINE=wince-sh3-palm-wce211
84#MACHINE=wince-x86em-palm-wce211
85!endif
86
2e64bfdb
JH
87# set this to your email address
88#
89#EMAIL =
90
91##################### CHANGE THESE ONLY IF YOU MUST #####################
92
e4451f11
JH
93######################################################################
94# machines
95
96!if "$(MACHINE)" == "wince-sh3-hpc-wce211"
97CC = shcl.exe
98ARCH = SH3
99CPU = SH3
100TARGETCPU = SH3
101CEVersion = 211
102OSVERSION = WCE211
103PLATFORM = MS HPC Pro
104MCFLAGS = -MDd -DSH3 -D_SH3_ -DSHx -DPROCESSOR_SH3 -DPALM_SIZE \
105 -I $(CELIBDLLDIR)\inc
106SUBSYS = -subsystem:windowsce,2.11
107CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
108LDLIBPATH = -libpath:$(CELIBPATH)
109STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
110 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
111!endif
112
113!if "$(MACHINE)" == "wince-mips-hpc-wce211"
114CC = clmips.exe
115ARCH = MIPS
116CPU = MIPS
117TARGETCPU = MIPS
118CEVersion = 211
119OSVERSION = WCE211
120PLATFORM = MS HPC Pro
121MCFLAGS = -D _MT -D _DLL \
122 -D MIPS -D mips -D _MIPS_ -D _mips_ -DPROCESSOR_MIPS \
123 -D PALM_SIZE \
124 -I $(CELIBDLLDIR)\inc
125SUBSYS = -subsystem:windowsce,2.11
126CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
127LDLIBPATH = -libpath:$(CELIBPATH)
128STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
129 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
130!endif
131
132!if "$(MACHINE)" == "wince-mips-hpc-wce200"
133CC = clmips.exe
134ARCH = MIPS
135CPU = MIPS
136TARGETCPU = MIPS
137CEVersion = 200
138OSVERSION = WCE200
139PLATFORM = MS HPC
140# MUST USE -MD to get the right FPE stuff...
141MCFLAGS = -D _MT -D _DLL -MD \
142 -D MIPS -D mips -D _MIPS_ -D _mips_ -DPROCESSOR_MIPS \
143 -D PALM_SIZE \
144 -I $(CELIBDLLDIR)\inc
145SUBSYS = -subsystem:windowsce,2.00
146CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
147LDLIBPATH = -libpath:$(CELIBPATH)
148STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
149 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
150!endif
151
152!if "$(MACHINE)" == "wince-sh3-hpc-wce200"
153CC = shcl.exe
154ARCH = SH3
155CPU = SH3
156TARGETCPU = SH3
157CEVersion = 200
158OSVERSION = WCE200
159PLATFORM = MS HPC
160# MUST USE -MD to get the right FPE stuff...
161MCFLAGS = -D _MT -D _DLL -MD \
162 -D SH3 -D sh3 -D _SH3_ -D _sh3_ -D SHx -DPROCESSOR_SH3 \
163 -D PALM_SIZE \
164 -I $(CELIBDLLDIR)\inc
165SUBSYS = -subsystem:windowsce,2.00
166CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
167LDLIBPATH = -libpath:$(CELIBPATH)
168STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
169 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
170!endif
171
172!if "$(MACHINE)" == "wince-arm-hpc-wce211"
173CC = clarm.exe
174ARCH = ARM
175CPU = ARM
176TARGETCPU = ARM
177CEVersion = 211
178OSVERSION = WCE211
179PLATFORM = MS HPC Pro
180MCFLAGS = -D _MT -D _DLL -D ARM -D arm -D _arm_ -D _ARM_ \
181 -DPROCESSOR_ARM -DPALM_SIZE \
182 -I $(CELIBDLLDIR)\inc
183SUBSYS = -subsystem:windowsce,2.11
184CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
185LDLIBPATH = -libpath:$(CELIBPATH)
186STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
187 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
188!endif
189
190!if "$(MACHINE)" == "wince-arm-hpc-wce300"
191CC = clarm.exe
192ARCH = ARM
193CPU = ARM
194TARGETCPU = ARM
195CEVersion = 300
196OSVERSION = WCE300
c96f74ce 197#PLATFORM = HPC2000
e4451f11
JH
198MCFLAGS = -D _MT -D _DLL -D ARM -D arm -D _arm_ -D _ARM_ \
199 -DPROCESSOR_ARM -DPALM_SIZE \
200 -I $(CELIBDLLDIR)\inc
201SUBSYS = -subsystem:windowsce,3.00
202CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
203LDLIBPATH = -libpath:$(CELIBPATH)
204STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
205 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
206!endif
207
208!if "$(MACHINE)" == "wince-mips-palm-wce211"
209CC = clmips.exe
210ARCH = MIPS
211CPU = MIPS
212TARGETCPU = MIPS
213CEVersion = 211
214OSVERSION = WCE211
215PLATFORM = MS Palm Size PC
216MCFLAGS = -DMIPS -D_MIPS_ -DPROCESSOR_MIPS -D PALM_SIZE -D _DLL -D _MT \
217 -I $(CELIBDLLDIR)\inc
218SUBSYS = -subsystem:windowsce,2.11
219CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
220LDLIBPATH = -libpath:$(CELIBPATH)
221STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
222 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
223!endif
224
225!if "$(MACHINE)" == "wince-sh3-palm-wce211"
226CC = shcl.exe
227ARCH = SH3
228CPU = SH3
229TARGETCPU = SH3
230CEVersion = 211
231OSVERSION = WCE211
232PLATFORM = MS Palm Size PC
233MCFLAGS = -D _MT -D _DLL -DSH3 -D_SH3_ -DSHx -DPROCESSOR_SH3 -DPALM_SIZE \
234 -I $(CELIBDLLDIR)\inc
235SUBSYS = -subsystem:windowsce,2.11
236CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
237LDLIBPATH = -libpath:$(CELIBPATH)
238STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
239 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
240!endif
241
242!if "$(MACHINE)" == "wince-x86em-palm-wce211"
243CC = cl.exe
244ARCH = X86EM
245CPU = X86
246TARGETCPU = X86
247CEVersion = 211
248OSVERSION = WCE211
249PLATFORM = MS Palm Size PC
250MCFLAGS = -MDd -DX86 -D_X86_ -DPROCESSOR_X86 \
251 -D_WIN32_WCE_EMULATION -DPALM_SIZE \
252 -I $(CELIBDLLDIR)\inc
253MACH = -machine:x86
254SUBSYS = -subsystem:windows
255CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
256LDLIBPATH = -libpath:$(CELIBPATH)
257STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
258 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
259!endif
260
261!if "$(MACHINE)" == "wince-x86em-pocket-wce300"
262CC = cl.exe
263ARCH = X86EM
264CPU = X86
265TARGETCPU = X86
266CEVersion = 300
267OSVERSION = WCE300
268PLATFORM = MS Pocket PC
269MCFLAGS = -DX86 -D_X86_ -DPROCESSOR_X86 -D _MT -D _DLL \
270 -D_WIN32_WCE_EMULATION -DPALM_SIZE -DPOCKET_SIZE \
f4257e4d 271 -I $(CELIBDLLDIR)\inc
e4451f11
JH
272MACH = -machine:x86
273SUBSYS = -subsystem:windows
274CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
275LDLIBPATH = -libpath:$(CELIBPATH)
276STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
277 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
278!endif
279
280!if "$(MACHINE)" == "wince-mips-pocket-wce300"
281CC = clmips.exe
282ARCH = MIPS
283CPU = MIPS
284TARGETCPU = MIPS
285CEVersion = 300
286OSVERSION = WCE300
287PLATFORM = MS Pocket PC
288MCFLAGS = -D MIPS -D mips -D _MIPS_ -D _mips_ -DPROCESSOR_MIPS \
289 -D _MT -D _DLL -DPALM_SIZE -DPOCKET_SIZE \
f4257e4d 290 -I $(CELIBDLLDIR)\inc
e4451f11
JH
291MACH = -machine:mips
292SUBSYS = -subsystem:windowsce,3.00
293CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
216db7ee 294#STDLIBPATH = $(WCEROOT)\$(OSVERSION)\$(PLATFORM)\lib\$(CPU)
e4451f11 295LDLIBPATH = -libpath:$(CELIBPATH)
216db7ee 296#"-libpath:$(STDLIBPATH)"
e4451f11
JH
297STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
298 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
299!endif
300
301!if "$(MACHINE)" == "wince-sh3-pocket-wce300"
302CC = shcl.exe
303ARCH = SH3
304CPU = SH3
305TARGETCPU = SH3
306CEVersion = 300
307OSVERSION = WCE300
308PLATFORM = MS Pocket PC
309MCFLAGS = -D _MT -D _DLL -DSH3 -D_SH3_ -DSHx -DPROCESSOR_SH3 \
310 -DPALM_SIZE -DPOCKET_SIZE \
f4257e4d 311 -I $(CELIBDLLDIR)\inc
2e64bfdb 312MACH = -machine:sh3
e4451f11
JH
313SUBSYS = -subsystem:windowsce,3.00
314CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
315LDLIBPATH = -libpath:$(CELIBPATH)
316STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
317 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
318!endif
319
320!if "$(MACHINE)" == "wince-arm-pocket-wce300"
321CC = clarm.exe
322ARCH = ARM
323CPU = ARM
324TARGETCPU = ARM
325CEVersion = 300
326OSVERSION = WCE300
327PLATFORM = MS Pocket PC
328MCFLAGS = -D ARM -D arm -D _ARM_ -D _arm_ -DPROCESSOR_ARM \
329 -D _MT -D _DLL -DPALM_SIZE -DPOCKET_SIZE \
f4257e4d 330 -I $(CELIBDLLDIR)\inc
e4451f11
JH
331MACH = -machine:arm
332SUBSYS = -subsystem:windowsce,3.00
333CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
334LDLIBPATH = -libpath:$(CELIBPATH)
335STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
336 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
337!endif
338
339######################################################################
340# common section
341
342CEDEFS = -D_WINDOWS -D_WIN32_WCE=$(CEVersion) -DUNDER_CE=$(CEVersion) \
ca6c63e1
JH
343 $(MCFLAGS) -D PERL
344
e4451f11
JH
345CECFLAGS = $(CEDEFS)
346
347!if "$(CFG)" == "DEBUG"
348CECFLAGS = $(CECFLAGS) -Zi -Od
349!endif
350
351!if "$(CFG)" == "RELEASE"
352# -O2 and -Ot give internal compiler error in perl.c and lexer.
353# Also the dll cannot be loaded by perl.exe...
c96f74ce
JH
354!if "$(CPU)" == "SH3"
355!else
2e64bfdb 356CECFLAGS = $(CECFLAGS) -O2 -Ot
e4451f11
JH
357!endif
358
c96f74ce
JH
359!endif
360
e4451f11
JH
361RCDEFS = /l 0x407 /r /d "UNICODE" /d UNDER_CE=$(CEVersion) \
362 /d _WIN32_WCE=$(CEVersion)
363
364PATH=$(CEPATH);$(PATH)
365
366INCLUDE=$(WCEROOT)\$(OSVERSION)\$(PLATFORM)\include
367LIB=$(WCEROOT)\$(OSVERSION)\$(PLATFORM)\lib\$(ARCH)
368
369######################################################################
370
371!message
372!message Compiling for $(MACHINE)
373!message LIB=$(LIB)
374!message INCLUDE=$(INCLUDE)
375!message PATH=$(CEPATH)
376!message
377
378######################################################################
379#
380# Additional compiler flags can be specified here.
381#
382
b0f06652 383BUILDOPT = $(BUILDOPT) $(CECFLAGS) -DUSE_CROSS_COMPILE
e4451f11 384
e4451f11
JH
385
386!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
387D_CRYPT = undef
388!ELSE
389D_CRYPT = define
390CRYPT_FLAG = -DHAVE_DES_FCRYPT
391!ENDIF
392
e4451f11
JH
393!IF "$(PERL_MALLOC)" == ""
394PERL_MALLOC = undef
395!ENDIF
396
e4451f11
JH
397!IF "$(USE_MULTI)" == ""
398USE_MULTI = undef
399!ENDIF
400
e4451f11
JH
401!IF "$(USE_ITHREADS)" == ""
402USE_ITHREADS = undef
403!ENDIF
404
405!IF "$(USE_IMP_SYS)" == ""
406USE_IMP_SYS = undef
407!ENDIF
408
18f68570
VK
409!IF "$(USE_PERLIO)" == ""
410USE_PERLIO = undef
411!ENDIF
412
e4451f11
JH
413!IF "$(USE_PERLCRT)" == ""
414USE_PERLCRT = undef
415!ENDIF
416
3db8f154 417!IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
e4451f11
JH
418USE_MULTI = define
419!ENDIF
420
acfe0abc 421!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
e4451f11 422USE_MULTI = define
e4451f11
JH
423!ENDIF
424
3db8f154 425!IF "$(USE_MULTI)" != "undef"
e4451f11
JH
426BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
427!ENDIF
428
429!IF "$(USE_IMP_SYS)" != "undef"
430BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
431!ENDIF
432
18f68570
VK
433!IF "$(USE_PERLIO)" == "define"
434BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
435!ENDIF
436
47bcb90d 437!IF "$(CROSS_NAME)" == ""
2e64bfdb 438CROSS_NAME = $(MACHINE)
47bcb90d
VK
439!ENDIF
440
e4451f11
JH
441# new option - automatically defined in perl.h...
442#BUILDOPT = $(BUILDOPT) -DUSE_ENVIRON_ARRAY
443
444PROCESSOR_ARCHITECTURE = $(TARGETCPU)
445ARCHNAME = $(PLATFORM)-$(OSVERSION)-$(PROCESSOR_ARCHITECTURE)
e4451f11
JH
446ARCHDIR = ..\lib\$(ARCHNAME)
447COREDIR = ..\lib\CORE
e2a02c1e 448XCOREDIR = ..\xlib\$(CROSS_NAME)\CORE
e4451f11
JH
449AUTODIR = ..\lib\auto
450LIBDIR = ..\lib
451EXTDIR = ..\ext
452PODDIR = ..\pod
453EXTUTILSDIR = $(LIBDIR)\ExtUtils
454
455LINK32 = link
456LIB32 = $(LINK32) -lib
457RSC = rc
458
f4257e4d 459INCLUDES = -I.\include -I. -I..
e4451f11
JH
460DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG) $(CECFLAGS)
461LOCDEFS = -DPERLDLL -DPERL_CORE
216db7ee 462CXX_FLAG = -TP
e4451f11
JH
463
464PERLEXE_RES = perl.res
465PERLDLL_RES =
466
e4451f11
JH
467!if "$(CFG)" == "RELEASE"
468CELIB = celib.lib
469!endif
470
471!if "$(CFG)" == "DEBUG"
472CELIB = celib.lib
473!endif
474
475CELIBS = -nodefaultlib \
476 winsock.lib $(CELIB) coredll.lib
477
478!if $(CEVersion) > 200
f4257e4d 479CELIBS = $(CELIBS) corelibc.lib
e4451f11 480!else
f4257e4d 481CELIBS = $(CELIBS) msvcrt.lib
e4451f11
JH
482!endif
483
484LIBBASEFILES = $(CRYPT_LIB) $(CELIBS)
485
486LIBFILES = $(LIBBASEFILES) $(LIBC)
487
488CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
489 $(PCHFLAGS) $(OPTIMIZE)
490
491LINK_FLAGS = -nologo -machine:$(PROCESSOR_ARCHITECTURE)
492
493!if "$(CFG)" == "DEBUG"
f4257e4d 494LINK_FLAGS = $(LINK_FLAGS) -debug:full -pdb:none
2e64bfdb 495!else
f4257e4d 496LINK_FLAGS = $(LINK_FLAGS) -release
e4451f11
JH
497!endif
498
499OBJOUT_FLAG = -Fo
500EXEOUT_FLAG = -Fe
501
502CFLAGS_O = $(CFLAGS) $(BUILDOPT)
503
504o = .obj
505
506#
507# Rules
f4257e4d 508#
e4451f11
JH
509
510.SUFFIXES : .c $(o) .dll .lib .exe .rc .res
511
512.c$(o):
513 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
514
515.y.c:
516 $(NOOP)
517
518$(o).dll:
519 $(LINK32) -dll $(SUBSYS) $(LDLIBPATH) \
520 -implib:$(*B).lib -def:$(*B).def \
f4257e4d 521 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
e4451f11
JH
522
523.rc.res:
524 $(RSC) -i.. $<
525
526# This must be relative to ../lib/CORE, else the ext dll build fails...
e2a02c1e 527PERLIMPLIB_EXP = ..\..\..\xlib\$(CROSS_NAME)\CORE\perl$(PV).lib
e4451f11
JH
528PERLIMPLIB = $(PERLCEDIR)\$(MACHINE)\perl$(PV).lib
529PERLDLL = $(MACHINE)\perl$(PV).dll
530
531DLLDIR = $(MACHINE)\dll
532PERLEXE = $(MACHINE)\perl.exe
533
e2a02c1e 534CONFIGPM = ..\xlib\$(CROSS_NAME)\Config.pm
e4451f11
JH
535MINIMOD = ..\lib\ExtUtils\Miniperl.pm
536
42d1cefd 537# Unicode data files generated by mktables
3df51b85 538UNIDATAFILES = ..\lib\unicore\Decomposition.pl \
42d1cefd 539 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
860054a8 540 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst \
3e344d15 541 ..\lib\unicore\TestProp.pl
42d1cefd
RGS
542
543# Directories of Unicode data files generated by mktables
544UNIDATADIR1 = ..\lib\unicore\To
545UNIDATADIR2 = ..\lib\unicore\lib
546
fefd7080
VK
547# Nominate a target which causes extensions to be re-built
548# This used to be $(PERLEXE), but at worst it is the .dll that they depend
549# on and really only the interface - i.e. the .def file used to export symbols
550# from the .dll
551PERLDEP = perldll.def
552
e4451f11
JH
553MAKE = nmake -nologo
554
555CFGSH_TMPL = config.ce
556CFGH_TMPL = config_H.ce
557
558#
559# filenames given to xsubpp must have forward slashes (since it puts
560# full pathnames in #line strings)
fefd7080 561XSUBPP = $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) ..\$(EXTUTILSDIR)\xsubpp \
e4451f11
JH
562 -C++ -prototypes
563
564MICROCORE_SRC = \
565 ..\av.c \
566 ..\deb.c \
567 ..\doio.c \
568 ..\doop.c \
569 ..\dump.c \
570 ..\globals.c \
571 ..\gv.c \
e1a479c5 572 ..\mro.c \
e4451f11 573 ..\hv.c \
26ea9e12 574 ..\keywords.c \
e4451f11
JH
575 ..\mg.c \
576 ..\op.c \
b475b3e6 577 ..\pad.c \
e4451f11
JH
578 ..\perl.c \
579 ..\perlapi.c \
580 ..\perly.c \
581 ..\pp.c \
582 ..\pp_ctl.c \
583 ..\pp_hot.c \
84d4ea48
JH
584 ..\pp_pack.c \
585 ..\pp_sort.c \
e4451f11 586 ..\pp_sys.c \
10bc17b6 587 ..\reentr.c \
e4451f11
JH
588 ..\regcomp.c \
589 ..\regexec.c \
590 ..\run.c \
591 ..\scope.c \
592 ..\sv.c \
593 ..\taint.c \
594 ..\toke.c \
595 ..\universal.c \
596 ..\utf8.c \
48462a74 597 ..\util.c
e4451f11
JH
598
599EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
600
601!IF "$(PERL_MALLOC)" == "define"
602EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
603!ENDIF
604
42165d27 605EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c .\win32io.c
e4451f11
JH
606
607WIN32_SRC = \
608 .\wince.c \
609 .\wincesck.c \
f4257e4d 610 .\win32thread.c
e4451f11
JH
611
612!IF "$(CRYPT_SRC)" != ""
613WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
614!ENDIF
615
616DLL_SRC = $(DYNALOADER).c
617
618CORE_NOCFG_H = \
619 ..\av.h \
620 ..\cop.h \
621 ..\cv.h \
622 ..\dosish.h \
623 ..\embed.h \
624 ..\form.h \
625 ..\gv.h \
626 ..\handy.h \
627 ..\hv.h \
628 ..\iperlsys.h \
629 ..\mg.h \
630 ..\nostdio.h \
631 ..\op.h \
632 ..\opcode.h \
633 ..\perl.h \
634 ..\perlapi.h \
635 ..\perlsdio.h \
636 ..\perlsfio.h \
637 ..\perly.h \
638 ..\pp.h \
639 ..\proto.h \
640 ..\regexp.h \
641 ..\scope.h \
642 ..\sv.h \
643 ..\thread.h \
644 ..\unixish.h \
645 ..\utf8.h \
646 ..\util.h \
647 ..\warnings.h \
648 ..\XSUB.h \
649 ..\EXTERN.h \
650 ..\perlvars.h \
651 ..\intrpvar.h \
e4451f11
JH
652 .\include\dirent.h \
653 .\include\netdb.h \
654 .\include\sys\socket.h \
655 .\win32.h
656
48462a74 657DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attributes B re \
e4451f11
JH
658 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
659 Sys/Hostname
660
661STATIC_EXT = DynaLoader
e4451f11
JH
662
663DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
e4451f11
JH
664
665ERRNO_PM = $(LIBDIR)\Errno.pm
666
e4451f11
JH
667
668EXTENSION_PM = \
669 $(ERRNO_PM)
670
e4451f11
JH
671CFG_VARS = \
672 "INST_DRV=$(INST_DRV)" \
673 "INST_TOP=$(INST_TOP)" \
674 "INST_VER=$(INST_VER)" \
675 "INST_ARCH=$(INST_ARCH)" \
676 "archname=$(ARCHNAME)" \
74d57dc4 677 "CC=$(CC)" \
e4451f11 678 "ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT)" \
1829b0dc
VK
679 "cppflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT)" \
680 "cf_by=vkon" \
2e64bfdb 681 "cf_email=$(EMAIL)" \
e4451f11
JH
682 "d_crypt=$(D_CRYPT)" \
683 "d_mymalloc=$(PERL_MALLOC)" \
684 "libs=$(LIBFILES)" \
685 "incpath=$(CCINCDIR)" \
686 "libperl=$(PERLIMPLIB_EXP)" \
687 "libpth=$(LIBPATH)" \
688 "libc=$(LIBC)" \
689 "make=nmake" \
690 "static_ext=$(STATIC_EXT)" \
691 "dynamic_ext=$(DYNAMIC_EXT)" \
e4451f11 692 "useithreads=$(USE_ITHREADS)" \
e4451f11 693 "usemultiplicity=$(USE_MULTI)" \
18f68570 694 "useperlio=$(USE_PERLIO)" \
e4451f11
JH
695 "LINK_FLAGS=$(LDLIBPATH) $(LINK_FLAGS) $(SUBSYS)" \
696 "optimize=$(OPTIMIZE)"
697
698#
699# Top targets
700#
701
42e07562 702all: hostminiperl $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) MakePPPort Extensions
e4451f11 703
d8c3cb99 704$(DYNALOADER)$(o) : $(DYNALOADER).c xconfig.h $(EXTDIR)\DynaLoader\dlutils.c
e4451f11 705
608969de 706$(CONFIGPM) : $(HPERL) ..\config.sh .\xconfig.h config_h.PL ..\minimod.pl
fefd7080 707 cd .. && $(HPERL) configpm --cross=$(CROSS_NAME) --no-glossary
e2a02c1e
VK
708 -mkdir $(XCOREDIR)
709 $(XCOPY) ..\*.h $(XCOREDIR)\*.*
0f133d1f 710 $(XCOPY) ..\*.inc $(XCOREDIR)\*.*
e2a02c1e 711 $(XCOPY) *.h $(XCOREDIR)\*.*
e4451f11 712 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
e2a02c1e 713 $(RCOPY) include $(XCOREDIR)\*.*
e4451f11 714
f4257e4d
YO
715.\xconfig.h:
716 -del /f xconfig.h
608969de
VK
717 -mkdir $(XCOREDIR)
718 -$(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)" "CONFIG_H=xconfig.h"
719 $(XCOPY) xconfig.h $(XCOREDIR)\config.h
e2a02c1e
VK
720
721..\config.sh: config.ce config_sh.PL
f4257e4d 722 $(HPERL) -I..\lib -I. config_sh.PL $(CFG_VARS) config.ce > ..\config.sh
e4451f11
JH
723
724$(MINIMOD) : ..\minimod.pl
18f68570 725 cd .. && $(HPERL) minimod.pl > lib\ExtUtils\Miniperl.pm
e4451f11 726
e4451f11
JH
727$(DYNALOADER).c: $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
728 if not exist $(AUTODIR) mkdir $(AUTODIR)
729 cd $(EXTDIR)\$(*B)
3f2394f2
VK
730 $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) $(*B)_pm.PL
731 $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) XSLoader_pm.PL
247d8755 732 cd ..\..\win32
e4451f11
JH
733 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
734 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
735 cd $(EXTDIR)\$(*B)
736 $(XSUBPP) dl_win32.xs > $(*B).c
247d8755 737 cd ..\..\win32
e4451f11
JH
738
739$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
740 $(COPY) dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
741
42e07562 742MakePPPort: $(MINIPERL) $(CONFIGPM)
01e90026 743 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ..\mkppport
42e07562
MHM
744
745MakePPPort_clean:
01e90026 746 -if exist $(HPERL) $(HPERL) -I..\lib ..\mkppport --clean
42e07562 747
fefd7080 748#----------------------------------------------------------------------------------
94081db1
VK
749NOT_COMPILE_EXT =
750!if "$(MACHINE)" == "wince-sh3-palm-wce211"
751NOT_COMPILE_EXT = $(NOT_COMPILE_EXT) !XS/Typemap
752!endif
753!if "$(MACHINE)" == "wince-mips-palm-wce211"
754NOT_COMPILE_EXT = $(NOT_COMPILE_EXT) !XS/Typemap
755!endif
756
d1b15013
NC
757Extensions: ..\make_ext.pl $(PERLDEP) $(CONFIGPM)
758 $(HPERL) -I..\lib -I. -MCross=$(CROSS_NAME) ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all \
75472953 759 !POSIX $(NOT_COMPILE_EXT)
fefd7080 760
f4257e4d 761Extensions_clean:
d1b15013 762 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all --target=clean
fefd7080
VK
763
764#----------------------------------------------------------------------------------
765
476a6acb 766$(PERLEXE_RES): perl.rc perl.ico
e4451f11
JH
767 rc $(RCDEFS) perl.rc
768
f4257e4d 769clean:
e4451f11
JH
770 -rm -f $(MACHINE)/dll/*
771 -rm -f $(MACHINE)/*.obj
772 -rm -f $(MACHINE)/*.exe
773 -rm -f $(MACHINE)/*.dll
774 -rm -f $(MACHINE)/*.lib
775 -rm -f ../config.sh ../lib/Config.pm
d8c3cb99 776 -rm -f config.h xconfig.h perl.res
0279961e 777 -rm -f ../t/test_state
e4451f11 778
e4451f11
JH
779XDLLOBJS = \
780$(DLLDIR)\av.obj \
781$(DLLDIR)\deb.obj \
782$(DLLDIR)\doio.obj \
783$(DLLDIR)\doop.obj \
784$(DLLDIR)\dump.obj \
785$(DLLDIR)\globals.obj \
786$(DLLDIR)\gv.obj \
e1a479c5 787$(DLLDIR)\mro.obj \
e4451f11
JH
788$(DLLDIR)\hv.obj \
789$(DLLDIR)\locale.obj \
7ee2227d 790$(DLLDIR)\mathoms.obj \
e4451f11
JH
791$(DLLDIR)\mg.obj \
792$(DLLDIR)\numeric.obj \
793$(DLLDIR)\op.obj \
b475b3e6 794$(DLLDIR)\pad.obj \
e4451f11
JH
795$(DLLDIR)\perl.obj \
796$(DLLDIR)\perlapi.obj \
797$(DLLDIR)\perlio.obj \
798$(DLLDIR)\perly.obj \
799$(DLLDIR)\pp.obj \
800$(DLLDIR)\pp_ctl.obj \
801$(DLLDIR)\pp_hot.obj \
802$(DLLDIR)\pp_pack.obj \
84d4ea48 803$(DLLDIR)\pp_sort.obj \
e4451f11 804$(DLLDIR)\pp_sys.obj \
10bc17b6 805$(DLLDIR)\reentr.obj \
e4451f11
JH
806$(DLLDIR)\regcomp.obj \
807$(DLLDIR)\regexec.obj \
808$(DLLDIR)\run.obj \
809$(DLLDIR)\scope.obj \
810$(DLLDIR)\sv.obj \
811$(DLLDIR)\taint.obj \
812$(DLLDIR)\toke.obj \
813$(DLLDIR)\universal.obj \
814$(DLLDIR)\utf8.obj \
815$(DLLDIR)\util.obj \
816$(DLLDIR)\win32thread.obj \
817$(DLLDIR)\wince.obj \
42165d27 818$(DLLDIR)\win32io.obj \
e4451f11 819$(DLLDIR)\wincesck.obj \
e4451f11
JH
820$(DLLDIR)\perllib.obj \
821$(DLLDIR)\DynaLoader.obj
2e64bfdb
JH
822!IF "$(PERL_MALLOC)" == "define"
823XDLLOBJS = $(XDLLOBJS) $(DLLDIR)\malloc.obj
824!ENDIF
81003058
VK
825!IF "$(CRYPT_SRC)" != ""
826XDLLOBJS = $(XDLLOBJS) $(DLLDIR)\fcrypt.obj
827!ENDIF
e4451f11
JH
828
829{$(SRCDIR)}.c{$(DLLDIR)}.obj:
216db7ee
VK
830 $(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ $<
831
832# compiler explains that it will optimize toke.c if we'll give it an
833# option -QMOb<num> with num>=4178
834$(DLLDIR)\toke.obj:
835 $(CC) -c $(CFLAGS_O) -QMOb9000 -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ ..\toke.c
e4451f11 836
247d8755 837{$(SRCDIR)/win32}.c{$(DLLDIR)}.obj:
216db7ee
VK
838 $(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ $<
839
840# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
841# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
842!IF "$(USE_IMP_SYS)" == "define"
8f33b42a 843$(DLLDIR)\perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
216db7ee
VK
844 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
845 rem (frustrated) mv perllib.obj $(DLLDIR)
846!ENDIF
e4451f11 847
897d3989 848perldll.def : $(HPERL) $(CONFIGPM) ..\global.sym ..\makedef.pl create_perllibst_h.pl
d1b15013 849 $(HPERL) -MCross -I..\lib create_perllibst_h.pl
18f68570
VK
850 $(HPERL) -w ..\makedef.pl PLATFORM=wince $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
851 CCTYPE=$(CCTYPE) -DPERL_DLL=$(PERLDLL) > perldll.def
852
e4451f11
JH
853$(PERLDLL) : $(DLLDIR) perldll.def $(XDLLOBJS) $(PERLDLL_RES)
854 $(LINK32) -dll -def:perldll.def -out:$@ \
855 $(SUBSYS) $(LDLIBPATH) \
856 $(LINK_FLAGS) $(LIBFILES) \
857 $(XDLLOBJS) $(PERLDLL_RES)
858
859$(DLLDIR) :
860 if not exist "$(DLLDIR)" mkdir "$(DLLDIR)"
861
862$(DLLDIR)\DynaLoader.obj: $(EXTDIR)\DynaLoader\DynaLoader.c
216db7ee 863 $(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ \
e4451f11
JH
864 $(EXTDIR)\DynaLoader\DynaLoader.c
865
866XPERLEXEOBJS = \
247d8755 867$(MACHINE)\perlmaince.obj
e4451f11
JH
868
869$(PERLEXE) : $(PERLDLL) $(CONFIGPM) $(XPERLEXEOBJS) $(PERLEXE_RES) $(STARTOBJS)
e2a02c1e 870 $(XCOPY) $(MACHINE)\*.lib $(XCOREDIR)
2e64bfdb 871 $(LINK32) $(SUBSYS) $(LDLIBPATH) \
e4451f11
JH
872 -entry:wWinMainCRTStartup \
873 -out:$(MACHINE)\perl.exe \
874 -stack:0x100000 $(LINK_FLAGS) $(STARTOBJS) $(XPERLEXEOBJS) \
875 $(PERLIMPLIB) $(PERLEXE_RES) $(LIBFILES)
876
247d8755
VK
877$(MACHINE)\perlmaince.obj : perlmaince.c
878 $(CC) $(CFLAGS_O) -UPERLDLL -Fo$(MACHINE)\ -c perlmaince.c
e4451f11
JH
879
880iodll: $(IO_DLL)
881socketdll: $(SOCKET_DLL)
882dumperdll: $(DUMPER_DLL)
883
884dlls: socketdll iodll dumperdll
885 -xmkdir -p $(MACHINE)/lib/auto/IO
886 cp ../lib/auto/IO/IO.bs $(MACHINE)/lib/auto/IO
887 cp ../lib/auto/IO/IO.dll $(MACHINE)/lib/auto/IO
888 -xmkdir $(MACHINE)/lib/auto/Socket
889 cp ../lib/auto/Socket/Socket.bs $(MACHINE)/lib/auto/Socket
890 cp ../lib/auto/Socket/Socket.dll $(MACHINE)/lib/auto/Socket
891 -xmkdir -p $(MACHINE)/lib/auto/Data/Dumper
892 cp ../lib/auto/Data/Dumper/Dumper.bs $(MACHINE)/lib/auto/Data/Dumper
893 cp ../lib/auto/Data/Dumper/Dumper.dll $(MACHINE)/lib/auto/Data/Dumper
894
895makedist: all dlls
896 $(COPY) $(CELIBPATH)\celib.dll $(MACHINE)
897 cp perl.txt $(MACHINE)
898 cp registry.bat $(MACHINE)
899 cp ../lib/Config.pm $(MACHINE)/lib
900 cd $(MACHINE)
901 rm -f perl-$(MACHINE).tar.gz
902 sh -c "tar cf perl-$(MACHINE).tar *.exe *.dll *.txt *.bat lib"
903 gzip -9 perl-$(MACHINE).tar
904 mv perl-$(MACHINE).tar.gz h:/freenet/new
905 cd ..
906
42165d27
VK
907install: all
908 -cemkdir "$(INSTALL_ROOT)"
909 -cemkdir "$(INSTALL_ROOT)\bin"
910 -cemkdir "$(INSTALL_ROOT)\lib"
911 $(CECOPY) "pc:$(MACHINE)/perl.exe" "ce:$(INSTALL_ROOT)/bin"
18f68570 912 $(CECOPY) "pc:$(MACHINE)/perl$(PV).dll" "ce:$(INSTALL_ROOT)/bin"
e2a02c1e 913 $(CECOPY) "pc:../xlib/$(CROSS_NAME)/Config.pm" "ce:$(INSTALL_ROOT)/lib"
42d1cefd
RGS
914
915$(UNIDATAFILES) : $(HPERL) $(CONFIGPM) ..\lib\unicore\mktables
916 cd ..\lib\unicore && \
3df51b85 917 $(HPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p
e4451f11 918
2e64bfdb 919dist: all
284edc75 920 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
c96f74ce
JH
921
922zipdist: all
284edc75
VK
923 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
924 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
c96f74ce
JH
925
926zip:
284edc75 927 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
2e64bfdb 928
18f68570 929hostminiperl: ..\miniperl.exe
e4451f11 930
18f68570 931..\miniperl.exe:
18f68570 932 set PATH=$(CCHOME)\bin;$(PATH)
47bcb90d 933 $(MAKE) -f Makefile "CCHOME=$(MSVCDIR)" "CCINCDIR=$(CCHOME)\include" "CCLIBDIR=$(CCHOME)\lib" "INCLUDE=$(CCHOME)\include" "LIB=$(CCHOME)\lib" "LINK_FLAGS=" .\config.h ..\miniperl.exe
476a6acb 934
47bcb90d
VK
935host-install:
936 perl -MConfig -MExtUtils::Install -we "install({'../lib/CORE', qq#$$Config{installprefixexp}/xlib/$(CROSS_NAME)/CORE#},1)"
937 perl -MConfig -MExtUtils::Install -we "install({'../xlib/$(CROSS_NAME)', qq#$$Config{installprefixexp}/xlib/$(CROSS_NAME)#},1)"
938 perl -MConfig -MFile::Copy -we "copy qq#./$(MACHINE)/perl$(PV).lib#, qq#$$Config{installprefixexp}/xlib/$(CROSS_NAME)/CORE#"
939 perl -MConfig -MFile::Copy -we "copy qq#../lib/Cross.pm#, qq#$$Config{installprefixexp}/lib#"
74a9a7e5
VK
940 perl -MConfig -we "system qq#perl -pi.bak -we \"s{((arch^|priv)libexp)='.*'}{\$$1='# . \
941 quotemeta($$Config{installprefixexp}) . \
942 qq#/xlib/$(CROSS_NAME)'}\" $$Config{installprefixexp}/xlib/$(CROSS_NAME)/Config.pm#"