Add better msvcrt support to winemaker

Francois Gouget fgouget at free.fr
Sat Jan 31 14:37:26 CST 2004


Changelog:

 * tools/winemaker

   Link with msvcrt and use the msvcrt headers by default to improve the
Visual C++ compatibility.
   Add a '--nomsvcrt' option to generate makefiles that do not use
msvcrt.


Index: tools/winemaker
===================================================================
RCS file: /var/cvs/wine/tools/winemaker,v
retrieving revision 1.72
diff -u -r1.72 winemaker
--- tools/winemaker	30 Jan 2004 22:55:00 -0000	1.72
+++ tools/winemaker	31 Jan 2004 20:20:43 -0000
@@ -242,6 +242,10 @@
 my $TF_NODLLS=16;

 ##
+# --nomsvcrt option: Do not link with msvcrt
+my $TF_NOMSVCRT=32;
+
+##
 # Initialize a target:
 # - set the target type to TT_SETTINGS, i.e. no real target will
 #   be generated.
@@ -468,6 +472,8 @@
       @$target[$T_FLAGS]|=$TF_NOMFC;
     } elsif ($option =~ /^--nodlls/) {
       @$target[$T_FLAGS]|=$TF_NODLLS;
+    } elsif ($option =~ /^--nomsvcrt/) {
+      @$target[$T_FLAGS]|=$TF_NOMSVCRT;
     } else {
       print STDERR "error: unknown option \"$option\"\n";
       return 0;
@@ -804,6 +810,9 @@
       @$target[$T_DLLS]=[];
       @$target[$T_LIBRARIES]=[];
     }
+    if ((@$target[$T_FLAGS] & $TF_NOMSVCRT) == 0) {
+        push @{@$target[$T_DLLS]},"msvcrt";
+    }
     push @{@$project[$P_TARGETS]},$target;

     # Ask for target-specific options
@@ -904,6 +913,9 @@
   if (@$project_settings[$T_FLAGS] & $TF_MFC) {
     push @{@$project_settings[$T_INCLUDE_PATH]},"\$(MFC_INCLUDE_PATH)";
   }
+  if ((@$project_settings[$T_FLAGS] & $TF_NOMSVCRT)==0) {
+    push @{@$project_settings[$T_INCLUDE_PATH]},"-I\$(WINE_INCLUDE_ROOT)/msvcrt";
+  }
   # The sources that did not match, if any, go to the extra
   # source list of the project settings
   foreach my $source (@sources_c) {
@@ -2167,7 +2179,7 @@
   print STDERR "                 [--guiexe|--windows|--cuiexe|--console|--dll]\n";
   print STDERR "                 [--wrap|--nowrap] [--mfc|--nomfc]\n";
   print STDERR "                 [-Dmacro[=defn]] [-Idir] [-Pdir] [-idll] [-Ldir] [-llibrary]\n";
-  print STDERR "                 [--nodlls] [--interactive] [--single-target name]\n";
+  print STDERR "                 [--nodlls] [--nomsvcrt] [--interactive] [--single-target name]\n";
   print STDERR "                 [--generated-files|--nogenerated-files] [--nogenerated-specs]\n";
   print STDERR "                 work_directory\n";
   print STDERR "\nWinemaker is designed to recursively convert all the Windows sources found in\n";
@@ -2250,6 +2262,8 @@
     $needs_mfc=0;
   } elsif ($arg eq "--nodlls") {
     $opt_flags|=$TF_NODLLS;
+  } elsif ($arg eq "--nomsvcrt") {
+    $opt_flags|=$TF_NOMSVCRT;

   # Catch errors
   } else {


-- 
Francois Gouget
fgouget at codeweavers.com



More information about the wine-patches mailing list