Module: wine Branch: master Commit: 65900b4a310d2392b0618e8a64ea3154919705a1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=65900b4a310d2392b0618e8a64...
Author: André Hentschel nerv@dawncrow.de Date: Wed Apr 21 20:22:13 2010 +0200
winemaker: Allow compiling 32-bit targets to be compiled on 64-bit hosts.
---
tools/winemaker | 28 ++++++++++++++++++++++------ tools/winemaker.de.man.in | 7 ++++--- tools/winemaker.man.in | 7 ++++--- 3 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/tools/winemaker b/tools/winemaker index 4cd46ff..60fe31f 100755 --- a/tools/winemaker +++ b/tools/winemaker @@ -67,6 +67,10 @@ my $OPT_ASK_SKIP=-1; # The following constants define the architecture
## +# Default Architecture will be choosen +my $OPT_ARCH_DEFAULT=0; + +## # 32-Bit Target my $OPT_ARCH_32=32;
@@ -1019,7 +1023,9 @@ sub source_scan_project_file($$$) } if ((@$target[$T_FLAGS] & $TF_NOMSVCRT) == 0) { push @{@$target[$T_LDFLAGS]},"-mno-cygwin"; - push @{@$target[$T_LDFLAGS]},"-m$opt_arch"; + if ($opt_arch != $OPT_ARCH_DEFAULT) { + push @{@$target[$T_LDFLAGS]},"-m$opt_arch"; + } } push @{@$project[$P_TARGETS]},$target;
@@ -1082,6 +1088,10 @@ sub source_scan_project_file($$$) if ((@$project_settings[$T_FLAGS] & $TF_NOMSVCRT) == 0) { push @{@$project_settings[$T_CEXTRA]},"-mno-cygwin"; push @{@$project_settings[$T_CXXEXTRA]},"-mno-cygwin"; + if ($opt_arch != $OPT_ARCH_DEFAULT) { + push @{@$project_settings[$T_CEXTRA]},"-m$opt_arch"; + push @{@$project_settings[$T_CXXEXTRA]},"-m$opt_arch"; + } }
if (@$project_settings[$T_FLAGS] & $TF_MFC) { @@ -1506,7 +1516,9 @@ sub source_scan_directory($$$$) } if ((@$target[$T_FLAGS] & $TF_NOMSVCRT) == 0) { push @{@$target[$T_LDFLAGS]},"-mno-cygwin"; - push @{@$target[$T_LDFLAGS]},"-m$opt_arch"; + if ($opt_arch != $OPT_ARCH_DEFAULT) { + push @{@$target[$T_LDFLAGS]},"-m$opt_arch"; + } } push @{@$project[$P_TARGETS]},$target;
@@ -1599,6 +1611,10 @@ sub source_scan_directory($$$$) if ((@$project_settings[$T_FLAGS] & $TF_NOMSVCRT) == 0) { push @{@$project_settings[$T_CEXTRA]},"-mno-cygwin"; push @{@$project_settings[$T_CXXEXTRA]},"-mno-cygwin"; + if ($opt_arch != $OPT_ARCH_DEFAULT) { + push @{@$project_settings[$T_CEXTRA]},"-m$opt_arch"; + push @{@$project_settings[$T_CXXEXTRA]},"-m$opt_arch"; + } }
if (@$project_settings[$T_FLAGS] & $TF_MFC) { @@ -2496,7 +2512,7 @@ $opt_work_dir=undef; $opt_single_target=undef; $opt_target_type=$TT_GUIEXE; $opt_flags=0; -$opt_arch=$OPT_ARCH_32; +$opt_arch=$OPT_ARCH_DEFAULT; $opt_is_interactive=$OPT_ASK_NO; $opt_ask_project_options=$OPT_ASK_NO; $opt_ask_target_options=$OPT_ASK_NO; @@ -2530,7 +2546,7 @@ sub usage() print STDERR " [-Dmacro[=defn]] [-Idir] [-Pdir] [-idll] [-Ldir] [-llibrary]\n"; print STDERR " [--nodlls] [--nomsvcrt] [--interactive] [--single-target name]\n"; print STDERR " [--generated-files|--nogenerated-files]\n"; - print STDERR " [--wine64]\n"; + print STDERR " [--wine32]\n"; print STDERR " work_directory|project_file|workspace_file\n"; print STDERR "\nWinemaker is designed to recursively convert all the Windows sources found in\n"; print STDERR "the specified directory or project-file, so that they can be compiled with Winelib.\n"; @@ -2568,8 +2584,8 @@ while (@ARGV>0) { $opt_no_generated_files=0; } elsif ($arg eq "--nogenerated-files") { $opt_no_generated_files=1; - } elsif ($arg eq "--wine64") { - $opt_arch=$OPT_ARCH_64; + } elsif ($arg eq "--wine32") { + $opt_arch=$OPT_ARCH_32; } elsif ($arg =~ /^-D/) { push @{$global_settings[$T_DEFINES]},$arg; } elsif ($arg =~ /^-I/) { diff --git a/tools/winemaker.de.man.in b/tools/winemaker.de.man.in index 12a58d0..ccb9731 100644 --- a/tools/winemaker.de.man.in +++ b/tools/winemaker.de.man.in @@ -33,7 +33,7 @@ winemaker - Erzeugt eine Buildumgebung um Windows Programme unter Unix zu kompi ] .br [ -.IR "--wine64 " "] +.IR "--wine32 " "] .br .IR "Arbeitsverzeichnis" "| " "Projektdatei" "| " "Workspacedatei"
@@ -174,8 +174,9 @@ Eine Makefile soll erzeugt werden. Diese Option ist Standard. .I --nogenerated-files Keine Makefile erstellen. .TP -.I --wine64 -Eine Makefile für 64-Bit erstellen. +.I --wine32 +Ein 32-Bit Target erstellen. Das ist nützlich unter wow64 Systemen. +Ohne dieser Option wird die Standard Architektur genutzt.
.SH BEISPIELE .PP diff --git a/tools/winemaker.man.in b/tools/winemaker.man.in index ef78b4a..1169f57 100644 --- a/tools/winemaker.man.in +++ b/tools/winemaker.man.in @@ -33,7 +33,7 @@ winemaker - generate a build infrastructure for compiling Windows programs on U ] .br [ -.IR "--wine64 " "] +.IR "--wine32 " "] .br .IR "work_directory" "| " "project_file" "| " "workspace_file"
@@ -175,8 +175,9 @@ Tells winemaker to generate the Makefile. This is the default. .I --nogenerated-files Tells winemaker not to generate the Makefile. .TP -.I --wine64 -Tells winemaker to generate a 64-bit Makefile. +.I --wine32 +Tells winemaker to generate a 32-bit target. This is useful on a wow64 systems. +Without that option the default architecture is used.
.SH EXAMPLES .PP