Alexandre Julliard : makefiles: Use the STATICLIB variable for static import libraries.
Alexandre Julliard
julliard at winehq.org
Wed Oct 6 15:51:37 CDT 2021
Module: wine
Branch: master
Commit: 518f9a12c18bd951bc71f3128e296841ede3774e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=518f9a12c18bd951bc71f3128e296841ede3774e
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Oct 6 10:20:26 2021 +0200
makefiles: Use the STATICLIB variable for static import libraries.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/adsiid/Makefile.in | 2 +-
dlls/dmoguids/Makefile.in | 2 +-
dlls/dxerr8/Makefile.in | 2 +-
dlls/dxerr9/Makefile.in | 2 +-
dlls/dxguid/Makefile.in | 2 +-
dlls/mfuuid/Makefile.in | 2 +-
dlls/strmbase/Makefile.in | 2 +-
dlls/strmiids/Makefile.in | 2 +-
dlls/uuid/Makefile.in | 2 +-
dlls/wbemuuid/Makefile.in | 2 +-
dlls/winecrt0/Makefile.in | 2 +-
dlls/wmcodecdspuuid/Makefile.in | 2 +-
tools/make_makefiles | 16 +++++++---------
tools/makedep.c | 10 +++++-----
14 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/dlls/adsiid/Makefile.in b/dlls/adsiid/Makefile.in
index d741ea55c7b..14a46b31108 100644
--- a/dlls/adsiid/Makefile.in
+++ b/dlls/adsiid/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libadsiid.a
+STATICLIB = libadsiid.a
C_SRCS = \
adsiid.c
diff --git a/dlls/dmoguids/Makefile.in b/dlls/dmoguids/Makefile.in
index db38e5756a5..183a4359918 100644
--- a/dlls/dmoguids/Makefile.in
+++ b/dlls/dmoguids/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libdmoguids.a
+STATICLIB = libdmoguids.a
C_SRCS = \
dmoguids.c
diff --git a/dlls/dxerr8/Makefile.in b/dlls/dxerr8/Makefile.in
index c056b1cd1af..04e9d382723 100644
--- a/dlls/dxerr8/Makefile.in
+++ b/dlls/dxerr8/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libdxerr8.a
+STATICLIB = libdxerr8.a
C_SRCS = \
dxerr8.c
diff --git a/dlls/dxerr9/Makefile.in b/dlls/dxerr9/Makefile.in
index 04fac1fb3e0..1f3bdaed39f 100644
--- a/dlls/dxerr9/Makefile.in
+++ b/dlls/dxerr9/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libdxerr9.a
+STATICLIB = libdxerr9.a
C_SRCS = \
dxerr9.c
diff --git a/dlls/dxguid/Makefile.in b/dlls/dxguid/Makefile.in
index 551bff93695..60f50bd2146 100644
--- a/dlls/dxguid/Makefile.in
+++ b/dlls/dxguid/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libdxguid.a
+STATICLIB = libdxguid.a
C_SRCS = \
dx10guid.c \
diff --git a/dlls/mfuuid/Makefile.in b/dlls/mfuuid/Makefile.in
index b42583bbb73..a17fead940c 100644
--- a/dlls/mfuuid/Makefile.in
+++ b/dlls/mfuuid/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libmfuuid.a
+STATICLIB = libmfuuid.a
C_SRCS = \
mfplay.c \
diff --git a/dlls/strmbase/Makefile.in b/dlls/strmbase/Makefile.in
index 0fef7b6ff03..077abc1da50 100644
--- a/dlls/strmbase/Makefile.in
+++ b/dlls/strmbase/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libstrmbase.a
+STATICLIB = libstrmbase.a
C_SRCS = \
dispatch.c \
diff --git a/dlls/strmiids/Makefile.in b/dlls/strmiids/Makefile.in
index 09edc7018fc..1b9bbd98fb6 100644
--- a/dlls/strmiids/Makefile.in
+++ b/dlls/strmiids/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libstrmiids.a
+STATICLIB = libstrmiids.a
C_SRCS = \
evr.c \
diff --git a/dlls/uuid/Makefile.in b/dlls/uuid/Makefile.in
index ba163e30ca2..2a27740d7ed 100644
--- a/dlls/uuid/Makefile.in
+++ b/dlls/uuid/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libuuid.a
+STATICLIB = libuuid.a
C_SRCS = \
d2d.c \
diff --git a/dlls/wbemuuid/Makefile.in b/dlls/wbemuuid/Makefile.in
index 449a0e68a87..87a07d463e1 100644
--- a/dlls/wbemuuid/Makefile.in
+++ b/dlls/wbemuuid/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libwbemuuid.a
+STATICLIB = libwbemuuid.a
C_SRCS = \
wbemuuid.c
diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in
index 45cff11233e..17da4da29c6 100644
--- a/dlls/winecrt0/Makefile.in
+++ b/dlls/winecrt0/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libwinecrt0.a
+STATICLIB = libwinecrt0.a
C_SRCS = \
crt_dllmain.c \
diff --git a/dlls/wmcodecdspuuid/Makefile.in b/dlls/wmcodecdspuuid/Makefile.in
index d8f5d024413..04b5a7a378f 100644
--- a/dlls/wmcodecdspuuid/Makefile.in
+++ b/dlls/wmcodecdspuuid/Makefile.in
@@ -1,4 +1,4 @@
-MODULE = libwmcodecdspuuid.a
+STATICLIB = libwmcodecdspuuid.a
C_SRCS = \
wmcodecdspuuid.c
diff --git a/tools/make_makefiles b/tools/make_makefiles
index 3abba2da840..a316b42dd73 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -229,7 +229,7 @@ sub parse_makefile($)
{
die "Configure substitution is not allowed in $file" unless $file eq "Makefile";
}
- if (/^\s*(MODULE|IMPORTLIB|TESTDLL|PARENTSRC|APPMODE|EXTRADLLFLAGS)\s*=\s*(.*)/)
+ if (/^\s*(MODULE|IMPORTLIB|TESTDLL|STATICLIB|PARENTSRC|EXTRADLLFLAGS)\s*=\s*(.*)/)
{
my $var = $1;
$make{$var} = $2;
@@ -433,17 +433,16 @@ sub update_makefiles(@)
die "MODULE should not be defined in $file" if defined $make{"MODULE"};
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
}
- elsif (defined($make{"MODULE"}) && $make{"MODULE"} =~ /\.a$/) # import lib
+ elsif (defined($make{"STATICLIB"}))
{
- die "MODULE should not be defined as static lib in $file" unless $file =~ /^dlls\//;
- die "APPMODE should not be defined in $file" if defined $make{"APPMODE"};
- die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
+ die "MODULE should not be defined in $file" if defined $make{"MODULE"};
+ die "invalid STATICLIB name" unless $make{"STATICLIB"} =~ /\.a$/;
}
elsif (defined($make{"MODULE"})) # dll or program
{
(my $name = $file) =~ s/^(dlls|programs)\/(.*)\/Makefile/$2/;
my $dllflags = $make{"EXTRADLLFLAGS"} || "";
- if (defined $make{"APPMODE"}) { $dllflags .= " " . $make{"APPMODE"}; }
+ die "invalid MODULE name" if $make{"MODULE"} =~ /\.a$/;
die "MODULE should not be defined in $file" unless $file =~ /^(dlls|programs)\//;
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
if ($file =~ /^programs\//)
@@ -454,7 +453,6 @@ sub update_makefiles(@)
}
else
{
- die "APPMODE should not be defined in $file" if defined $make{"APPMODE"} ;
die "EXTRADLLFLAGS should not contain -mconsole or -mwindows in $file" if $dllflags =~ /-m(console|windows)/;
die "Invalid MODULE in $file" unless ($name =~ /\./ && $make{"MODULE"} eq $name) || $make{"MODULE"} eq "$name.dll";
}
@@ -467,9 +465,9 @@ sub update_makefiles(@)
}
elsif ($file =~ /^tools.*\/Makefile$/)
{
- die "APPMODE should not be defined in $file" if defined $make{"APPMODE"};
- die "EXTRADLLFLAGS should not be defined in $file" if defined $make{"EXTRADLLFLAGS"};
+ die "MODULE should not be defined in $file" if defined $make{"MODULE"};
die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"};
+ die "EXTRADLLFLAGS should not be defined in $file" if defined $make{"EXTRADLLFLAGS"};
$args = ",,[test \"x\$enable_tools\" = xno]";
}
push @lines, "WINE_CONFIG_MAKEFILE($dir$args)\n";
diff --git a/tools/makedep.c b/tools/makedep.c
index 88b179a9070..bb2201dadb1 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2965,12 +2965,12 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
find_src_file( make, replace_extension( source->name, ".c", ".spec" )));
int need_cross = (crosstarget &&
!(source->file->flags & FLAG_C_UNIX) &&
- (make->is_cross || (make->module && make->staticlib) ||
+ (make->is_cross || make->staticlib ||
(source->file->flags & FLAG_C_IMPLIB)));
int need_obj = ((*dll_ext || !(source->file->flags & FLAG_C_UNIX)) &&
(!need_cross ||
(source->file->flags & FLAG_C_IMPLIB) ||
- (make->module && make->staticlib)));
+ make->staticlib));
if ((source->file->flags & FLAG_GENERATED) &&
(!make->testdll || !strendswith( source->filename, "testlist.c" )))
@@ -2988,11 +2988,11 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
output( "%s.o: %s\n", obj_dir_path( make, obj ), source->filename );
output( "\t%s$(CC) -c -o $@ %s", cmd_prefix( "CC" ), source->filename );
output_filenames( defines );
- if (make->sharedlib || (make->staticlib && !make->module) || (source->file->flags & FLAG_C_UNIX))
+ if (make->sharedlib || (source->file->flags & FLAG_C_UNIX))
{
output_filenames( unix_dllflags );
}
- else if (make->module || make->staticlib || make->testdll)
+ else if (make->module || make->testdll)
{
output_filenames( dll_flags );
if (source->use_msvcrt) output_filenames( msvcrt_flags );
@@ -4084,7 +4084,7 @@ static void load_sources( struct makefile *make )
make->install_dev = get_expanded_make_var_array( make, "INSTALL_DEV" );
make->extra_targets = get_expanded_make_var_array( make, "EXTRA_TARGETS" );
- if (make->module && strendswith( make->module, ".a" )) make->staticlib = make->module;
+ if (make->staticlib) make->module = make->staticlib;
make->disabled = make->obj_dir && strarray_exists( &disabled_dirs, make->obj_dir );
make->is_win16 = strarray_exists( &make->extradllflags, "-m16" );
More information about the wine-cvs
mailing list