2 # perl makefile for wince
3 # During the cross-compilation, it first uses Makefile file to build
4 # miniperl on HOST and then build required platform
11 # INSTALL_ROOT specifies a path where this perl will be installed on CE device
12 INSTALL_ROOT=/netzwerk/sprache/perl
13 INST_TOP=$(INSTALL_ROOT)
16 # PERLCEDIR shoud be set to current directory
17 PERLCEDIR = H:\src\wince\perl\win32
19 # WCEROOT is a directory where Windows CE Tools was installed
20 WCEROOT = D:\Windows CE Tools
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
25 HPERL = $(MAKEDIR)\..\miniperl.exe
27 CEPATH = D:\Programme\Microsoft eMbedded Tools\EVC\WCE211\BIN
28 CELIBDLLDIR = h:\src\wince\celib-palm-3.0
29 CECONSOLEDIR = h:\src\wince\w32console
31 # specify following options to build perl on local machine, by MSVC
32 MSVCDIR = D:\MSVStudio\VC98
34 CCINCDIR = $(CCHOME)\include
35 CCLIBDIR = $(CCHOME)\lib
40 XCOPY = xcopy $(YES) /f /r /i /d
41 RCOPY = xcopy $(YES) /f /r /i /e /d
43 # cecopy program. Make shure it is in your path, as well as cemkdir, cedel
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
51 # encodings and may see lower IO performance. You have been warned.
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.
64 # keep this untouched!
71 !if "$(MACHINE)" == ""
72 MACHINE=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
87 # set this to your email address
91 ##################### CHANGE THESE ONLY IF YOU MUST #####################
93 ######################################################################
96 !if "$(MACHINE)" == "wince-sh3-hpc-wce211"
103 PLATFORM = MS HPC Pro
104 MCFLAGS = -MDd -DSH3 -D_SH3_ -DSHx -DPROCESSOR_SH3 -DPALM_SIZE \
105 -I $(CELIBDLLDIR)\inc
106 SUBSYS = -subsystem:windowsce,2.11
107 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
108 LDLIBPATH = -libpath:$(CELIBPATH)
109 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
110 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
113 !if "$(MACHINE)" == "wince-mips-hpc-wce211"
120 PLATFORM = MS HPC Pro
121 MCFLAGS = -D _MT -D _DLL \
122 -D MIPS -D mips -D _MIPS_ -D _mips_ -DPROCESSOR_MIPS \
124 -I $(CELIBDLLDIR)\inc
125 SUBSYS = -subsystem:windowsce,2.11
126 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
127 LDLIBPATH = -libpath:$(CELIBPATH)
128 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
129 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
132 !if "$(MACHINE)" == "wince-mips-hpc-wce200"
140 # MUST USE -MD to get the right FPE stuff...
141 MCFLAGS = -D _MT -D _DLL -MD \
142 -D MIPS -D mips -D _MIPS_ -D _mips_ -DPROCESSOR_MIPS \
144 -I $(CELIBDLLDIR)\inc
145 SUBSYS = -subsystem:windowsce,2.00
146 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
147 LDLIBPATH = -libpath:$(CELIBPATH)
148 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
149 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
152 !if "$(MACHINE)" == "wince-sh3-hpc-wce200"
160 # MUST USE -MD to get the right FPE stuff...
161 MCFLAGS = -D _MT -D _DLL -MD \
162 -D SH3 -D sh3 -D _SH3_ -D _sh3_ -D SHx -DPROCESSOR_SH3 \
164 -I $(CELIBDLLDIR)\inc
165 SUBSYS = -subsystem:windowsce,2.00
166 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
167 LDLIBPATH = -libpath:$(CELIBPATH)
168 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
169 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
172 !if "$(MACHINE)" == "wince-arm-hpc-wce211"
179 PLATFORM = MS HPC Pro
180 MCFLAGS = -D _MT -D _DLL -D ARM -D arm -D _arm_ -D _ARM_ \
181 -DPROCESSOR_ARM -DPALM_SIZE \
182 -I $(CELIBDLLDIR)\inc
183 SUBSYS = -subsystem:windowsce,2.11
184 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
185 LDLIBPATH = -libpath:$(CELIBPATH)
186 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
187 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
190 !if "$(MACHINE)" == "wince-arm-hpc-wce300"
198 MCFLAGS = -D _MT -D _DLL -D ARM -D arm -D _arm_ -D _ARM_ \
199 -DPROCESSOR_ARM -DPALM_SIZE \
200 -I $(CELIBDLLDIR)\inc
201 SUBSYS = -subsystem:windowsce,3.00
202 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
203 LDLIBPATH = -libpath:$(CELIBPATH)
204 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
205 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
208 !if "$(MACHINE)" == "wince-mips-palm-wce211"
215 PLATFORM = MS Palm Size PC
216 MCFLAGS = -DMIPS -D_MIPS_ -DPROCESSOR_MIPS -D PALM_SIZE -D _DLL -D _MT \
217 -I $(CELIBDLLDIR)\inc
218 SUBSYS = -subsystem:windowsce,2.11
219 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
220 LDLIBPATH = -libpath:$(CELIBPATH)
221 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
222 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
225 !if "$(MACHINE)" == "wince-sh3-palm-wce211"
232 PLATFORM = MS Palm Size PC
233 MCFLAGS = -D _MT -D _DLL -DSH3 -D_SH3_ -DSHx -DPROCESSOR_SH3 -DPALM_SIZE \
234 -I $(CELIBDLLDIR)\inc
235 SUBSYS = -subsystem:windowsce,2.11
236 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
237 LDLIBPATH = -libpath:$(CELIBPATH)
238 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
239 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
242 !if "$(MACHINE)" == "wince-x86em-palm-wce211"
249 PLATFORM = MS Palm Size PC
250 MCFLAGS = -MDd -DX86 -D_X86_ -DPROCESSOR_X86 \
251 -D_WIN32_WCE_EMULATION -DPALM_SIZE \
252 -I $(CELIBDLLDIR)\inc
254 SUBSYS = -subsystem:windows
255 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
256 LDLIBPATH = -libpath:$(CELIBPATH)
257 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
258 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
261 !if "$(MACHINE)" == "wince-x86em-pocket-wce300"
268 PLATFORM = MS Pocket PC
269 MCFLAGS = -DX86 -D_X86_ -DPROCESSOR_X86 -D _MT -D _DLL \
270 -D_WIN32_WCE_EMULATION -DPALM_SIZE -DPOCKET_SIZE \
271 -I $(CELIBDLLDIR)\inc
273 SUBSYS = -subsystem:windows
274 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
275 LDLIBPATH = -libpath:$(CELIBPATH)
276 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
277 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
280 !if "$(MACHINE)" == "wince-mips-pocket-wce300"
287 PLATFORM = MS Pocket PC
288 MCFLAGS = -D MIPS -D mips -D _MIPS_ -D _mips_ -DPROCESSOR_MIPS \
289 -D _MT -D _DLL -DPALM_SIZE -DPOCKET_SIZE \
290 -I $(CELIBDLLDIR)\inc
292 SUBSYS = -subsystem:windowsce,3.00
293 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
294 #STDLIBPATH = $(WCEROOT)\$(OSVERSION)\$(PLATFORM)\lib\$(CPU)
295 LDLIBPATH = -libpath:$(CELIBPATH)
296 #"-libpath:$(STDLIBPATH)"
297 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
298 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
301 !if "$(MACHINE)" == "wince-sh3-pocket-wce300"
308 PLATFORM = MS Pocket PC
309 MCFLAGS = -D _MT -D _DLL -DSH3 -D_SH3_ -DSHx -DPROCESSOR_SH3 \
310 -DPALM_SIZE -DPOCKET_SIZE \
311 -I $(CELIBDLLDIR)\inc
313 SUBSYS = -subsystem:windowsce,3.00
314 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
315 LDLIBPATH = -libpath:$(CELIBPATH)
316 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
317 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
320 !if "$(MACHINE)" == "wince-arm-pocket-wce300"
327 PLATFORM = MS Pocket PC
328 MCFLAGS = -D ARM -D arm -D _ARM_ -D _arm_ -DPROCESSOR_ARM \
329 -D _MT -D _DLL -DPALM_SIZE -DPOCKET_SIZE \
330 -I $(CELIBDLLDIR)\inc
332 SUBSYS = -subsystem:windowsce,3.00
333 CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release
334 LDLIBPATH = -libpath:$(CELIBPATH)
335 STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \
336 $(CECONSOLEDIR)/$(MACHINE)/w32console.obj
339 ######################################################################
342 CEDEFS = -D_WINDOWS -D_WIN32_WCE=$(CEVersion) -DUNDER_CE=$(CEVersion) \
347 !if "$(CFG)" == "DEBUG"
348 CECFLAGS = $(CECFLAGS) -Zi -Od
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...
354 !if "$(CPU)" == "SH3"
356 CECFLAGS = $(CECFLAGS) -O2 -Ot
361 RCDEFS = /l 0x407 /r /d "UNICODE" /d UNDER_CE=$(CEVersion) \
362 /d _WIN32_WCE=$(CEVersion)
364 PATH=$(CEPATH);$(PATH)
366 INCLUDE=$(WCEROOT)\$(OSVERSION)\$(PLATFORM)\include
367 LIB=$(WCEROOT)\$(OSVERSION)\$(PLATFORM)\lib\$(ARCH)
369 ######################################################################
372 !message Compiling for $(MACHINE)
374 !message INCLUDE=$(INCLUDE)
375 !message PATH=$(CEPATH)
378 ######################################################################
380 # Additional compiler flags can be specified here.
383 BUILDOPT = $(BUILDOPT) $(CECFLAGS) -DUSE_CROSS_COMPILE
386 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
390 CRYPT_FLAG = -DHAVE_DES_FCRYPT
393 !IF "$(PERL_MALLOC)" == ""
397 !IF "$(USE_MULTI)" == ""
401 !IF "$(USE_ITHREADS)" == ""
405 !IF "$(USE_IMP_SYS)" == ""
409 !IF "$(USE_PERLIO)" == ""
413 !IF "$(USE_PERLCRT)" == ""
417 !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
421 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
425 !IF "$(USE_MULTI)" != "undef"
426 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
429 !IF "$(USE_IMP_SYS)" != "undef"
430 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
433 !IF "$(USE_PERLIO)" == "define"
434 BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
437 !IF "$(CROSS_NAME)" == ""
438 CROSS_NAME = $(MACHINE)
441 # new option - automatically defined in perl.h...
442 #BUILDOPT = $(BUILDOPT) -DUSE_ENVIRON_ARRAY
444 PROCESSOR_ARCHITECTURE = $(TARGETCPU)
445 ARCHNAME = $(PLATFORM)-$(OSVERSION)-$(PROCESSOR_ARCHITECTURE)
446 ARCHDIR = ..\lib\$(ARCHNAME)
447 COREDIR = ..\lib\CORE
448 XCOREDIR = ..\xlib\$(CROSS_NAME)\CORE
449 AUTODIR = ..\lib\auto
453 EXTUTILSDIR = $(LIBDIR)\ExtUtils
456 LIB32 = $(LINK32) -lib
459 INCLUDES = -I.\include -I. -I..
460 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG) $(CECFLAGS)
461 LOCDEFS = -DPERLDLL -DPERL_CORE
464 PERLEXE_RES = perl.res
467 !if "$(CFG)" == "RELEASE"
471 !if "$(CFG)" == "DEBUG"
475 CELIBS = -nodefaultlib \
476 winsock.lib $(CELIB) coredll.lib
478 !if $(CEVersion) > 200
479 CELIBS = $(CELIBS) corelibc.lib
481 CELIBS = $(CELIBS) msvcrt.lib
484 LIBBASEFILES = $(CRYPT_LIB) $(CELIBS)
486 LIBFILES = $(LIBBASEFILES) $(LIBC)
488 CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
489 $(PCHFLAGS) $(OPTIMIZE)
491 LINK_FLAGS = -nologo -machine:$(PROCESSOR_ARCHITECTURE)
493 !if "$(CFG)" == "DEBUG"
494 LINK_FLAGS = $(LINK_FLAGS) -debug:full -pdb:none
496 LINK_FLAGS = $(LINK_FLAGS) -release
502 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
510 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
513 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
519 $(LINK32) -dll $(SUBSYS) $(LDLIBPATH) \
520 -implib:$(*B).lib -def:$(*B).def \
521 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
526 # This must be relative to ../lib/CORE, else the ext dll build fails...
527 PERLIMPLIB_EXP = ..\..\..\xlib\$(CROSS_NAME)\CORE\perl$(PV).lib
528 PERLIMPLIB = $(PERLCEDIR)\$(MACHINE)\perl$(PV).lib
529 PERLDLL = $(MACHINE)\perl$(PV).dll
531 DLLDIR = $(MACHINE)\dll
532 PERLEXE = $(MACHINE)\perl.exe
534 CONFIGPM = ..\xlib\$(CROSS_NAME)\Config.pm
535 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
537 # Unicode data files generated by mktables
538 UNIDATAFILES = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
539 ..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \
540 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
541 ..\lib\unicore\PVA.pl
543 # Directories of Unicode data files generated by mktables
544 UNIDATADIR1 = ..\lib\unicore\To
545 UNIDATADIR2 = ..\lib\unicore\lib
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
551 PERLDEP = perldll.def
555 CFGSH_TMPL = config.ce
556 CFGH_TMPL = config_H.ce
559 # filenames given to xsubpp must have forward slashes (since it puts
560 # full pathnames in #line strings)
561 XSUBPP = $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) ..\$(EXTUTILSDIR)\xsubpp \
599 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
601 !IF "$(PERL_MALLOC)" == "define"
602 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
605 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c .\win32io.c
612 !IF "$(CRYPT_SRC)" != ""
613 WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
616 DLL_SRC = $(DYNALOADER).c
654 .\include\sys\socket.h \
657 DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs B re \
658 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
661 STATIC_EXT = DynaLoader
663 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
665 ERRNO_PM = $(LIBDIR)\Errno.pm
671 POD2HTML = $(PODDIR)\pod2html
672 POD2MAN = $(PODDIR)\pod2man
673 POD2LATEX = $(PODDIR)\pod2latex
674 POD2TEXT = $(PODDIR)\pod2text
677 "INST_DRV=$(INST_DRV)" \
678 "INST_TOP=$(INST_TOP)" \
679 "INST_VER=$(INST_VER)" \
680 "INST_ARCH=$(INST_ARCH)" \
681 "archname=$(ARCHNAME)" \
683 "ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT)" \
684 "cppflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT)" \
686 "cf_email=$(EMAIL)" \
687 "d_crypt=$(D_CRYPT)" \
688 "d_mymalloc=$(PERL_MALLOC)" \
690 "incpath=$(CCINCDIR)" \
691 "libperl=$(PERLIMPLIB_EXP)" \
692 "libpth=$(LIBPATH)" \
695 "static_ext=$(STATIC_EXT)" \
696 "dynamic_ext=$(DYNAMIC_EXT)" \
697 "useithreads=$(USE_ITHREADS)" \
698 "usemultiplicity=$(USE_MULTI)" \
699 "useperlio=$(USE_PERLIO)" \
700 "LINK_FLAGS=$(LDLIBPATH) $(LINK_FLAGS) $(SUBSYS)" \
701 "optimize=$(OPTIMIZE)"
707 all: hostminiperl $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) MakePPPort Extensions
709 $(DYNALOADER)$(o) : $(DYNALOADER).c xconfig.h $(EXTDIR)\DynaLoader\dlutils.c
711 $(CONFIGPM) : $(HPERL) ..\config.sh .\xconfig.h config_h.PL ..\minimod.pl
712 cd .. && $(HPERL) configpm --cross=$(CROSS_NAME) --no-glossary
714 $(XCOPY) ..\*.h $(XCOREDIR)\*.*
715 $(XCOPY) ..\*.inc $(XCOREDIR)\*.*
716 $(XCOPY) *.h $(XCOREDIR)\*.*
717 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
718 $(RCOPY) include $(XCOREDIR)\*.*
723 -$(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)" "CONFIG_H=xconfig.h"
724 $(XCOPY) xconfig.h $(XCOREDIR)\config.h
726 ..\config.sh: config.ce config_sh.PL
727 $(HPERL) -I..\lib -I. config_sh.PL $(CFG_VARS) config.ce > ..\config.sh
729 $(MINIMOD) : ..\minimod.pl
730 cd .. && $(HPERL) minimod.pl > lib\ExtUtils\Miniperl.pm
732 $(DYNALOADER).c: $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
733 if not exist $(AUTODIR) mkdir $(AUTODIR)
735 $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) $(*B)_pm.PL
736 $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) XSLoader_pm.PL
738 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
739 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
741 $(XSUBPP) dl_win32.xs > $(*B).c
744 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
745 $(COPY) dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
747 MakePPPort: $(MINIPERL) $(CONFIGPM)
748 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ..\mkppport
751 -if exist $(HPERL) $(HPERL) -I..\lib ..\mkppport --clean
753 #----------------------------------------------------------------------------------
755 !if "$(MACHINE)" == "wince-sh3-palm-wce211"
756 NOT_COMPILE_EXT = $(NOT_COMPILE_EXT) !XS/Typemap
758 !if "$(MACHINE)" == "wince-mips-palm-wce211"
759 NOT_COMPILE_EXT = $(NOT_COMPILE_EXT) !XS/Typemap
762 Extensions: .\buildext.pl $(PERLDEP) $(CONFIGPM)
763 $(HPERL) -I..\lib -I. -MCross=$(CROSS_NAME) .\buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) \
764 !POSIX $(NOT_COMPILE_EXT)
767 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
769 #----------------------------------------------------------------------------------
771 $(PERLEXE_RES): perl.rc perl.ico
775 -rm -f $(MACHINE)/dll/*
776 -rm -f $(MACHINE)/*.obj
777 -rm -f $(MACHINE)/*.exe
778 -rm -f $(MACHINE)/*.dll
779 -rm -f $(MACHINE)/*.lib
780 -rm -f ../config.sh ../lib/Config.pm
781 -rm -f config.h xconfig.h perl.res
789 $(DLLDIR)\globals.obj \
793 $(DLLDIR)\locale.obj \
794 $(DLLDIR)\mathoms.obj \
796 $(DLLDIR)\numeric.obj \
800 $(DLLDIR)\perlapi.obj \
801 $(DLLDIR)\perlio.obj \
802 $(DLLDIR)\perly.obj \
804 $(DLLDIR)\pp_ctl.obj \
805 $(DLLDIR)\pp_hot.obj \
806 $(DLLDIR)\pp_pack.obj \
807 $(DLLDIR)\pp_sort.obj \
808 $(DLLDIR)\pp_sys.obj \
809 $(DLLDIR)\reentr.obj \
810 $(DLLDIR)\regcomp.obj \
811 $(DLLDIR)\regexec.obj \
813 $(DLLDIR)\scope.obj \
815 $(DLLDIR)\taint.obj \
817 $(DLLDIR)\universal.obj \
820 $(DLLDIR)\win32thread.obj \
821 $(DLLDIR)\wince.obj \
822 $(DLLDIR)\win32io.obj \
823 $(DLLDIR)\wincesck.obj \
824 $(DLLDIR)\xsutils.obj \
825 $(DLLDIR)\perllib.obj \
826 $(DLLDIR)\DynaLoader.obj
827 !IF "$(PERL_MALLOC)" == "define"
828 XDLLOBJS = $(XDLLOBJS) $(DLLDIR)\malloc.obj
830 !IF "$(CRYPT_SRC)" != ""
831 XDLLOBJS = $(XDLLOBJS) $(DLLDIR)\fcrypt.obj
834 {$(SRCDIR)}.c{$(DLLDIR)}.obj:
835 $(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ $<
837 # compiler explains that it will optimize toke.c if we'll give it an
838 # option -QMOb<num> with num>=4178
840 $(CC) -c $(CFLAGS_O) -QMOb9000 -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ ..\toke.c
842 {$(SRCDIR)/win32}.c{$(DLLDIR)}.obj:
843 $(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ $<
845 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
846 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
847 !IF "$(USE_IMP_SYS)" == "define"
848 $(DLLDIR)\perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
849 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
850 rem (frustrated) mv perllib.obj $(DLLDIR)
853 perldll.def : $(HPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
854 $(HPERL) -MCross -I..\lib buildext.pl --create-perllibst-h
855 $(HPERL) -w ..\makedef.pl PLATFORM=wince $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
856 CCTYPE=$(CCTYPE) -DPERL_DLL=$(PERLDLL) > perldll.def
858 $(PERLDLL) : $(DLLDIR) perldll.def $(XDLLOBJS) $(PERLDLL_RES)
859 $(LINK32) -dll -def:perldll.def -out:$@ \
860 $(SUBSYS) $(LDLIBPATH) \
861 $(LINK_FLAGS) $(LIBFILES) \
862 $(XDLLOBJS) $(PERLDLL_RES)
865 if not exist "$(DLLDIR)" mkdir "$(DLLDIR)"
867 $(DLLDIR)\DynaLoader.obj: $(EXTDIR)\DynaLoader\DynaLoader.c
868 $(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ \
869 $(EXTDIR)\DynaLoader\DynaLoader.c
872 $(MACHINE)\perlmaince.obj
874 $(PERLEXE) : $(PERLDLL) $(CONFIGPM) $(XPERLEXEOBJS) $(PERLEXE_RES) $(STARTOBJS)
875 $(XCOPY) $(MACHINE)\*.lib $(XCOREDIR)
876 $(LINK32) $(SUBSYS) $(LDLIBPATH) \
877 -entry:wWinMainCRTStartup \
878 -out:$(MACHINE)\perl.exe \
879 -stack:0x100000 $(LINK_FLAGS) $(STARTOBJS) $(XPERLEXEOBJS) \
880 $(PERLIMPLIB) $(PERLEXE_RES) $(LIBFILES)
882 $(MACHINE)\perlmaince.obj : perlmaince.c
883 $(CC) $(CFLAGS_O) -UPERLDLL -Fo$(MACHINE)\ -c perlmaince.c
886 socketdll: $(SOCKET_DLL)
887 dumperdll: $(DUMPER_DLL)
889 dlls: socketdll iodll dumperdll
890 -xmkdir -p $(MACHINE)/lib/auto/IO
891 cp ../lib/auto/IO/IO.bs $(MACHINE)/lib/auto/IO
892 cp ../lib/auto/IO/IO.dll $(MACHINE)/lib/auto/IO
893 -xmkdir $(MACHINE)/lib/auto/Socket
894 cp ../lib/auto/Socket/Socket.bs $(MACHINE)/lib/auto/Socket
895 cp ../lib/auto/Socket/Socket.dll $(MACHINE)/lib/auto/Socket
896 -xmkdir -p $(MACHINE)/lib/auto/Data/Dumper
897 cp ../lib/auto/Data/Dumper/Dumper.bs $(MACHINE)/lib/auto/Data/Dumper
898 cp ../lib/auto/Data/Dumper/Dumper.dll $(MACHINE)/lib/auto/Data/Dumper
901 $(COPY) $(CELIBPATH)\celib.dll $(MACHINE)
902 cp perl.txt $(MACHINE)
903 cp registry.bat $(MACHINE)
904 cp ../lib/Config.pm $(MACHINE)/lib
906 rm -f perl-$(MACHINE).tar.gz
907 sh -c "tar cf perl-$(MACHINE).tar *.exe *.dll *.txt *.bat lib"
908 gzip -9 perl-$(MACHINE).tar
909 mv perl-$(MACHINE).tar.gz h:/freenet/new
913 -cemkdir "$(INSTALL_ROOT)"
914 -cemkdir "$(INSTALL_ROOT)\bin"
915 -cemkdir "$(INSTALL_ROOT)\lib"
916 $(CECOPY) "pc:$(MACHINE)/perl.exe" "ce:$(INSTALL_ROOT)/bin"
917 $(CECOPY) "pc:$(MACHINE)/perl$(PV).dll" "ce:$(INSTALL_ROOT)/bin"
918 $(CECOPY) "pc:../xlib/$(CROSS_NAME)/Config.pm" "ce:$(INSTALL_ROOT)/lib"
920 $(UNIDATAFILES) : $(HPERL) $(CONFIGPM) ..\lib\unicore\mktables
921 cd ..\lib\unicore && \
922 $(HPERL) -I.. mktables
925 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
928 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
929 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
932 $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
935 $(HPERL) -I..\lib ..\uupacktool.pl -u perlexe.ico.packd perl.ico
937 hostminiperl: ..\miniperl.exe
940 set PATH=$(CCHOME)\bin;$(PATH)
941 $(MAKE) -f Makefile "CCHOME=$(MSVCDIR)" "CCINCDIR=$(CCHOME)\include" "CCLIBDIR=$(CCHOME)\lib" "INCLUDE=$(CCHOME)\include" "LIB=$(CCHOME)\lib" "LINK_FLAGS=" .\config.h ..\miniperl.exe
944 perl -MConfig -MExtUtils::Install -we "install({'../lib/CORE', qq#$$Config{installprefixexp}/xlib/$(CROSS_NAME)/CORE#},1)"
945 perl -MConfig -MExtUtils::Install -we "install({'../xlib/$(CROSS_NAME)', qq#$$Config{installprefixexp}/xlib/$(CROSS_NAME)#},1)"
946 perl -MConfig -MFile::Copy -we "copy qq#./$(MACHINE)/perl$(PV).lib#, qq#$$Config{installprefixexp}/xlib/$(CROSS_NAME)/CORE#"
947 perl -MConfig -MFile::Copy -we "copy qq#../lib/Cross.pm#, qq#$$Config{installprefixexp}/lib#"
948 perl -MConfig -we "system qq#perl -pi.bak -we \"s{((arch^|priv)libexp)='.*'}{\$$1='# . \
949 quotemeta($$Config{installprefixexp}) . \
950 qq#/xlib/$(CROSS_NAME)'}\" $$Config{installprefixexp}/xlib/$(CROSS_NAME)/Config.pm#"