into separate scripts.
win32/config_sh.PL Perl code to update Win32 config.sh from Makefile
win32/config.vc Win32 base line config.sh (Visual C++ build)
win32/config.vc64 Win64 base line config.sh (Visual C++ build)
+win32/create_perllibst_h.pl creates perllibst.h file for inclusion from perllib.c
win32/distclean.bat Remove _ALL_ files not listed here in MANIFEST
win32/dl_win32.xs Win32 port
win32/fcrypt.c crypt() implementation
win32/include/dirent.h Win32 port
win32/include/netdb.h Win32 port
win32/include/sys/socket.h Win32 port
+win32/list_static_libs.pl prints libraries for static linking
win32/Makefile Win32 makefile for NMAKE (Visual C++ build)
win32/Makefile.ce WinCE port
win32/makefile.mk Win32 makefile for DMAKE (BC++, VC++ builds)
$(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
+perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl create_perllibst_h.pl
+ $(MINIPERL) -I..\lib create_perllibst_h.pl
$(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
CCTYPE=$(CCTYPE) > perldll.def
$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic +re
-if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic +re
-Extensions_static : buildext.pl $(PERLDEP) $(CONFIGPM)
+Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static
-if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static
- $(MINIPERL) -I..\lib buildext.pl --list-static-libs > Extensions_static
+ $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
Extensions_clean:
-if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
If '--static' specified, only static extensions will be built.
If '--dynamic' specified, only dynamic extensions will be built.
---create-perllibst-h
- creates perllibst.h file for inclusion from perllib.c
---list-static-libs:
- prints libraries for static linking and exits
-
=cut
use Cwd;
if ("$static,$dynamic" eq "0,0") {
($static,$dynamic) = (1,1);
}
-if ($opts{'list-static-libs'} || $opts{'create-perllibst-h'}) {
- my @statics = split /\s+/, $Config{static_ext};
- if ($opts{'create-perllibst-h'}) {
- open my $fh, ">perllibst.h"
- or die "Failed to write to perllibst.h:$!";
- my @statics1 = map {local $_=$_;s/\//__/g;$_} @statics;
- my @statics2 = map {local $_=$_;s/\//::/g;$_} @statics;
- print $fh "/*DO NOT EDIT\n this file is included from perllib.c to init static extensions */\n";
- print $fh "#ifdef STATIC1\n",(map {" \"$_\",\n"} @statics),"#undef STATIC1\n#endif\n";
- print $fh "#ifdef STATIC2\n",(map {" EXTERN_C void boot_$_ (pTHX_ CV* cv);\n"} @statics1),"#undef STATIC2\n#endif\n";
- print $fh "#ifdef STATIC3\n",(map {" newXS(\"$statics2[$_]::bootstrap\", boot_$statics1[$_], file);\n"} 0 .. $#statics),"#undef STATIC3\n#endif\n";
- close $fh;
- } else {
- my %extralibs;
- for (@statics) {
- open my $fh, "<..\\lib\\auto\\$_\\extralibs.ld" or die "can't open <..\\lib\\auto\\$_\\extralibs.ld: $!";
- $extralibs{$_}++ for grep {/\S/} split /\s+/, join '', <$fh>;
- }
- print map {s|/|\\|g;m|([^\\]+)$|;"..\\lib\\auto\\$_\\$1$Config{_a} "} @statics;
- print map {"$_ "} sort keys %extralibs;
- }
- exit(0);
-}
(my $here = getcwd()) =~ s{/}{\\}g;
my $perl = $^X;
--- /dev/null
+#!perl -w
+use strict;
+
+# creates perllibst.h file for inclusion from perllib.c
+
+use Config;
+
+my @statics = split /\s+/, $Config{static_ext};
+open my $fh, '>', 'perllibst.h' or die "Failed to write to perllibst.h:$!";
+
+my @statics1 = map {local $_=$_;s/\//__/g;$_} @statics;
+my @statics2 = map {local $_=$_;s/\//::/g;$_} @statics;
+print $fh "/*DO NOT EDIT\n this file is included from perllib.c to init static extensions */\n";
+print $fh "#ifdef STATIC1\n",(map {" \"$_\",\n"} @statics),"#undef STATIC1\n#endif\n";
+print $fh "#ifdef STATIC2\n",(map {" EXTERN_C void boot_$_ (pTHX_ CV* cv);\n"} @statics1),"#undef STATIC2\n#endif\n";
+print $fh "#ifdef STATIC3\n",(map {" newXS(\"$statics2[$_]::bootstrap\", boot_$statics1[$_], file);\n"} 0 .. $#statics),"#undef STATIC3\n#endif\n";
+close $fh;
--- /dev/null
+#!perl -w
+use strict;
+
+# prints libraries for static linking and exits
+
+use Config;
+
+my @statics = split /\s+/, $Config{static_ext};
+
+my %extralibs;
+for (@statics) {
+ my $file = "..\\lib\\auto\\$_\\extralibs.ld";
+ open my $fh, '<', $file or die "can't open $file for reading: $!";
+ $extralibs{$_}++ for grep {/\S/} split /\s+/, join '', <$fh>;
+}
+print map {s|/|\\|g;m|([^\\]+)$|;"..\\lib\\auto\\$_\\$1$Config{_a} "} @statics;
+print map {"$_ "} sort keys %extralibs;
$(X2P_OBJ) : $(CORE_H)
-perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
- $(MINIPERL) -I..\lib buildext.pl --create-perllibst-h
+perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl create_perllibst_h.pl
+ $(MINIPERL) -I..\lib create_perllibst_h.pl
$(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
$(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic +re
-if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic +re
-Extensions_static : buildext.pl $(PERLDEP) $(CONFIGPM)
+Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static
-if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static
- $(MINIPERL) -I..\lib buildext.pl --list-static-libs > Extensions_static
+ $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
Extensions_clean :
-if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean