[1/3] winemaker: Add command line option for compiling static libraries
André Hentschel
nerv at dawncrow.de
Sun Jan 15 11:02:57 CST 2012
---
tools/winemaker | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/tools/winemaker b/tools/winemaker
index 0e5ad18..aaf0d9c 100755
--- a/tools/winemaker
+++ b/tools/winemaker
@@ -1433,6 +1433,8 @@ sub source_scan_directory($$$$)
$name =~ s+(/|\.[^.]*)$++;
if ($opt_target_type == $TT_DLL) {
$name = canonize($name).".dll";
+ } elsif ($opt_target_type == $TT_LIB) {
+ $name = "lib".canonize($name).".a";
} else {
$name = canonize($name).".exe";
}
@@ -1551,6 +1553,12 @@ sub source_scan_directory($$$$)
push @local_depends,"$target_name";
push @local_libs,$target_name;
push @{@$target[$T_ARFLAGS]},("rc");
+ } elsif ($target_name =~ /\.a$/) {
+ @$target[$T_NAME]=$target_name;
+ @$target[$T_TYPE]=$TT_LIB;
+ push @local_depends,"$target_name";
+ push @local_libs,$target_name;
+ push @{@$target[$T_ARFLAGS]},("rc");
} else {
@$target[$T_TYPE]=$opt_target_type;
push @exe_list,$target;
@@ -2630,7 +2638,7 @@ sub usage()
print STDERR "Usage: winemaker [--nobanner] [--backup|--nobackup] [--nosource-fix]\n";
print STDERR " [--lower-none|--lower-all|--lower-uppercase]\n";
print STDERR " [--lower-include|--nolower-include] [--mfc|--nomfc]\n";
- print STDERR " [--guiexe|--windows|--cuiexe|--console|--dll]\n";
+ print STDERR " [--guiexe|--windows|--cuiexe|--console|--dll|--lib]\n";
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";
@@ -2690,6 +2698,8 @@ while (@ARGV>0) {
# 'Source'-based method options
} elsif ($arg eq "--dll") {
$opt_target_type=$TT_DLL;
+ } elsif ($arg eq "--lib") {
+ $opt_target_type=$TT_LIB;
} elsif ($arg eq "--guiexe" or $arg eq "--windows") {
$opt_target_type=$TT_GUIEXE;
} elsif ($arg eq "--cuiexe" or $arg eq "--console") {
--
Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120115/f5899741/attachment.ksh>
More information about the wine-patches
mailing list