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