+#
# perl makefile for wince
+# During the cross-compilation, it first uses Makefile file to build
+# miniperl on HOST and then build required platform
#
-# Time-stamp: <26/10/01 15:10:06 keuchel@keuchelnt>
SRCDIR = ..
PV = 59
# Additional compiler flags can be specified here.
#
-BUILDOPT = $(BUILDOPT) $(CECFLAGS)
+BUILDOPT = $(BUILDOPT) $(CECFLAGS) -DUSE_CROSS_COMPILE
!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
.\include\sys\socket.h \
.\win32.h
-CORE_H = $(CORE_NOCFG_H) .\config.h
-
-MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
-CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
-WIN32_OBJ = $(WIN32_SRC:.c=.obj)
-#WIN32_OBJ = $(WIN32_OBJ:.\=.\$(DLLDIR)\)
-MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\$(DLLDIR)\) \
- $(MINIDIR)\miniperlmain$(o) \
- $(MINIDIR)\perlio$(o)
-MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\$(DLLDIR)\)
-MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
-DLL_OBJ = $(DLL_SRC:.c=.obj)
-X2P_OBJ = $(X2P_SRC:.c=.obj)
-
-PERLDLL_OBJ = $(CORE_OBJ)
-PERLEXE_OBJ = perlmain$(o)
-
-PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
-#PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
-
-!IF "$(USE_SETARGV)" != ""
-SETARGV_OBJ = setargv$(o)
-!ENDIF
-
DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
Sys/Hostname
# Top targets
#
-all: hostminiperl $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) Extensions
+all: hostminiperl $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) MakePPPort Extensions
-$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
+$(DYNALOADER)$(o) : $(DYNALOADER).c xconfig.h $(EXTDIR)\DynaLoader\dlutils.c
-$(CONFIGPM): .\xconfig.h ..\config.sh ..\minimod.pl
+$(CONFIGPM) : $(HPERL) ..\config.sh config_h.PL ..\minimod.pl
cd .. && $(HPERL) configpm --cross=$(CROSS_NAME) --no-glossary
-mkdir $(XCOREDIR)
$(XCOPY) ..\*.h $(XCOREDIR)\*.*
$(XCOPY) ..\*.inc $(XCOREDIR)\*.*
$(XCOPY) *.h $(XCOREDIR)\*.*
- $(XCOPY) xconfig.h $(XCOREDIR)\config.h
$(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
$(RCOPY) include $(XCOREDIR)\*.*
- $(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)" "CONFIG_H=xconfig.h"
+ -$(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)" "CONFIG_H=xconfig.h"
+ $(XCOPY) xconfig.h $(XCOREDIR)\config.h
.\xconfig.h:
-del /f xconfig.h
$(MINIMOD) : ..\minimod.pl
cd .. && $(HPERL) minimod.pl > lib\ExtUtils\Miniperl.pm
-perlmain.c : runperl.c
- $(COPY) runperl.c perlmain.c
-
$(DYNALOADER).c: $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
if not exist $(AUTODIR) mkdir $(AUTODIR)
cd $(EXTDIR)\$(*B)
$(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) $(*B)_pm.PL
$(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) XSLoader_pm.PL
- cd ..\..\win
+ cd ..\..\win32
$(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
$(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
cd $(EXTDIR)\$(*B)
$(XSUBPP) dl_win32.xs > $(*B).c
- cd ..\..\win
+ cd ..\..\win32
$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
$(COPY) dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
+MakePPPort: $(MINIPERL) $(CONFIGPM)
+ $(MINIPERL) -I..\lib ..\mkppport
+
+MakePPPort_clean:
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\mkppport --clean
+
#----------------------------------------------------------------------------------
NOT_COMPILE_EXT =
!if "$(MACHINE)" == "wince-sh3-palm-wce211"
-rm -f $(MACHINE)/*.dll
-rm -f $(MACHINE)/*.lib
-rm -f ../config.sh ../lib/Config.pm
- -rm -f config.h perl.res
+ -rm -f config.h xconfig.h perl.res
XDLLOBJS = \
$(DLLDIR)\av.obj \
$(DLLDIR)\toke.obj:
$(CC) -c $(CFLAGS_O) -QMOb9000 -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ ..\toke.c
-{$(SRCDIR)/win}.c{$(DLLDIR)}.obj:
+{$(SRCDIR)/win32}.c{$(DLLDIR)}.obj:
$(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ $<
# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
$(EXTDIR)\DynaLoader\DynaLoader.c
XPERLEXEOBJS = \
-$(MACHINE)\perlmain.obj
+$(MACHINE)\perlmaince.obj
$(PERLEXE) : $(PERLDLL) $(CONFIGPM) $(XPERLEXEOBJS) $(PERLEXE_RES) $(STARTOBJS)
$(XCOPY) $(MACHINE)\*.lib $(XCOREDIR)
-stack:0x100000 $(LINK_FLAGS) $(STARTOBJS) $(XPERLEXEOBJS) \
$(PERLIMPLIB) $(PERLEXE_RES) $(LIBFILES)
-$(MACHINE)\perlmain.obj : perlmain.c
- $(CC) $(CFLAGS_O) -UPERLDLL -Fo$(MACHINE)\ -c perlmain.c
+$(MACHINE)\perlmaince.obj : perlmaince.c
+ $(CC) $(CFLAGS_O) -UPERLDLL -Fo$(MACHINE)\ -c perlmaince.c
iodll: $(IO_DLL)
socketdll: $(SOCKET_DLL)
$(HPERL) -I.. mktables
dist: all
- $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
+ $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
zipdist: all
- $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
- $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
+ $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
+ $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
zip:
- $(HPERL) -I..\lib -MCross=$(CROSS_NAME) makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
+ $(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME) --zip
perl.ico:
$(HPERL) makeico.pl perl.ico