winemaker: Add command line option for compiling static libraries.

This commit is contained in:
André Hentschel 2012-01-15 18:02:57 +01:00 committed by Alexandre Julliard
parent a6b209d801
commit 3abe79d71a
3 changed files with 26 additions and 8 deletions

View File

@ -1433,6 +1433,8 @@ sub source_scan_directory($$$$)
$name =~ s+(/|\.[^.]*)$++; $name =~ s+(/|\.[^.]*)$++;
if ($opt_target_type == $TT_DLL) { if ($opt_target_type == $TT_DLL) {
$name = canonize($name).".dll"; $name = canonize($name).".dll";
} elsif ($opt_target_type == $TT_LIB) {
$name = "lib".canonize($name).".a";
} else { } else {
$name = canonize($name).".exe"; $name = canonize($name).".exe";
} }
@ -1551,6 +1553,12 @@ sub source_scan_directory($$$$)
push @local_depends,"$target_name"; push @local_depends,"$target_name";
push @local_libs,$target_name; push @local_libs,$target_name;
push @{@$target[$T_ARFLAGS]},("rc"); 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 { } else {
@$target[$T_TYPE]=$opt_target_type; @$target[$T_TYPE]=$opt_target_type;
push @exe_list,$target; push @exe_list,$target;
@ -2630,7 +2638,7 @@ sub usage()
print STDERR "Usage: winemaker [--nobanner] [--backup|--nobackup] [--nosource-fix]\n"; print STDERR "Usage: winemaker [--nobanner] [--backup|--nobackup] [--nosource-fix]\n";
print STDERR " [--lower-none|--lower-all|--lower-uppercase]\n"; print STDERR " [--lower-none|--lower-all|--lower-uppercase]\n";
print STDERR " [--lower-include|--nolower-include] [--mfc|--nomfc]\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 " [-Dmacro[=defn]] [-Idir] [-Pdir] [-idll] [-Ldir] [-llibrary]\n";
print STDERR " [--nodlls] [--nomsvcrt] [--interactive] [--single-target name]\n"; print STDERR " [--nodlls] [--nomsvcrt] [--interactive] [--single-target name]\n";
print STDERR " [--generated-files|--nogenerated-files]\n"; print STDERR " [--generated-files|--nogenerated-files]\n";
@ -2690,6 +2698,8 @@ while (@ARGV>0) {
# 'Source'-based method options # 'Source'-based method options
} elsif ($arg eq "--dll") { } elsif ($arg eq "--dll") {
$opt_target_type=$TT_DLL; $opt_target_type=$TT_DLL;
} elsif ($arg eq "--lib") {
$opt_target_type=$TT_LIB;
} elsif ($arg eq "--guiexe" or $arg eq "--windows") { } elsif ($arg eq "--guiexe" or $arg eq "--windows") {
$opt_target_type=$TT_GUIEXE; $opt_target_type=$TT_GUIEXE;
} elsif ($arg eq "--cuiexe" or $arg eq "--console") { } elsif ($arg eq "--cuiexe" or $arg eq "--console") {

View File

@ -1,5 +1,5 @@
.\" -*- nroff -*- .\" -*- nroff -*-
.TH WINEMAKER 1 "April 2010" "@PACKAGE_STRING@" "Wine Developers Manual" .TH WINEMAKER 1 "Januar 2012" "@PACKAGE_STRING@" "Wine Developers Manual"
.SH NAME .SH NAME
winemaker \- Erzeugt eine Buildumgebung um Windows Programme unter Unix zu kompilieren winemaker \- Erzeugt eine Buildumgebung um Windows Programme unter Unix zu kompilieren
.SH ÜBERSICHT .SH ÜBERSICHT
@ -17,7 +17,7 @@ winemaker \- Erzeugt eine Buildumgebung um Windows Programme unter Unix zu kompi
] ]
.br .br
[ [
.BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " .BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--lib "
] ]
.br .br
[ [
@ -118,7 +118,10 @@ Diese Option ist Standard.
Gibt den Typ(Konsole) der zu erstellenden Anwendung an. Gibt den Typ(Konsole) der zu erstellenden Anwendung an.
.TP .TP
.B --dll .B --dll
winemaker wird im Zweifelsfall annehmen, dass es sich um eine Bibliothek handelt. winemaker wird im Zweifelsfall annehmen, dass es sich um eine DLL handelt.
.TP
.B --lib
winemaker wird im Zweifelsfall annehmen, dass es sich um eine statische Bibliothek handelt.
.TP .TP
.B --mfc .B --mfc
Teilt winemaker mit, dass es sich um MFC-basierten Quellcode handelt. Teilt winemaker mit, dass es sich um MFC-basierten Quellcode handelt.

View File

@ -1,5 +1,5 @@
.\" -*- nroff -*- .\" -*- nroff -*-
.TH WINEMAKER 1 "Sep 2009" "@PACKAGE_STRING@" "Wine Developers Manual" .TH WINEMAKER 1 "Jan 2012" "@PACKAGE_STRING@" "Wine Developers Manual"
.SH NAME .SH NAME
winemaker \- generate a build infrastructure for compiling Windows programs on Unix winemaker \- generate a build infrastructure for compiling Windows programs on Unix
.SH SYNOPSIS .SH SYNOPSIS
@ -17,7 +17,7 @@ winemaker \- generate a build infrastructure for compiling Windows programs on U
] ]
.br .br
[ [
.BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " .BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--lib "
] ]
.br .br
[ [
@ -120,8 +120,13 @@ unknown type, it should assume that it is a console application.
.TP .TP
.B --dll .B --dll
This option tells winemaker that whenever it finds a target of unknown type, This option tells winemaker that whenever it finds a target of unknown type,
i.e. for which it does not know whether it is an executable or a library, i.e. for which it does not know whether it is an executable, a dll, or a static library,
it should assume it is a library. it should assume it is a dll.
.TP
.B --lib
This option tells winemaker that whenever it finds a target of unknown type,
i.e. for which it does not know whether it is an executable, a dll, or a static library,
it should assume it is a static library.
.TP .TP
.B --mfc .B --mfc
Specifies that the targets are MFC based. In such a case winemaker adapts Specifies that the targets are MFC based. In such a case winemaker adapts