From: Vadim Konovalov Date: Sun, 12 Jun 2005 14:09:11 +0000 (-0400) Subject: improve static build for win32/Makefile X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=595589fae4479595ffd0993d9a9d2e00eaaa1581;p=p5sagit%2Fp5-mst-13.2.git improve static build for win32/Makefile Message-Id: <1118599750.2732.2.camel@mdk10> p4raw-id: //depot/perl@24806 --- diff --git a/win32/Makefile b/win32/Makefile index aa254a7..8ba95a5 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -695,6 +695,9 @@ PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ) SETARGV_OBJ = setargv$(o) !ENDIF +# specify static extensions here +STATIC_EXT = Cwd Compress/Zlib + DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader SOCKET = $(EXTDIR)\Socket\Socket FCNTL = $(EXTDIR)\Fcntl\Fcntl @@ -949,11 +952,13 @@ $(DLL_OBJ) : $(CORE_H) $(X2P_OBJ) : $(CORE_H) perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl + $(MINIPERL) -I..\lib buildext.pl --create-perllibst-h $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \ CCTYPE=$(CCTYPE) > perldll.def -$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) - $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<< +$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static + $(MINIPERL) -I..\lib buildext.pl --list-static-libs > stat-exts.tmp + $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @stat-exts.tmp @<< $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES) << $(XCOPY) $(PERLIMPLIB) $(COREDIR) @@ -1021,8 +1026,12 @@ $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs #------------------------------------------------------------------------------- Extensions: buildext.pl $(PERLDEP) $(CONFIGPM) - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext + $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic + $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic + +Extensions_static : buildext.pl + $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static + $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static Extensions_clean: -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean @@ -1101,6 +1110,7 @@ distclean: realclean -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) -del /f *.def *.map + -del /f stat-exts.tmp -del /f $(EXTENSION_DLL) -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm -del /f $(EXTDIR)\DynaLoader\dl_win32.xs