Index: parrot-svn/config/gen/makefiles/dynpmc_pl.in =================================================================== --- parrot-svn.orig/config/gen/makefiles/dynpmc_pl.in 2009-02-11 10:16:04.140625000 +0100 +++ parrot-svn/config/gen/makefiles/dynpmc_pl.in 2009-02-11 15:42:10.984375000 +0100 @@ -85,14 +85,6 @@ $extraLibs =~ s/blib/..\\blib/g; $extraLibs =~ s/\Q$(A)\E/.lib/g; $liblist .= ' ' . $extraLibs; - - # Also note that we may need to look in the Parrot blib directory. - if ($CC =~ /gcc/i) { - $liblist .= qq{ -Wl,-L "@build_dir@/blib/lib"}; - } - else { - $liblist .= qq{ /LIBPATH:"@build_dir@/blib/lib"}; - } } else { $liblist = join( ' ', map { "-l$_" } keys %$libs ); Index: parrot-svn/config/gen/makefiles/root.in =================================================================== --- parrot-svn.orig/config/gen/makefiles/root.in 2009-02-11 10:25:30.734375000 +0100 +++ parrot-svn/config/gen/makefiles/root.in 2009-02-11 15:42:11.984375000 +0100 @@ -479,8 +479,10 @@ # Libraries LIBPARROT_STATIC = @blib_dir@/@libparrot_static@ #IF(darwin):export DYLD_LIBRARY_PATH := @blib_dir@:$(DYLD_LIBRARY_PATH) -#IF(win32):LIBPARROT_SHARED = @libparrot_shared@ +#IF(win32 or cygwin):LIBPARROT_SHARED = @libparrot_shared@ #ELSE:LIBPARROT_SHARED = @blib_dir@/@libparrot_shared@ +#IF(win32):IMPORTLIB = @blib_dir@/libparrot.lib +#ELSIF(cygwin):IMPORTLIB = @blib_dir@/libparrot.dll.a # This line controls whether a static or shared library is built LIBPARROT = @libparrot@ @@ -848,8 +850,9 @@ $(LIBPARROT_SHARED) : $(O_FILES) $(MKPATH) @blib_dir@ $(LD) $(LD_SHARE_FLAGS) $(LDFLAGS) @ld_out@$@ @libparrot_soname@ \ -#IF(cygwin): -Wl,--out-implib=libparrot.dll.a \ -#IF(win32 and cc==gcc): -Wl,--out-implib=libparrot.lib \ +#IF(cygwin): -Wl,--out-implib=$(IMPORTLIB) \ +#IF(win32 and cc==gcc): -Wl,--out-implib=$(IMPORTLIB) \ +#IF(win32 and cc==cl): -implib:$(IMPORTLIB) \ $(O_FILES) $(C_LIBS) $(ICU_SHARED) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 #IF(libparrot_shared_alias): ( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ ) @@ -1587,13 +1590,16 @@ $(PARROT) \ $(MINIPARROT) \ $(LIBPARROT) \ + $(IMPORTLIB) \ $(INSTALLABLEPARROT) \ $(INSTALLABLEDIS) \ $(INSTALLABLEPDUMP) \ $(INSTALLABLEPINFO) \ $(INSTALLABLEPBCMERGE) \ $(INSTALLABLEPDB) \ + $(INSTALLABLECONFIG) \ pbc_to_exe.pbc pbc_to_exe.c pbc_to_exe$(O) pbc_to_exe$(EXE) \ + parrot_config$(O) parrot_config.pbc parrot_config.c parrot_config$(EXE) \ $(IMCC_DIR)/main$(O) \ $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \ $(SRC_DIR)/pbc_info$(O) $(PINFO) \ @@ -1664,12 +1670,12 @@ $(RM_F) \ "$(DYNEXT_DIR)/*$(LOAD_EXT)" \ "$(DYNEXT_DIR)/*$(SHARE_EXT)" \ - "$(DYNEXT_DIR)/*.lib" \ - "*.pdb" "$(DYNEXT_DIR)/*.pdb" \ - "*.ilk" "$(DYNEXT_DIR)/*.ilk" \ - "*.exp" "$(DYNEXT_DIR)/*.exp" \ - "*.def" "$(DYNEXT_DIR)/*.def" \ - "*.manifest" "$(DYNEXT_DIR)/*.manifest" +#IF(win32): "$(DYNEXT_DIR)/*.lib" \ +#IF(win32): "*.pdb" "$(DYNEXT_DIR)/*.pdb" \ +#IF(win32): "*.ilk" "$(DYNEXT_DIR)/*.ilk" \ +#IF(win32): "*.exp" "$(DYNEXT_DIR)/*.exp" \ +#IF(win32): "*.def" "$(DYNEXT_DIR)/*.def" \ +#IF(win32): "*.manifest" "$(DYNEXT_DIR)/*.manifest" # Remove files generated by the test suite # XXX Is there a danger of too long command lines in the $(RM_F) commands, @@ -1681,21 +1687,21 @@ "t/compilers/*/*.pbc" \ "t/compilers/*/*_pbcexe*" \ "t/compilers/*/*.pir" \ - "t/compilers/*/*.stabs.s" +#IF(!win32): "t/compilers/*/*.stabs.s" $(RM_F) \ "t/compilers/*/*/*.out" \ "t/compilers/*/*/*.pasm" \ "t/compilers/*/*/*.pbc" \ "t/compilers/*/*/*_pbcexe*" \ "t/compilers/*/*/*.pir" \ - "t/compilers/*/*/*.stabs.s" +#IF(!win32): "t/compilers/*/*/*.stabs.s" $(RM_F) \ "t/*/*$(O)" \ "t/*/*.out" \ "t/*/*.pasm" \ "t/*/*_pbcexe*" \ "t/*/*.pir" \ - "t/*/*.stabs.s" +#IF(!win32): "t/*/*.stabs.s" $(RM_F) \ "t/library/*.pbc" \ "t/dynoplibs/*.pbc" \ @@ -1706,8 +1712,8 @@ "t/tools/*.pbc" $(RM_F) \ "t/src/*.c" \ - "t/src/*.pdb" \ - "t/src/*.manifest" +#IF(win32): "t/src/*.pdb" \ +#IF(win32): "t/src/*.manifest" $(RM_F) \ "t/tools/pmc2c.t_*" \ "t/tools/pmc2c.pmc_t_*" \ @@ -1715,6 +1721,7 @@ $(RM_F) \ "test$(EXE)" \ "test.*" +#IF(cygwin or (win32 and cc==gcc)): $(RM_F) *.exe.stackdump $(RM_F) \ "parrot_test_run.tar.gz" Index: parrot-svn/config/init/hints/mswin32.pm =================================================================== --- parrot-svn.orig/config/init/hints/mswin32.pm 2009-02-11 10:16:04.161625000 +0100 +++ parrot-svn/config/init/hints/mswin32.pm 2009-02-11 15:42:12.296875000 +0100 @@ -86,8 +86,8 @@ ld_out => '-out:', ldflags => '-nologo -nodefaultlib', libs => 'kernel32.lib ws2_32.lib msvcrt.lib oldnames.lib ', - libparrot_static => 'libparrot' . $conf->data->get('a'), libparrot_shared => 'libparrot$(SHARE_EXT)', + libparrot_ldflags => "-libpath:\"$build_dir\\blib\\lib\" libparrot.lib", ar_flags => '', ar_out => '-out:', slash => '\\', @@ -103,7 +103,14 @@ # If we are building shared, need to include dynamic libparrot.lib, otherwise # the static libparrot.lib. - $conf->data->set( libparrot_ldflags => "\"$build_dir\\libparrot.lib\"" ); + if ($conf->data->get('parrot_is_shared')) { + $conf->data->set( has_static_linking => 0, + libparrot_static => 'blib\\lib\\libparrots' . $conf->data->get('a')); + } + else { + $conf->data->set( has_dynamic_linking => 0, + libparrot_static => 'blib\\lib\\libparrot' . $conf->data->get('a')); + } # 'link' needs to be link.exe, not cl.exe. # This makes 'link' and 'ld' the same.